You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tony Wu (JIRA)" <ji...@apache.org> on 2007/01/06 06:42:27 UTC

[jira] Created: (HARMONY-2943) [classlib][luni]SocketImpl.shutdownInput/Output leads to VM crash

[classlib][luni]SocketImpl.shutdownInput/Output leads to VM crash
-----------------------------------------------------------------

                 Key: HARMONY-2943
                 URL: https://issues.apache.org/jira/browse/HARMONY-2943
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Tony Wu


Following testcase throws IOException on RI whereas leads to vm crash on Harmony

public void test() throws IOException {
        MySocketImpl s = new MySocketImpl();
        s.test();
    }

    class MySocketImpl extends SocketImpl {
        public void test() throws IOException {
            shutdownInput();
        }

        @Override
        protected void accept(SocketImpl newSocket) throws IOException {
        }

        @Override
        protected int available() throws IOException {
            return 0;
        }

        @Override
        protected void bind(InetAddress address, int port) throws IOException {
        }

        @Override
        protected void close() throws IOException {
        }

        @Override
        protected void connect(String host, int port) throws IOException {
        }

        @Override
        protected void connect(InetAddress address, int port)
                throws IOException {
        }

        @Override
        protected void connect(SocketAddress remoteAddr, int timeout)
                throws IOException {
        }

        @Override
        protected void create(boolean isStreaming) throws IOException {
        }

        @Override
        protected InputStream getInputStream() throws IOException {
            return null;
        }

        @Override
        protected OutputStream getOutputStream() throws IOException {
            return null;
        }

        @Override
        protected void listen(int backlog) throws IOException {
        }

        @Override
        protected void sendUrgentData(int value) throws IOException {
        }

        public Object getOption(int optID) throws SocketException {
            return null;
        }

        public void setOption(int optID, Object val) throws SocketException {
        }
    }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-2943) [classlib][luni]SocketImpl.shutdownInput/Output leads to VM crash

Posted by "Tony Wu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tony Wu updated HARMONY-2943:
-----------------------------

    Patch Info: [Patch Available]

Thanks Sean, I have added the  "Patch Available" tag

