jericho     2002/09/09 03:56:37

  Modified:    src/util/org/apache/util URI.java
  Log:
  - Remove the only case support having one fragment part.
    Just treat it as a normal URI reference.
  
  Revision  Changes    Path
  1.17      +10 -20    jakarta-slide/src/util/org/apache/util/URI.java
  
  Index: URI.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/util/org/apache/util/URI.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- URI.java  4 Sep 2002 00:21:42 -0000       1.16
  +++ URI.java  9 Sep 2002 10:56:37 -0000       1.17
  @@ -371,12 +371,6 @@
               this.setUriReference();
               return;
           }
  -        if (relative._is_only_fragment) {
  -            this._fragment = relative._fragment;
  -            this._is_only_fragment = relative._is_only_fragment;
  -            this.setUriReference();
  -            return;
  -        }
           if (relative._scheme != null) {
               this._scheme = relative._scheme;
               this._is_net_path = relative._is_net_path;
  @@ -1354,7 +1348,7 @@
       protected boolean _is_IPv6reference;
       // query
       // fragment
  -    protected boolean _is_only_fragment;
  +    protected boolean _is_fragment;
   
       // ------------------------------------------ Character and escape encoding
       
  @@ -1768,12 +1762,8 @@
           if (0 <= at && at+1 < length && tmp.charAt(at) == '#') {
               _fragment = (escaped) ? tmp.substring(at + 1).toCharArray() :
               encode(tmp.substring(at + 1), allowed_fragment);
  -            if (!_is_abs_path && !_is_rel_path && !_is_opaque_part) {
  -                // correct validation.  possibly, only fragment.
  -                // is_relativeURI and is_absoluteURI must be false
  -                // Set flag
  -                _is_only_fragment = true;
  -            }
  +            // Set flag
  +            _is_fragment = true;
           }
   
           // set this URI.
  @@ -2020,7 +2010,7 @@
        * @return true iif this URI is absoluteURI
        */
       public boolean isAbsoluteURI() {
  -        return _is_only_fragment ? false : (_scheme != null);
  +        return (_scheme != null);
       }
     
   
  @@ -2030,7 +2020,7 @@
        * @return true iif this URI is relativeURI
        */
       public boolean isRelativeURI() {
  -        return _is_only_fragment ? false : (_scheme == null);
  +        return (_scheme == null);
       }
   
   
  @@ -3049,7 +3039,7 @@
           instance._is_hostname = _is_hostname;
           instance._is_IPv4address = _is_IPv4address;
           instance._is_IPv6reference = _is_IPv6reference;
  -        instance._is_only_fragment = _is_only_fragment;
  +        instance._is_fragment = _is_fragment;
   
           return instance;
       }
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to