cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From un...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/eventcache/java/org/apache/cocoon/caching/impl StoreEventRegistryImpl.java DefaultEventRegistryImpl.java
Date Fri, 27 Feb 2004 17:27:04 GMT
unico       2004/02/27 09:27:04

  Modified:    src/blocks/eventcache/java/org/apache/cocoon/caching/impl
                        StoreEventRegistryImpl.java
                        DefaultEventRegistryImpl.java
  Log:
  fix NPE on first use
  
  Revision  Changes    Path
  1.4       +2 -1      cocoon-2.1/src/blocks/eventcache/java/org/apache/cocoon/caching/impl/StoreEventRegistryImpl.java
  
  Index: StoreEventRegistryImpl.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/eventcache/java/org/apache/cocoon/caching/impl/StoreEventRegistryImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StoreEventRegistryImpl.java	7 Feb 2004 15:20:09 -0000	1.3
  +++ StoreEventRegistryImpl.java	27 Feb 2004 17:27:04 -0000	1.4
  @@ -113,6 +113,7 @@
   			return true;
   		} else {
   			getLogger().warn("Unable to recover Event Registry.");
  +            super.createBlankCache();
   			return false;
   		}
   	}
  
  
  
  1.10      +5 -3      cocoon-2.1/src/blocks/eventcache/java/org/apache/cocoon/caching/impl/DefaultEventRegistryImpl.java
  
  Index: DefaultEventRegistryImpl.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/eventcache/java/org/apache/cocoon/caching/impl/DefaultEventRegistryImpl.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DefaultEventRegistryImpl.java	10 Dec 2003 05:31:01 -0000	1.9
  +++ DefaultEventRegistryImpl.java	27 Feb 2004 17:27:04 -0000	1.10
  @@ -190,7 +190,9 @@
                       ctx.getRealPath("/WEB-INF"), 
                           DefaultEventRegistryImpl.PERSISTENT_FILE);
           if (m_persistentFile == null) {
  -            throw new ContextException("Could not obtain persistent file. " +         
      "The cache event registry cannot be " +                "used inside an unexpanded WAR
file.");
  +            throw new ContextException("Could not obtain persistent file. " +
  +                "The cache event registry cannot be " +
  +                "used inside an unexpanded WAR file.");
           }
   	}
   
  @@ -305,7 +307,7 @@
   	}
   
       // TODO: don't hardcode initial size
  -    private void createBlankCache() {
  +    protected final void createBlankCache() {
           this.m_eventMMap = new MultiHashMap(100); 
           this.m_keyMMap = new MultiHashMap(100); 
       }
  
  
  

Mime
View raw message