ozeigermann    2003/12/03 08:01:07

  Modified:    src/share/org/apache/slide/store AbstractStore.java
  Log:
  Removed - actually harmless - reference to DefaultStore, as this has been deleted
  
  Revision  Changes    Path
  1.35      +30 -59    
jakarta-slide/src/share/org/apache/slide/store/AbstractStore.java
  
  Index: AbstractStore.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/share/org/apache/slide/store/AbstractStore.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- AbstractStore.java        1 Dec 2003 12:10:50 -0000       1.34
  +++ AbstractStore.java        3 Dec 2003 16:01:06 -0000       1.35
  @@ -103,19 +103,6 @@
       
       
       /**
  -     * Default store classname.
  -     */
  -    protected String defaultStore =
  -        "slidestore.reference.DefaultStore";
  -    
  -    
  -    /**
  -     * Default store instance.
  -     */
  -    protected Service defaultStoreInstance;
  -    
  -    
  -    /**
        * Node store.
        */
       protected NodeStore nodeStore;
  @@ -433,9 +420,10 @@
        * Set the node store associated with this store.
        */
       public void setNodeStore(NodeStore nodeStore) {
  -        this.nodeStore = (nodeStore != null) ?
  -            (nodeStore) :
  -            ((NodeStore) getDefaultStoreInstance());
  +        if (nodeStore == null) {
  +            throw new IllegalArgumentException("Nodestore must not be null");
  +        }
  +        this.nodeStore = nodeStore;
           addResourceManager(this.nodeStore);
       }
       
  @@ -444,9 +432,10 @@
        * Set the security store associated with this store.
        */
       public void setSecurityStore(SecurityStore securityStore) {
  -        this.securityStore = (securityStore != null) ?
  -            (securityStore) :
  -            ((SecurityStore) getDefaultStoreInstance());
  +        if (securityStore == null) {
  +            throw new IllegalArgumentException("Securitystore must not be null");
  +        }
  +        this.securityStore = securityStore;
           addResourceManager(this.securityStore);
       }
       
  @@ -455,9 +444,10 @@
        * Set the lock store associated with this store.
        */
       public void setLockStore(LockStore lockStore) {
  -        this.lockStore = (lockStore != null) ?
  -            (lockStore) :
  -            ((LockStore) getDefaultStoreInstance());
  +        if (lockStore == null) {
  +            throw new IllegalArgumentException("Lockstore must not be null");
  +        }
  +        this.lockStore = lockStore;
           addResourceManager(this.lockStore);
       }
       
  @@ -467,10 +457,11 @@
        */
       public void setRevisionDescriptorsStore
           (RevisionDescriptorsStore revisionDescriptorsStore) {
  -        this.revisionDescriptorsStore = (revisionDescriptorsStore != null) ?
  -            (revisionDescriptorsStore) :
  -            ((RevisionDescriptorsStore) getDefaultStoreInstance());
  -        addResourceManager(this.revisionDescriptorsStore);
  +            if (revisionDescriptorsStore == null) {
  +                throw new IllegalArgumentException("Revisiondescriptorsstore must 
not be null");
  +            }
  +            this.revisionDescriptorsStore = revisionDescriptorsStore;
  +            addResourceManager(this.revisionDescriptorsStore);
       }
       
       
  @@ -479,10 +470,11 @@
        */
       public void setRevisionDescriptorStore
           (RevisionDescriptorStore revisionDescriptorStore) {
  -        this.revisionDescriptorStore = (revisionDescriptorStore != null) ?
  -            (revisionDescriptorStore) :
  -            ((RevisionDescriptorStore) getDefaultStoreInstance());
  -        addResourceManager(this.revisionDescriptorStore);
  +            if (revisionDescriptorStore == null) {
  +                throw new IllegalArgumentException("Revisiondescriptorstore must 
not be null");
  +            }
  +            this.revisionDescriptorStore = revisionDescriptorStore;
  +            addResourceManager(this.revisionDescriptorStore);
       }
       
       
  @@ -490,9 +482,10 @@
        * Set the content store associated with this store.
        */
       public void setContentStore(ContentStore contentStore) {
  -        this.contentStore = (contentStore != null) ?
  -            (contentStore) :
  -            ((ContentStore) getDefaultStoreInstance());
  +        if (contentStore == null) {
  +            throw new IllegalArgumentException("Contentstore must not be null");
  +        }
  +        this.contentStore = contentStore;
           addResourceManager(this.contentStore);
       }
       
  @@ -1319,28 +1312,6 @@
               return false;
           
           return token.isForceStoreEnlistment();
  -        
  -    }
  -    
  -    
  -    /**
  -     * Return the default store instance.
  -     */
  -    protected Service getDefaultStoreInstance() {
  -        
  -        if (defaultStoreInstance != null)
  -            return defaultStoreInstance;
  -        
  -        try {
  -            defaultStoreInstance =
  -                (Service)Class.forName(defaultStore).newInstance();
  -            defaultStoreInstance.setParameters(this.parameters);
  -        } catch (Throwable t) {
  -            // Should never happen ...
  -            t.printStackTrace();
  -        }
  -        
  -        return defaultStoreInstance;
           
       }
       
  
  
  

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

Reply via email to