Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 73358 invoked from network); 28 Aug 2006 06:20:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Aug 2006 06:20:42 -0000 Received: (qmail 17797 invoked by uid 500); 28 Aug 2006 06:20:41 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 17696 invoked by uid 500); 28 Aug 2006 06:20:40 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 17685 invoked by uid 99); 28 Aug 2006 06:20:40 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 Aug 2006 23:20:40 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 Aug 2006 23:20:40 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6CA1A41000C for ; Mon, 28 Aug 2006 06:17:25 +0000 (GMT) Message-ID: <4454443.1156745845442.JavaMail.jira@brutus> Date: Sun, 27 Aug 2006 23:17:25 -0700 (PDT) From: "Vladimir Ivanov (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Commented: (HARMONY-1235) [classlib][net] unexpected ClassCastException for ServerSocket.implAccept(Socket) In-Reply-To: <12346761.1156146133959.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/HARMONY-1235?page=comments#action_12430928 ] Vladimir Ivanov commented on HARMONY-1235: ------------------------------------------ verified, thanks > [classlib][net] unexpected ClassCastException for ServerSocket.implAccept(Socket) > --------------------------------------------------------------------------------- > > Key: HARMONY-1235 > URL: http://issues.apache.org/jira/browse/HARMONY-1235 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Vladimir Ivanov > Assigned To: Paulex Yang > Attachments: Harmony-1235-v2.diff, Harmony-1235.diff > > > The method ServerSocket().implAccept() throws unexpected ClassCastException on Harmony. > ===================== test.java ======================= > import java.net.*; > import java.io.*; > public class test { > public static void main (String[] args) throws Exception { > new testServerSocket().myimplAccept(new testSocket(new TestSocketImpl())); > } > } > class TestSocketImpl extends SocketImpl { > protected void create(boolean arg0) throws IOException {} > protected void connect(String arg0, int arg1) throws IOException {} > protected void connect(InetAddress arg0, int arg1) throws IOException {} > protected void connect(SocketAddress arg0, int arg1) throws IOException {} > protected void bind(InetAddress arg0, int arg1) throws IOException {} > protected void listen(int arg0) throws IOException {} > protected void accept(SocketImpl arg0) throws IOException {} > protected InputStream getInputStream() throws IOException {return null;} > protected OutputStream getOutputStream() throws IOException {return null;} > protected int available() throws IOException {return 0;} > protected void close() throws IOException {} > protected void sendUrgentData(int arg0) throws IOException {} > public void setOption(int arg0, Object arg1) throws SocketException {} > public Object getOption(int arg0) throws SocketException {return null;} > } > class testSocket extends Socket { > public testSocket(SocketImpl impl) throws SocketException { > super(impl); > } > } > class testServerSocket extends ServerSocket { > public testServerSocket() throws Exception { > super(); > } > public void myimplAccept(Socket s) throws Exception { > super.implAccept(s); > } > } > =================================================== > Output: > C:\tmp\tmp17>C:\jdk1.5.0_06\bin\java.exe -cp . -showversion test > java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode) > Exception in thread "main" java.net.SocketException: socket closed > at java.net.PlainSocketImpl.socketAccept(Native Method) > at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384) > at java.net.ServerSocket.implAccept(ServerSocket.java:450) > at testServerSocket.myimplAccept(test.java:37) > at test.main(test.java:6) > C:\tmp\tmp17>C:\jrockit-jdk1.5.0-windows-ia32\bin\java.exe -cp . -showversion test > java version "1.5.0" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64) > BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar)) > java.net.SocketException: Connection aborted by peer > at jrockit.net.SocketNativeIO.accept(ILjava.io.FileDescriptor;I)[B(Native Method) > at jrockit.net.SocketNativeIO.accept(Ljava.io.FileDescriptor;Ljava.io.FileDescriptor;I)Ljrockit.net.InetAddressCache;(Unknown Source) > at java.net.AbstractSocketImpl.accept(Ljava.net.SocketImpl;)V(Unknown Source) > at java.net.ServerSocket.implAccept(ServerSocket.java:450) > at testServerSocket.myimplAccept(test.java:37) > at test.main(test.java:6) > C:\tmp\tmp17>C:\harmony\classlib1.5\deploy\jdk\jre\bin\java.exe -cp . -showversion test > java version 1.5 (subset) > (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable. > Exception in thread "main" java.lang.ClassCastException: TestSocketImpl incompatible with org.apache.harmony.luni.net.PlainSocketImpl > at org.apache.harmony.luni.net.PlainSocketImpl.accept(PlainSocketImpl.java:94) > at java.net.ServerSocket.implAccept(ServerSocket.java:252) > at testServerSocket.myimplAccept(test.java:37) > at test.main(test.java:6) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira