You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mark Hindess (JIRA)" <ji...@apache.org> on 2006/06/13 11:32:31 UTC

[jira] Closed: (HARMONY-497) [classlib][luni] java.net.MulticastSocket cannot be instantiated.

     [ http://issues.apache.org/jira/browse/HARMONY-497?page=all ]
     
Mark Hindess closed HARMONY-497:
--------------------------------


Verified by Dmitry.


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