/[classpath]/classpath/java/net/URL.java
ViewVC logotype

Diff of /classpath/java/net/URL.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.36 by glavaux, Fri Aug 13 06:28:26 2004 UTC revision 1.37 by mkoch, Fri Sep 24 06:57:59 2004 UTC
# Line 407  public final class URL implements Serial Line 407  public final class URL implements Serial
407              host = context.host;              host = context.host;
408              port = context.port;              port = context.port;
409              file = context.file;              file = context.file;
410                userInfo = context.userInfo;
411              if (file == null || file.length() == 0)              if (file == null || file.length() == 0)
412                file = "/";                file = "/";
413              authority = context.authority;              authority = context.authority;
# Line 421  public final class URL implements Serial Line 422  public final class URL implements Serial
422          host = context.host;          host = context.host;
423          port = context.port;          port = context.port;
424          file = context.file;          file = context.file;
425            userInfo = context.userInfo;
426          if (file == null || file.length() == 0)          if (file == null || file.length() == 0)
427            file = "/";            file = "/";
428          authority = context.authority;          authority = context.authority;
# Line 622  public final class URL implements Serial Line 624  public final class URL implements Serial
624     */     */
625    public String getUserInfo()    public String getUserInfo()
626    {    {
627        if (userInfo != null)
628          return userInfo;
629      int at = (host == null) ? -1 : host.indexOf('@');      int at = (host == null) ? -1 : host.indexOf('@');
630      return at < 0 ? null : host.substring(0, at);      return at < 0 ? null : host.substring(0, at);
631    }    }

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26