« Return to Thread: [jira] Created: (JMOCK-212) Compilation failure with JDK-1.5.17 (5.0u17)

[jira] Commented: (JMOCK-212) Compilation failure with JDK-1.5.17 (5.0u17)

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View in Thread


    [ http://jira.codehaus.org/browse/JMOCK-212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=171139#action_171139 ]

Nat Pryce commented on JMOCK-212:
---------------------------------

Oh crap!  Autoboxing won't work.  We rely on the overloads to return the correct zero/false value for primitives or null for reference types.  If we remove the overloads we'll get null pointer exceptions when specifying constraints on primitive typed parameters.

> Compilation failure with JDK-1.5.17 (5.0u17)
> --------------------------------------------
>
>                 Key: JMOCK-212
>                 URL: http://jira.codehaus.org/browse/JMOCK-212
>             Project: jMock
>          Issue Type: Bug
>          Components: Library
>    Affects Versions: Chore (ASAP)
>         Environment: Linux. java version "1.5.0_17"
>            Reporter: Tristan Mills
>
> JMock2 (latest from trunk and 2.6.0rc1) fails to compile with java 1.5.0_17, giving the error:
>     [javac] /home/tristan/Work/jmock2/src/org/jmock/syntax/ArgumentConstraintPhrases.java:13: name clash: with(org.hamcrest.Matcher<java.lang.Double>) and <T>with(org.hamcrest.Matcher<T>) have the same erasure
>     [javac]     double with(Matcher<Double> matcher);
> (only one instance shown for brevity)
> This seems to be due to a silent bug fix in the JDK :
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6182950
> Java should not take the return type into account for determining method signature, but previous versions did.
> I think it should  be safe to just remove the offending methods and rely on autounboxing in the return type as has to be done in the argument.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


 « Return to Thread: [jira] Created: (JMOCK-212) Compilation failure with JDK-1.5.17 (5.0u17)