harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Ellison (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HARMONY-6333) [classlib][luni] DatagramSocketImplTest fails to compile on RI due to method override differences
Date Thu, 03 Sep 2009 13:50:57 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-6333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tim Ellison resolved HARMONY-6333.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0M12

Thanks Catherine.

Patch applied to LUNI module at repo revision r810938.

I also removed @Override annotations from the PlainDatagramSocketImpl for the same reasons.

Please verify the changes.


> [classlib][luni] DatagramSocketImplTest fails to compile on RI due to method override
differences
> -------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6333
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6333
>             Project: Harmony
>          Issue Type: Bug
>         Environment: all
>            Reporter: Catherine Hope
>            Assignee: Tim Ellison
>            Priority: Minor
>             Fix For: 5.0M12
>
>         Attachments: 6333.patch
>
>
> Testcase org.apache.harmony.luni.tests.java.net.DatagramSocketImplTest fails to compile
on Sun or IBM java, with the error messages:
>   [javac] 1. ERROR in ../modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/DatagramSocketImplTest.java
>     [javac]  (at line 75)
>     [javac] 	public Object getOption(int optID) throws SocketException {
>     [javac] 	              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>     [javac] The method getOption(int) of type MockDatagramSocketImpl must override a
superclass method
>     [javac] ----------
>     [javac] 2. ERROR in ../modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/DatagramSocketImplTest.java
>     [javac]  (at line 133)
>     [javac] 	public void setOption(int optID, Object val) throws SocketException {
>     [javac] 	            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>     [javac] The method setOption(int, Object) of type MockDatagramSocketImpl must override
a superclass method
>     [javac] ----------
>     [javac] 2 problems (2 errors)
> The problem is that in the Harmony implementation the getOption and setOption method
signatures are copied from the SocketOptions interface into the implementing DatagramSocketImpl
class, which is abstract.  MockDatagramSocketImpl in the testcase extends this abstract class
and annotates the methods with "@Override".  However, the method signatures must not be copied
in the reference implementations, as the "@Override" annotation throws an error saying that
the methods aren't being overridden.  
> Removing the override annotations fixes the problem, but I think the method signatures
should be removed from java.net.DatagramSocketImpl

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message