You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by je...@apache.org on 2002/09/22 21:21:59 UTC

cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient URI.java

jericho     2002/09/22 12:21:59

  Modified:    httpclient/src/java/org/apache/commons/httpclient URI.java
  Log:
  - Fix a wrong computation for the getRawName method.
  
  Revision  Changes    Path
  1.2       +6 -6      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/URI.java
  
  Index: URI.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/URI.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- URI.java	22 Sep 2002 05:19:50 -0000	1.1
  +++ URI.java	22 Sep 2002 19:21:59 -0000	1.2
  @@ -2622,15 +2622,15 @@
           if (_path == null) return null;
   
           int at = 0;
  -        for (int i = _path.length - 1; i >= 0 ; i--) {
  +        for (int i = _path.length - 1; i >= 0; i--) {
               if (_path[i] == '/') {
  -                at = i;
  +                at = i + 1;
                   break;
               }
           }
           int len = _path.length - at;
           char[] basename =  new char[len];
  -        System.arraycopy(_path, at + 1, basename, 0, len);
  +        System.arraycopy(_path, at, basename, 0, len);
           return basename;
       }
   
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>