wam         2002/09/27 04:08:03

  Modified:    src/share/org/apache/slide/search SlideUri.java
  Log:
  Bugzilla#: 12991
  
  Revision  Changes    Path
  1.7       +18 -14    jakarta-slide/src/share/org/apache/slide/search/SlideUri.java
  
  Index: SlideUri.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/SlideUri.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SlideUri.java     20 Aug 2002 11:51:50 -0000      1.6
  +++ SlideUri.java     27 Sep 2002 11:08:03 -0000      1.7
  @@ -88,9 +88,9 @@
               this.path = "";
           }
           else {
  -        this.context = getContextOfRelPath(requestUri);
  -        this.path = getPathOfRelPath(requestUri);
  -    }
  +            this.context = getContextOfRelPath(requestUri);
  +            this.path = getPathOfRelPath(requestUri);
  +        }
       }
       
       /**
  @@ -114,13 +114,17 @@
           
           StringBuffer sb = new StringBuffer ();
           if (relPath.startsWith("/")) {
  -            String relContext = getContextOfRelPath (relPath);
  -            if (!relContext.equals (context))
  -                throw new InvalidScopeException ("Uri \"" + relPath + "\" does not 
refer to " + context
  -                                                + ". If an absolute scope is used, 
it must start with \""
  -                                                + context + "\"");
               
  -            relPath = getPathOfRelPath (relPath);
  +            if (!context.equals ("")) {
  +                
  +                String relContext = getContextOfRelPath (relPath);
  +                if (!relContext.equals (context))
  +                    throw new InvalidScopeException ("Uri \"" + relPath + "\" does 
not refer to " + context
  +                                                         + ". If an absolute scope 
is used, it must start with \""
  +                                                         + context + "\"");
  +                
  +                relPath = getPathOfRelPath (relPath);
  +            }
           }
               
           else {
  @@ -128,7 +132,7 @@
               if (!path.endsWith("/"))
                   sb.append ("/");
           }
  -    
  +        
           sb.append (relPath);
           
           return sb.toString();
  @@ -187,7 +191,7 @@
           
           return result;
       }
  -   
  +    
       
       
       
  
  
  

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

Reply via email to