> [classlib][luni]SocketImpl.shutdownInput/Output leads to VM crash
> -----------------------------------------------------------------
>
>                 Key: HARMONY-2943
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2943
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Tony Wu
>         Attachments: patch.diff
>
>
> Following testcase throws IOException on RI whereas leads to vm crash on Harmony
> public void test() throws IOException {
>         MySocketImpl s = new MySocketImpl();
>         s.test();
>     }
>     class MySocketImpl extends SocketImpl {
>         public void test() throws IOException {
>             shutdownInput();
>         }
>         @Override
>         protected void accept(SocketImpl newSocket) throws IOException {
>         }
>         @Override
>         protected int available() throws IOException {
>             return 0;
>         }
>         @Override
>         protected void bind(InetAddress address, int port) throws IOException {
>         }
>         @Override
>         protected void close() throws IOException {
>         }
>         @Override
>         protected void connect(String host, int port) throws IOException {
>         }
>         @Override
>         protected void connect(InetAddress address, int port)
>                 throws IOException {
>         }
>         @Override
>         protected void connect(SocketAddress remoteAddr, int timeout)
>                 throws IOException {
>         }
>         @Override
>         protected void create(boolean isStreaming) throws IOException {
>         }
>         @Override
>         protected InputStream getInputStream() throws IOException {
>             return null;
>         }
>         @Override
>         protected OutputStream getOutputStream() throws IOException {
>             return null;
>         }
>         @Override
>         protected void listen(int backlog) throws IOException {
>         }
>         @Override
>         protected void sendUrgentData(int value) throws IOException {
>         }
>         public Object getOption(int optID) throws SocketException {
>             return null;
>         }
>         public void setOption(int optID, Object val) throws SocketException {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-2943) [classlib][luni]SocketImpl.shutdownInput/Output leads to VM crash

Posted by "Sean Qiu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Qiu updated HARMONY-2943:
------------------------------

    Attachment: patch.diff

> [classlib][luni]SocketImpl.shutdownInput/Output leads to VM crash
> -----------------------------------------------------------------
>
>                 Key: HARMONY-2943
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2943
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Tony Wu
>         Attachments: patch.diff
>
>
> Following testcase throws IOException on RI whereas leads to vm crash on Harmony
> public void test() throws IOException {
>         MySocketImpl s = new MySocketImpl();
>         s.test();
>     }
>     class MySocketImpl extends SocketImpl {
>         public void test() throws IOException {
>             shutdownInput();
>         }
>         @Override
>         protected void accept(SocketImpl newSocket) throws IOException {
>         }
>         @Override
>         protected int available() throws IOException {
>             return 0;
>         }
>         @Override
>         protected void bind(InetAddress address, int port) throws IOException {
>         }
>         @Override
>         protected void close() throws IOException {
>         }
>         @Override
>         protected void connect(String host, int port) throws IOException {
>         }
>         @Override
>         protected void connect(InetAddress address, int port)
>                 throws IOException {
>         }
>         @Override
>         protected void connect(SocketAddress remoteAddr, int timeout)
>                 throws IOException {
>         }
>         @Override
>         protected void create(boolean isStreaming) throws IOException {
>         }
>         @Override
>         protected InputStream getInputStream() throws IOException {
>             return null;
>         }
>         @Override
>         protected OutputStream getOutputStream() throws IOException {
>             return null;
>         }
>         @Override
>         protected void listen(int backlog) throws IOException {
>         }
>         @Override
>         protected void sendUrgentData(int value) throws IOException {
>         }
>         public Object getOption(int optID) throws SocketException {
>             return null;
>         }
>         public void setOption(int optID, Object val) throws SocketException {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-2943) [classlib][luni]SocketImpl.shutdownInput/Output leads to VM crash

Posted by "Tony Wu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463219 ] 

Tony Wu commented on HARMONY-2943:
----------------------------------

verified at r494348, thanks Tim.

> [classlib][luni]SocketImpl.shutdownInput/Output leads to VM crash
> -----------------------------------------------------------------
>
>                 Key: HARMONY-2943
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2943
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Tony Wu
>         Assigned To: Tim Ellison
>         Attachments: patch.diff
>
>
> Following testcase throws IOException on RI whereas leads to vm crash on Harmony
> public void test() throws IOException {
>         MySocketImpl s = new MySocketImpl();
>         s.test();
>     }
>     class MySocketImpl extends SocketImpl {
>         public void test() throws IOException {
>             shutdownInput();
>         }
>         @Override
>         protected void accept(SocketImpl newSocket) throws IOException {
>         }
>         @Override
>         protected int available() throws IOException {
>             return 0;
>         }
>         @Override
>         protected void bind(InetAddress address, int port) throws IOException {
>         }
>         @Override
>         protected void close() throws IOException {
>         }
>         @Override
>         protected void connect(String host, int port) throws IOException {
>         }
>         @Override
>         protected void connect(InetAddress address, int port)
>                 throws IOException {
>         }
>         @Override
>         protected void connect(SocketAddress remoteAddr, int timeout)
>                 throws IOException {
>         }
>         @Override
>         protected void create(boolean isStreaming) throws IOException {
>         }
>         @Override
>         protected InputStream getInputStream() throws IOException {
>             return null;
>         }
>         @Override
>         protected OutputStream getOutputStream() throws IOException {
>             return null;
>         }
>         @Override
>         protected void listen(int backlog) throws IOException {
>         }
>         @Override
>         protected void sendUrgentData(int value) throws IOException {
>         }
>         public Object getOption(int optID) throws SocketException {
>             return null;
>         }
>         public void setOption(int optID, Object val) throws SocketException {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (HARMONY-2943) [classlib][luni]SocketImpl.shutdownInput/Output leads to VM crash

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Ellison reassigned HARMONY-2943:
------------------------------------

    Assignee: Tim Ellison

> [classlib][luni]SocketImpl.shutdownInput/Output leads to VM crash
> -----------------------------------------------------------------
>
>                 Key: HARMONY-2943
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2943
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Tony Wu
>         Assigned To: Tim Ellison
>         Attachments: patch.diff
>
>
> Following testcase throws IOException on RI whereas leads to vm crash on Harmony
> public void test() throws IOException {
>         MySocketImpl s = new MySocketImpl();
>         s.test();
>     }
>     class MySocketImpl extends SocketImpl {
>         public void test() throws IOException {
>             shutdownInput();
>         }
>         @Override
>         protected void accept(SocketImpl newSocket) throws IOException {
>         }
>         @Override
>         protected int available() throws IOException {
>             return 0;
>         }
>         @Override
>         protected void bind(InetAddress address, int port) throws IOException {
>         }
>         @Override
>         protected void close() throws IOException {
>         }
>         @Override
>         protected void connect(String host, int port) throws IOException {
>         }
>         @Override
>         protected void connect(InetAddress address, int port)
>                 throws IOException {
>         }
>         @Override
>         protected void connect(SocketAddress remoteAddr, int timeout)
>                 throws IOException {
>         }
>         @Override
>         protected void create(boolean isStreaming) throws IOException {
>         }
>         @Override
>         protected InputStream getInputStream() throws IOException {
>             return null;
>         }
>         @Override
>         protected OutputStream getOutputStream() throws IOException {
>             return null;
>         }
>         @Override
>         protected void listen(int backlog) throws IOException {
>         }
>         @Override
>         protected void sendUrgentData(int value) throws IOException {
>         }
>         public Object getOption(int optID) throws SocketException {
>             return null;
>         }
>         public void setOption(int optID, Object val) throws SocketException {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-2943) [classlib][luni]SocketImpl.shutdownInput/Output leads to VM crash

Posted by "Sean Qiu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462969 ] 

Sean Qiu commented on HARMONY-2943:
-----------------------------------

Patch available, would you please try it, thanks a lot!

> [classlib][luni]SocketImpl.shutdownInput/Output leads to VM crash
> -----------------------------------------------------------------
>
>                 Key: HARMONY-2943
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2943
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Tony Wu
>         Attachments: patch.diff
>
>
> Following testcase throws IOException on RI whereas leads to vm crash on Harmony
> public void test() throws IOException {
>         MySocketImpl s = new MySocketImpl();
>         s.test();
>     }
>     class MySocketImpl extends SocketImpl {
>         public void test() throws IOException {
>             shutdownInput();
>         }
>         @Override
>         protected void accept(SocketImpl newSocket) throws IOException {
>         }
>         @Override
>         protected int available() throws IOException {
>             return 0;
>         }
>         @Override
>         protected void bind(InetAddress address, int port) throws IOException {
>         }
>         @Override
>         protected void close() throws IOException {
>         }
>         @Override
>         protected void connect(String host, int port) throws IOException {
>         }
>         @Override
>         protected void connect(InetAddress address, int port)
>                 throws IOException {
>         }
>         @Override
>         protected void connect(SocketAddress remoteAddr, int timeout)
>                 throws IOException {
>         }
>         @Override
>         protected void create(boolean isStreaming) throws IOException {
>         }
>         @Override
>         protected InputStream getInputStream() throws IOException {
>             return null;
>         }
>         @Override
>         protected OutputStream getOutputStream() throws IOException {
>             return null;
>         }
>         @Override
>         protected void listen(int backlog) throws IOException {
>         }
>         @Override
>         protected void sendUrgentData(int value) throws IOException {
>         }
>         public Object getOption(int optID) throws SocketException {
>             return null;
>         }
>         public void setOption(int optID, Object val) throws SocketException {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] Commented: (HARMONY-2943) [classlib][luni]SocketImpl.shutdownInput/Output leads to VM crash

Posted by Tim Ellison <t....@gmail.com>.
Thanks for the explanation Tony.  I'm surprised that the RI would throw
an exception with a 'Method not implemented' message -- I guess that is
a form of assertion to ensure the type is subclassed.

We can do the same thing, but I'll add a comment in the code to show
that it is not a case of Harmony falling behind.

Thanks
Tim


Tony Wu (JIRA) wrote:
>     [ https://issues.apache.org/jira/browse/HARMONY-2943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463058 ] 
> 
> Tony Wu commented on HARMONY-2943:
> ----------------------------------
> 
> Yes Tim, you are right. 
> I think the functionality was implemented redundantly and it will leads vm to crash if user extends the class without overriding these methods.
> I mocked a SockImpl and did a test on RI, it threw following exception,
> 
> java.io.IOException: Method not implemented!
> 	at java.net.SocketImpl.shutdownInput(SocketImpl.java:177)
> 
>> [classlib][luni]SocketImpl.shutdownInput/Output leads to VM crash
>> -----------------------------------------------------------------
>>
>>                 Key: HARMONY-2943
>>                 URL: https://issues.apache.org/jira/browse/HARMONY-2943
>>             Project: Harmony
>>          Issue Type: Bug
>>          Components: Classlib
>>            Reporter: Tony Wu
>>         Attachments: patch.diff
>>
>>
>> Following testcase throws IOException on RI whereas leads to vm crash on Harmony
>> public void test() throws IOException {
>>         MySocketImpl s = new MySocketImpl();
>>         s.test();
>>     }
>>     class MySocketImpl extends SocketImpl {
>>         public void test() throws IOException {
>>             shutdownInput();
>>         }
>>         @Override
>>         protected void accept(SocketImpl newSocket) throws IOException {
>>         }
>>         @Override
>>         protected int available() throws IOException {
>>             return 0;
>>         }
>>         @Override
>>         protected void bind(InetAddress address, int port) throws IOException {
>>         }
>>         @Override
>>         protected void close() throws IOException {
>>         }
>>         @Override
>>         protected void connect(String host, int port) throws IOException {
>>         }
>>         @Override
>>         protected void connect(InetAddress address, int port)
>>                 throws IOException {
>>         }
>>         @Override
>>         protected void connect(SocketAddress remoteAddr, int timeout)
>>                 throws IOException {
>>         }
>>         @Override
>>         protected void create(boolean isStreaming) throws IOException {
>>         }
>>         @Override
>>         protected InputStream getInputStream() throws IOException {
>>             return null;
>>         }
>>         @Override
>>         protected OutputStream getOutputStream() throws IOException {
>>             return null;
>>         }
>>         @Override
>>         protected void listen(int backlog) throws IOException {
>>         }
>>         @Override
>>         protected void sendUrgentData(int value) throws IOException {
>>         }
>>         public Object getOption(int optID) throws SocketException {
>>             return null;
>>         }
>>         public void setOption(int optID, Object val) throws SocketException {
>>         }
>>     }
> 

[jira] Commented: (HARMONY-2943) [classlib][luni]SocketImpl.shutdownInput/Output leads to VM crash

Posted by "Tony Wu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463058 ] 

Tony Wu commented on HARMONY-2943:
----------------------------------

Yes Tim, you are right. 
I think the functionality was implemented redundantly and it will leads vm to crash if user extends the class without overriding these methods.
I mocked a SockImpl and did a test on RI, it threw following exception,

java.io.IOException: Method not implemented!
	at java.net.SocketImpl.shutdownInput(SocketImpl.java:177)

> [classlib][luni]SocketImpl.shutdownInput/Output leads to VM crash
> -----------------------------------------------------------------
>
>                 Key: HARMONY-2943
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2943
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Tony Wu
>         Attachments: patch.diff
>
>
> Following testcase throws IOException on RI whereas leads to vm crash on Harmony
> public void test() throws IOException {
>         MySocketImpl s = new MySocketImpl();
>         s.test();
>     }
>     class MySocketImpl extends SocketImpl {
>         public void test() throws IOException {
>             shutdownInput();
>         }
>         @Override
>         protected void accept(SocketImpl newSocket) throws IOException {
>         }
>         @Override
>         protected int available() throws IOException {
>             return 0;
>         }
>         @Override
>         protected void bind(InetAddress address, int port) throws IOException {
>         }
>         @Override
>         protected void close() throws IOException {
>         }
>         @Override
>         protected void connect(String host, int port) throws IOException {
>         }
>         @Override
>         protected void connect(InetAddress address, int port)
>                 throws IOException {
>         }
>         @Override
>         protected void connect(SocketAddress remoteAddr, int timeout)
>                 throws IOException {
>         }
>         @Override
>         protected void create(boolean isStreaming) throws IOException {
>         }
>         @Override
>         protected InputStream getInputStream() throws IOException {
>             return null;
>         }
>         @Override
>         protected OutputStream getOutputStream() throws IOException {
>             return null;
>         }
>         @Override
>         protected void listen(int backlog) throws IOException {
>         }
>         @Override
>         protected void sendUrgentData(int value) throws IOException {
>         }
>         public Object getOption(int optID) throws SocketException {
>             return null;
>         }
>         public void setOption(int optID, Object val) throws SocketException {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-2943) [classlib][luni]SocketImpl.shutdownInput/Output leads to VM crash

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463028 ] 

Tim Ellison commented on HARMONY-2943:
--------------------------------------

I'm confused by this patch -- it seems to replace some functionality with code that always throws an IOException.  Am I missing something?

> [classlib][luni]SocketImpl.shutdownInput/Output leads to VM crash
> -----------------------------------------------------------------
>
>                 Key: HARMONY-2943
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2943
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Tony Wu
>         Attachments: patch.diff
>
>
> Following testcase throws IOException on RI whereas leads to vm crash on Harmony
> public void test() throws IOException {
>         MySocketImpl s = new MySocketImpl();
>         s.test();
>     }
>     class MySocketImpl extends SocketImpl {
>         public void test() throws IOException {
>             shutdownInput();
>         }
>         @Override
>         protected void accept(SocketImpl newSocket) throws IOException {
>         }
>         @Override
>         protected int available() throws IOException {
>             return 0;
>         }
>         @Override
>         protected void bind(InetAddress address, int port) throws IOException {
>         }
>         @Override
>         protected void close() throws IOException {
>         }
>         @Override
>         protected void connect(String host, int port) throws IOException {
>         }
>         @Override
>         protected void connect(InetAddress address, int port)
>                 throws IOException {
>         }
>         @Override
>         protected void connect(SocketAddress remoteAddr, int timeout)
>                 throws IOException {
>         }
>         @Override
>         protected void create(boolean isStreaming) throws IOException {
>         }
>         @Override
>         protected InputStream getInputStream() throws IOException {
>             return null;
>         }
>         @Override
>         protected OutputStream getOutputStream() throws IOException {
>             return null;
>         }
>         @Override
>         protected void listen(int backlog) throws IOException {
>         }
>         @Override
>         protected void sendUrgentData(int value) throws IOException {
>         }
>         public Object getOption(int optID) throws SocketException {
>             return null;
>         }
>         public void setOption(int optID, Object val) throws SocketException {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (HARMONY-2943) [classlib][luni]SocketImpl.shutdownInput/Output leads to VM crash

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Ellison closed HARMONY-2943.
--------------------------------


Verified by Tony.


> [classlib][luni]SocketImpl.shutdownInput/Output leads to VM crash
> -----------------------------------------------------------------
>
>                 Key: HARMONY-2943
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2943
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Tony Wu
>         Assigned To: Tim Ellison
>         Attachments: patch.diff
>
>
> Following testcase throws IOException on RI whereas leads to vm crash on Harmony
> public void test() throws IOException {
>         MySocketImpl s = new MySocketImpl();
>         s.test();
>     }
>     class MySocketImpl extends SocketImpl {
>         public void test() throws IOException {
>             shutdownInput();
>         }
>         @Override
>         protected void accept(SocketImpl newSocket) throws IOException {
>         }
>         @Override
>         protected int available() throws IOException {
>             return 0;
>         }
>         @Override
>         protected void bind(InetAddress address, int port) throws IOException {
>         }
>         @Override
>         protected void close() throws IOException {
>         }
>         @Override
>         protected void connect(String host, int port) throws IOException {
>         }
>         @Override
>         protected void connect(InetAddress address, int port)
>                 throws IOException {
>         }
>         @Override
>         protected void connect(SocketAddress remoteAddr, int timeout)
>                 throws IOException {
>         }
>         @Override
>         protected void create(boolean isStreaming) throws IOException {
>         }
>         @Override
>         protected InputStream getInputStream() throws IOException {
>             return null;
>         }
>         @Override
>         protected OutputStream getOutputStream() throws IOException {
>             return null;
>         }
>         @Override
>         protected void listen(int backlog) throws IOException {
>         }
>         @Override
>         protected void sendUrgentData(int value) throws IOException {
>         }
>         public Object getOption(int optID) throws SocketException {
>             return null;
>         }
>         public void setOption(int optID, Object val) throws SocketException {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (HARMONY-2943) [classlib][luni]SocketImpl.shutdownInput/Output leads to VM crash

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Ellison resolved HARMONY-2943.
----------------------------------

    Resolution: Fixed

Thanks Sean / Tony.

I applied a modified version of your patch to LUNI module at repo revision r494145.
I enhanced the comments and chose a message that does not imply we need to implement these methods.

Please check that this resolves the issue.


> [classlib][luni]SocketImpl.shutdownInput/Output leads to VM crash
> -----------------------------------------------------------------
>
>                 Key: HARMONY-2943
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2943
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Tony Wu
>         Assigned To: Tim Ellison
>         Attachments: patch.diff
>
>
> Following testcase throws IOException on RI whereas leads to vm crash on Harmony
> public void test() throws IOException {
>         MySocketImpl s = new MySocketImpl();
>         s.test();
>     }
>     class MySocketImpl extends SocketImpl {
>         public void test() throws IOException {
>             shutdownInput();
>         }
>         @Override
>         protected void accept(SocketImpl newSocket) throws IOException {
>         }
>         @Override
>         protected int available() throws IOException {
>             return 0;
>         }
>         @Override
>         protected void bind(InetAddress address, int port) throws IOException {
>         }
>         @Override
>         protected void close() throws IOException {
>         }
>         @Override
>         protected void connect(String host, int port) throws IOException {
>         }
>         @Override
>         protected void connect(InetAddress address, int port)
>                 throws IOException {
>         }
>         @Override
>         protected void connect(SocketAddress remoteAddr, int timeout)
>                 throws IOException {
>         }
>         @Override
>         protected void create(boolean isStreaming) throws IOException {
>         }
>         @Override
>         protected InputStream getInputStream() throws IOException {
>             return null;
>         }
>         @Override
>         protected OutputStream getOutputStream() throws IOException {
>             return null;
>         }
>         @Override
>         protected void listen(int backlog) throws IOException {
>         }
>         @Override
>         protected void sendUrgentData(int value) throws IOException {
>         }
>         public Object getOption(int optID) throws SocketException {
>             return null;
>         }
>         public void setOption(int optID, Object val) throws SocketException {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira