Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 82630 invoked from network); 3 Sep 2009 13:13:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Sep 2009 13:13:20 -0000 Received: (qmail 72914 invoked by uid 500); 3 Sep 2009 13:13:20 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 72860 invoked by uid 500); 3 Sep 2009 13:13:20 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 72847 invoked by uid 99); 3 Sep 2009 13:13:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Sep 2009 13:13:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Sep 2009 13:13:18 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 291FC234C04C for ; Thu, 3 Sep 2009 06:12:58 -0700 (PDT) Message-ID: <1065199983.1251983578165.JavaMail.jira@brutus> Date: Thu, 3 Sep 2009 06:12:58 -0700 (PDT) From: "Catherine Hope (JIRA)" To: commits@harmony.apache.org Subject: [jira] Created: (HARMONY-6333) [classlib][luni] DatagramSocketImplTest fails to compile on RI due to method override differences MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [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 Priority: Minor 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.