harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Zhang" <zhanghuang...@gmail.com>
Subject Re: [jira] Commented: (HARMONY-1462) [classlib][luni] SocketPermission does not accept '*' as a port number
Date Wed, 20 Sep 2006 05:11:32 GMT
On 9/19/06, Mikhail Markov (JIRA) <jira@apache.org> wrote:
>
>    [
> http://issues.apache.org/jira/browse/HARMONY-1462?page=comments#action_12435743]
>
> Mikhail Markov commented on HARMONY-1462:
> -----------------------------------------
>
> I absolutely agree that '*' should be supported as a port number.
> But API spec clearly says that: "portrange = portnumber | -portnumber |
> portnumber-[portnumber]" (but still RI supports it!) - that's why i put it
> to "Non-bug differences" category. Possible fix for API spec?


Ya, it seems an intended behaviour of RI. I suggest to follow RI for this
case.

> [classlib][luni] SocketPermission does not accept '*' as a port number
> > ----------------------------------------------------------------------
> >
> >                 Key: HARMONY-1462
> >                 URL: http://issues.apache.org/jira/browse/HARMONY-1462
> >             Project: Harmony
> >          Issue Type: Bug
> >          Components: Classlib
> >         Environment: Win XP
> >            Reporter: Mikhail Markov
> >         Assigned To: Paulex Yang
> >         Attachments: patch.diff
> >
> >
> > Although API specification does not explicitly allow '*' usage as a port
> number for SocketPermission, RI accept '*' as a port number (representing
> the full port range from 0 to 65535).
> > ============== Test.java =================
> > import java.net.SocketPermission;
> > public class Test {
> >     public static void main(String[] args) throws Exception {
> >         try {
> >             SocketPermission sp = new SocketPermission("localhost:*",
> "listen");
> >             System.out.println("'*' for port is ok.");
> >         } catch (IllegalArgumentException iae) {
> >             System.out.println("'*' for port is not ok: " + iae);
> >         }
> >     }
> > }
> > ======================================
> > Output on RI:
> > '*' for port is ok.
> > Output on Harmony:
> > '*' for port is not ok: java.lang.IllegalArgumentException: Invalid port
> number specified
>
> --
> 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
>
>
>


-- 
Andrew Zhang
China Software Development Lab, IBM

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message