activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r480416 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ListContainerImpl.java
Date Wed, 29 Nov 2006 05:36:43 GMT
Author: rajdavies
Date: Tue Nov 28 21:36:42 2006
New Revision: 480416

URL: http://svn.apache.org/viewvc?view=rev&rev=480416
Log:
ensure container is initialized before accessing

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ListContainerImpl.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ListContainerImpl.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ListContainerImpl.java?view=diff&rev=480416&r1=480415&r2=480416
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ListContainerImpl.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ListContainerImpl.java
Tue Nov 28 21:36:42 2006
@@ -689,6 +689,7 @@
      * @return the first StoreEntry or null if the list is empty
      */
     public synchronized StoreEntry getFirst(){
+        load();
         return indexList.getFirst();
     }
 
@@ -698,6 +699,7 @@
      * @return the last StoreEntry or null if the list is empty
      */
     public synchronized StoreEntry getLast(){
+        load();
         return indexList.getLast();
     }
 
@@ -708,6 +710,7 @@
      * @return the next StoreEntry or null
      */
     public synchronized StoreEntry getNext(StoreEntry entry){
+        load();
         IndexItem item=(IndexItem)entry;
         return indexList.getNextEntry(item);
     }
@@ -719,6 +722,7 @@
      * @return the previous store entry or null
      */
     public synchronized StoreEntry getPrevious(StoreEntry entry){
+        load();
         IndexItem item=(IndexItem)entry;
         return indexList.getPrevEntry(item);
     }
@@ -730,6 +734,7 @@
      * @return a refreshed StoreEntry
      */
     public synchronized StoreEntry refresh(StoreEntry entry) {
+        load();
         return indexList.getEntry(entry);
     }
 



Mime
View raw message