You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by ju...@apache.org on 2002/03/06 10:46:43 UTC

cvs commit: jakarta-slide/src/share/org/apache/slide/common Uri.java

juergen     02/03/06 01:46:43

  Modified:    src/share/org/apache/slide/common Uri.java
  Log:
  fixed Nullpointer Exception in reconnectServices() and parseUri() (Eckehard)
  
  Revision  Changes    Path
  1.10      +15 -6     jakarta-slide/src/share/org/apache/slide/common/Uri.java
  
  Index: Uri.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/common/Uri.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Uri.java	5 Mar 2002 15:21:32 -0000	1.9
  +++ Uri.java	6 Mar 2002 09:46:43 -0000	1.10
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/common/Uri.java,v 1.9 2002/03/05 15:21:32 juergen Exp $
  - * $Revision: 1.9 $
  - * $Date: 2002/03/05 15:21:32 $
  + * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/common/Uri.java,v 1.10 2002/03/06 09:46:43 juergen Exp $
  + * $Revision: 1.10 $
  + * $Date: 2002/03/06 09:46:43 $
    *
    * ====================================================================
    *
  @@ -74,7 +74,7 @@
    * manipulated by Slide.
    *
    * @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
  - * @version $Revision: 1.9 $
  + * @version $Revision: 1.10 $
    */
   public final class Uri implements Cloneable, java.io.Serializable {
       
  @@ -259,7 +259,11 @@
        */
       public void reconnectServices() {
           try {
  -            store.connectIfNeeded(token.getCredentialsToken());
  +            if (token == null) {
  +                store.connectIfNeeded(null);
  +            } else {
  +                store.connectIfNeeded(token.getCredentialsToken());
  +            }
           } catch (ServiceConnectionFailedException e) {
               parseUri(this.uri);
           } catch (ServiceAccessException e) {
  @@ -362,7 +366,12 @@
           Scope courScope = scopes.nextScope();
           try {
                   if (store == null) {
  -            store = namespace.retrieveStore(courScope, token.getCredentialsToken());
  +                    if (token == null) {
  +                        store = namespace.retrieveStore(courScope, null);
  +                    } else {
  +                        store = namespace.retrieveStore(courScope, token.getCredentialsToken());
  +                    }
  +                    
                       if (store != null) {
                           scope = courScope;
                           // The PK in the current descriptorsStore is the
  
  
  

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