harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitry M. Kononov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-497) [classlib][luni] java.net.MulticastSocket cannot be instantiated.
Date Tue, 13 Jun 2006 09:25:30 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-497?page=comments#action_12415974 ] 

Dmitry M. Kononov commented on HARMONY-497:
-------------------------------------------

The issue looks fixed. Thanks!

> [classlib][luni] java.net.MulticastSocket cannot be instantiated.
> -----------------------------------------------------------------
>
>          Key: HARMONY-497
>          URL: http://issues.apache.org/jira/browse/HARMONY-497
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Dmitry M. Kononov
>     Assignee: Mark Hindess
>  Attachments: Harmony497.diff
>
> There is no possibility to instantiate a java.net.MulticastSocket object.
> It looks like some code has not been updated after some refactoring.
> The following code
> ---
> public class MulticastSocketTest {
>     public static void main(String args[]) throws Exception {
>         new java.net.MulticastSocket();
>     }
> }
> ---
> throws the following exception
> ---
> java.net.SocketException: Unknown socket type
>     at java.net.MulticastSocket.createSocketImpl(MulticastSocket.java:633)
>     at java.net.MulticastSocket.createSocket(MulticastSocket.java:546)
>     at java.net.DatagramSocket.<init>(DatagramSocket.java:72)
>     at java.net.DatagramSocket.<init>(DatagramSocket.java:57)
>     at java.net.MulticastSocket.<init>(MulticastSocket.java:46)
>     at MulticastSocketTest.main(MulticastSocketTest.java:4)
> ---
> If you look at the MulticastSocket.createSocketImpl method you will see 
> that the java.net.PlainMulticastSocketImpl class is used to instantiate an object. There
is 
> no PlainMulticastSocketImpl class in the java.net package. It has been moved into the

> org.apache.harmony.luni.net package.
> Sadly, replacing the java.net package with the org.apache.harmony.luni.net one does not
solve the problem.
> The following exception still occurs.
> ---
> java.net.SocketException: Unknown socket type
>     at java.net.MulticastSocket.createSocketImpl(MulticastSocket.java:633)
>     at java.net.MulticastSocket.createSocket(MulticastSocket.java:546)
>     at java.net.DatagramSocket.<init>(DatagramSocket.java:72)
>     at java.net.DatagramSocket.<init>(DatagramSocket.java:57)
>     at java.net.MulticastSocket.<init>(MulticastSocket.java:46)
>     at MulticastSocketTest.main(MulticastSocketTest.java:4)
> Caused by: java.lang.IllegalAccessException
>     at java.lang.Class.newInstanceImpl(Native Method)
>     at java.lang.Class.newInstance(Class.java:1238)
>     at java.net.MulticastSocket.createSocketImpl(MulticastSocket.java:631)
>     ... 5 more
> ---

-- 
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


Mime
View raw message