* [gentoo-java] mockobjects-0.09-r1 won't build against junit-3.8.2
@ 2007-01-07 16:24 David Emmett
2007-01-07 16:41 ` David Emmett
0 siblings, 1 reply; 6+ messages in thread
From: David Emmett @ 2007-01-07 16:24 UTC (permalink / raw
To: gentoo-java
Hi,
I just submitted a bug in the Gentoo Linux product, bug #160711
I updated my system over Christmas, and then tried to emerge groovy. It kept
failling because of a visibility change between junit 3.8.1 and junit 3.8.2.
The junit.framework.Assert.failNotEquals() method had it's visibility changed
from private to public between junit version 3.8.1 and 3.8.2.
mockobjects has a class com.mockobjects.util.AssertMo which extends Assert,
and overrides the failNotEquals() method, but declares it protected. This
means that mockobjects will no longer compile against junit 3.8.2. The fix is
the change the method (at line 81 of com.mockobjects.util.AssertMo) from
protected to public. I have not worked with epatch, so I don't know how it
works, otherwise I would have submitted a patch. I'll try and figure it out
and submit a patch anyway.
I have also submitted this bug to the mockobjects project. Hopefully, they
will also fix this problem.
Cheers,
David
----
http://www.motogpmatters.com/ - MotoGP News and Race Reports
--
gentoo-java@gentoo.org mailing list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-java] mockobjects-0.09-r1 won't build against junit-3.8.2
2007-01-07 16:24 [gentoo-java] mockobjects-0.09-r1 won't build against junit-3.8.2 David Emmett
@ 2007-01-07 16:41 ` David Emmett
2007-01-07 17:01 ` Vlastimil Babka
0 siblings, 1 reply; 6+ messages in thread
From: David Emmett @ 2007-01-07 16:41 UTC (permalink / raw
To: gentoo-java
[-- Attachment #1: Type: text/plain, Size: 1374 bytes --]
On Sunday 07 January 2007 17:24, David Emmett wrote:
> Hi,
>
> I just submitted a bug in the Gentoo Linux product, bug #160711
>
> I updated my system over Christmas, and then tried to emerge groovy. It
> kept failling because of a visibility change between junit 3.8.1 and junit
> 3.8.2. The junit.framework.Assert.failNotEquals() method had it's
> visibility changed from private to public between junit version 3.8.1 and
> 3.8.2.
>
> mockobjects has a class com.mockobjects.util.AssertMo which extends Assert,
> and overrides the failNotEquals() method, but declares it protected. This
> means that mockobjects will no longer compile against junit 3.8.2. The fix
> is the change the method (at line 81 of com.mockobjects.util.AssertMo) from
> protected to public. I have not worked with epatch, so I don't know how it
> works, otherwise I would have submitted a patch. I'll try and figure it out
> and submit a patch anyway.
>
> I have also submitted this bug to the mockobjects project. Hopefully, they
> will also fix this problem.
>
I found out how to make a patch (is it really as simple as doing diff -u?),
and have attached the patch file. This patch file needs to be added to the
existing patch file for mockobjects-0.09-r1 (which patches the build.xml
file).
Hope this is useful,
David
--
----
http://www.motogpmatters.com/ - MotoGP News and Race Reports
[-- Attachment #2: assert.patch --]
[-- Type: text/x-diff, Size: 363 bytes --]
--- AssertMo.java 2007-01-07 17:33:53.000000000 +0100
+++ AssertMo.java.orig 2007-01-07 17:35:10.000000000 +0100
@@ -77,7 +77,7 @@
assertTrue("Should not have verified", threwException);
}
- public static void failNotEquals(
+ static protected void failNotEquals(
String message,
Object expected,
Object actual) {
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-java] mockobjects-0.09-r1 won't build against junit-3.8.2
2007-01-07 16:41 ` David Emmett
@ 2007-01-07 17:01 ` Vlastimil Babka
2007-01-07 17:14 ` David Emmett
0 siblings, 1 reply; 6+ messages in thread
From: Vlastimil Babka @ 2007-01-07 17:01 UTC (permalink / raw
To: gentoo-java
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
David Emmett wrote:
>> I have also submitted this bug to the mockobjects project. Hopefully, they
>> will also fix this problem.
>>
Looks like they already closed it wontfix, because the project is dead.
Kinda what I expected.
> I found out how to make a patch (is it really as simple as doing diff -u?),
> and have attached the patch file. This patch file needs to be added to the
> existing patch file for mockobjects-0.09-r1 (which patches the build.xml
> file).
>
> Hope this is useful,
It would be, if I didn't fix it already, but thanks anyway for your
contribution and don't let that discourage you :) At least you learned
some new things :)
>
> ------------------------------------------------------------------------
>
> --- AssertMo.java 2007-01-07 17:33:53.000000000 +0100
> +++ AssertMo.java.orig 2007-01-07 17:35:10.000000000 +0100
You made the patch the other way around, do it like "diff -u file.orig
file". Also, to be directly usable in the ebuild, it must contain full
path relative to WORKDIR (which is usually inside the directory you get
after unpacking the sources). So, in this case it's "diff -u
src/core/com/.../....orig src/core/com/.../...java"
- --
Vlastimil Babka (Caster)
Gentoo/Java
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFoSdbtbrAj05h3oQRAonPAJ90+nh9B7asaktD2QgqmLWPrg2ajgCfSfiI
o0l7fTpi0FCgMCtDoZdJ0hQ=
=4KNo
-----END PGP SIGNATURE-----
--
gentoo-java@gentoo.org mailing list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-java] mockobjects-0.09-r1 won't build against junit-3.8.2
2007-01-07 17:01 ` Vlastimil Babka
@ 2007-01-07 17:14 ` David Emmett
2007-01-07 17:25 ` Joshua Nichols
0 siblings, 1 reply; 6+ messages in thread
From: David Emmett @ 2007-01-07 17:14 UTC (permalink / raw
To: gentoo-java; +Cc: Vlastimil Babka
[-- Attachment #1: Type: text/plain, Size: 1145 bytes --]
On Sunday 07 January 2007 18:01, Vlastimil Babka wrote:
> Looks like they already closed it wontfix, because the project is dead.
> Kinda what I expected.
Which rather begs the question: why do we need mockobjects to emerge groovy?
>
> > ------------------------------------------------------------------------
> >
> > --- AssertMo.java 2007-01-07 17:33:53.000000000 +0100
> > +++ AssertMo.java.orig 2007-01-07 17:35:10.000000000 +0100
>
> You made the patch the other way around, do it like "diff -u file.orig
> file". Also, to be directly usable in the ebuild, it must contain full
> path relative to WORKDIR (which is usually inside the directory you get
> after unpacking the sources). So, in this case it's "diff -u
> src/core/com/.../....orig src/core/com/.../...java"
Yes, I think I just ran into that problem, as I was playing around with making
an ebuild myself (learning how to patch). I wanted a fix so I can install
groovy, and had put it in an overlay dir.
Thanks for the tips, though, as it now works. I have attached a working
patch...
Cheers,
David
--
----
http://www.motogpmatters.com/ - MotoGP News and Race Reports
[-- Attachment #2: assert.patch --]
[-- Type: text/x-diff, Size: 423 bytes --]
--- src/core/com/mockobjects/util/AssertMo.java.orig 2007-01-07 17:35:10.000000000 +0100
+++ src/core/com/mockobjects/util/AssertMo.java 2007-01-07 17:33:53.000000000 +0100
@@ -77,7 +77,7 @@
assertTrue("Should not have verified", threwException);
}
- static protected void failNotEquals(
+ public static void failNotEquals(
String message,
Object expected,
Object actual) {
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-java] mockobjects-0.09-r1 won't build against junit-3.8.2
2007-01-07 17:14 ` David Emmett
@ 2007-01-07 17:25 ` Joshua Nichols
2007-01-07 17:40 ` David Emmett
0 siblings, 1 reply; 6+ messages in thread
From: Joshua Nichols @ 2007-01-07 17:25 UTC (permalink / raw
To: gentoo-java
David Emmett wrote:
> On Sunday 07 January 2007 18:01, Vlastimil Babka wrote:
>
>> Looks like they already closed it wontfix, because the project is dead.
>> Kinda what I expected.
>>
>
> Which rather begs the question: why do we need mockobjects to emerge groovy?
>
Because it really is a dependency of groovy. Groovy provides support for
using mock objects, see:
http://groovy.codehaus.org/Groovy+Mocks
A better question would be why doesn't upstream use a different
implementation of mock objects, that has a less dead upstream, like
jmock or easymock. Both of those have had releases in the past, whereas
mockobjects hasn't had a release since 2003.
--
Joshua Nichols
Gentoo/Java Project Lead
--
gentoo-java@gentoo.org mailing list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-java] mockobjects-0.09-r1 won't build against junit-3.8.2
2007-01-07 17:25 ` Joshua Nichols
@ 2007-01-07 17:40 ` David Emmett
0 siblings, 0 replies; 6+ messages in thread
From: David Emmett @ 2007-01-07 17:40 UTC (permalink / raw
To: gentoo-java; +Cc: Joshua Nichols
On Sunday 07 January 2007 18:25, Joshua Nichols wrote:
>
> A better question would be why doesn't upstream use a different
> implementation of mock objects, that has a less dead upstream, like
> jmock or easymock. Both of those have had releases in the past, whereas
> mockobjects hasn't had a release since 2003.
That _is_ a better question. I'll go file a bug with groovy....
Thanks for the suggestion!
David
--
----
http://www.motogpmatters.com/ - MotoGP News and Race Reports
--
gentoo-java@gentoo.org mailing list
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-01-07 17:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-07 16:24 [gentoo-java] mockobjects-0.09-r1 won't build against junit-3.8.2 David Emmett
2007-01-07 16:41 ` David Emmett
2007-01-07 17:01 ` Vlastimil Babka
2007-01-07 17:14 ` David Emmett
2007-01-07 17:25 ` Joshua Nichols
2007-01-07 17:40 ` David Emmett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox