Author: toad
Date: 2009-04-02 14:28:49 +0000 (Thu, 02 Apr 2009)
New Revision: 26347

Removed:
   trunk/contrib/db4o/src/db4oj/core/src/com/db4o/foundation/Listener.java
   
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/foundation/ListenerRegistry.java
   trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/reflect/
   
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/reflect/generic/GenericObjectBase.java
   
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/ta/ActivatableInstrumented.java
   trunk/contrib/db4o/src/db4ojdk1.2/core/src/com/db4o/reflect/generic/
   
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/db4ounit/common/migration/KnownClassesMigrationTestCase.java
   
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/db4ounit/jre12/assorted/UnavailableClassAsTreeSetElementTestCase.java
Modified:
   trunk/contrib/db4o/src/db4oj/core/src/com/db4o/Db4oVersion.java
   
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/ext/IncompatibleFileFormatException.java
   trunk/contrib/db4o/src/db4oj/core/src/com/db4o/foundation/Hashtable4.java
   trunk/contrib/db4o/src/db4oj/core/src/com/db4o/foundation/Iterators.java
   
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/foundation/SignatureGenerator.java
   
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/ClassMetadataRepository.java
   trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/FieldMetadata.java
   trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/ObjectReference.java
   
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/PartialObjectContainer.java
   
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/activation/LegacyActivationDepth.java
   
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/cs/ClientTransactionHandle.java
   
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/cs/ClientTransactionPool.java
   
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/cs/ObjectServerImpl.java
   
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/handlers/FirstClassObjectHandler.java
   
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/marshall/ClassMarshaller.java
   
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/marshall/MarshallerFamily.java
   trunk/contrib/db4o/src/db4oj/core/src/com/db4o/io/CachedIoAdapter.java
   trunk/contrib/db4o/src/db4oj/core/src/com/db4o/io/MemoryIoAdapter.java
   
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/reflect/generic/GenericClass.java
   
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/reflect/generic/GenericObject.java
   
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/reflect/generic/GenericReflector.java
   
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/reflect/generic/KnownClassesRepository.java
   
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/db4ounit/common/migration/Db4oMigrationTestSuite.java
   
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/db4ounit/jre12/assorted/AllTests.java
   
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/db4ounit/jre12/collections/HashMapUpdateFileSizeTestCase.java
   
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/test/CascadeToHashMap.java
   
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/test/util/ExcludingClassLoader.java
   trunk/contrib/db4o/src/db4ojdk5/core/src/com/db4o/collections/ArrayList4.java
   trunk/contrib/db4o/src/db4ojdk5/core/src/com/db4o/collections/ArrayMap4.java
   
trunk/contrib/db4o/src/db4ojdk5/core/src/com/db4o/collections/SubArrayList4.java
   
trunk/contrib/db4o/src/db4ojdk5/test/src/com/db4o/db4ounit/common/io/DiskFullTestCase.java
   
trunk/contrib/db4o/src/db4ojdk5/test/src/com/db4o/db4ounit/common/io/DiskFullTestCaseBase.java
   
trunk/contrib/db4o/src/db4ojdk5/test/src/com/db4o/db4ounit/common/io/StackBasedDiskFullTestCase.java
Log:
Revert updates to db4o, at least for this ext.jar. Sadly the older version 
seems more stable.


Modified: trunk/contrib/db4o/src/db4oj/core/src/com/db4o/Db4oVersion.java
===================================================================
--- trunk/contrib/db4o/src/db4oj/core/src/com/db4o/Db4oVersion.java     
2009-04-02 14:18:44 UTC (rev 26346)
+++ trunk/contrib/db4o/src/db4oj/core/src/com/db4o/Db4oVersion.java     
2009-04-02 14:28:49 UTC (rev 26347)
@@ -24,9 +24,9 @@
 * @exclude
 */
 public class Db4oVersion {
-    public static final String NAME = "7.4.84.12673";
+    public static final String NAME = "7.4.63.11890";
     public static final int MAJOR = 7;
     public static final int MINOR = 4;
-    public static final int ITERATION = 84;
-    public static final int REVISION = 12673;
+    public static final int ITERATION = 63;
+    public static final int REVISION = 11890;
 }

Modified: 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/ext/IncompatibleFileFormatException.java
===================================================================
--- 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/ext/IncompatibleFileFormatException.java
     2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/ext/IncompatibleFileFormatException.java
     2009-04-02 14:28:49 UTC (rev 26347)
@@ -26,13 +26,5 @@
  * is not compatible with the applied configuration.
  */
 public class IncompatibleFileFormatException extends Db4oException {
-       
-       public IncompatibleFileFormatException(){
-               super();
-       }
-       
-       public IncompatibleFileFormatException(String message) {
-               super(message);
-       }
 
 }

Modified: 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/foundation/Hashtable4.java
===================================================================
--- trunk/contrib/db4o/src/db4oj/core/src/com/db4o/foundation/Hashtable4.java   
2009-04-02 14:18:44 UTC (rev 26346)
+++ trunk/contrib/db4o/src/db4oj/core/src/com/db4o/foundation/Hashtable4.java   
2009-04-02 14:28:49 UTC (rev 26347)
@@ -315,15 +315,10 @@
        }
 
        private void reposition(HashtableIntEntry entry) {
-        HashtableIntEntry currentEntry = entry; 
-        HashtableIntEntry nextEntry = null; 
-        while (currentEntry != null) 
-        { 
-            nextEntry = currentEntry._next; 
-            currentEntry._next = _table[entryIndex(currentEntry)]; 
-            _table[entryIndex(currentEntry)] = currentEntry; 
-            currentEntry = nextEntry; 
-        } 
-       }
-       
+               if (entry != null) {
+                       reposition(entry._next);
+                       entry._next = _table[entryIndex(entry)];
+                       _table[entryIndex(entry)] = entry;
+               }
+       }               
 }

Modified: 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/foundation/Iterators.java
===================================================================
--- trunk/contrib/db4o/src/db4oj/core/src/com/db4o/foundation/Iterators.java    
2009-04-02 14:18:44 UTC (rev 26346)
+++ trunk/contrib/db4o/src/db4oj/core/src/com/db4o/foundation/Iterators.java    
2009-04-02 14:28:49 UTC (rev 26347)
@@ -24,8 +24,6 @@
  * Iterator primitives (concat, map, reduce, filter, etc...).
  * 
  * @exclude
- * 
- * @sharpen.partial
  */
 public class Iterators {
        
@@ -45,7 +43,7 @@
                }
 
                public void reset() {
-                       // do nothing
+                       throw new NotImplementedException();
                }
        };
        
@@ -264,10 +262,5 @@
                                return iterator;
                        }
                };
-       }
-       
-       public static Iterator4 copy(final Iterator4 iterator) {
-               return new Collection4(iterator).iterator();
-       }
-
+       }       
 }

Deleted: trunk/contrib/db4o/src/db4oj/core/src/com/db4o/foundation/Listener.java
===================================================================
--- trunk/contrib/db4o/src/db4oj/core/src/com/db4o/foundation/Listener.java     
2009-04-02 14:18:44 UTC (rev 26346)
+++ trunk/contrib/db4o/src/db4oj/core/src/com/db4o/foundation/Listener.java     
2009-04-02 14:28:49 UTC (rev 26347)
@@ -1,30 +0,0 @@
-/* Copyright (C) 2004 - 2008  db4objects Inc.  http://www.db4o.com
-
-This file is part of the db4o open source object database.
-
-db4o is free software; you can redistribute it and/or modify it under
-the terms of version 2 of the GNU General Public License as published
-by the Free Software Foundation and as clarified by db4objects' GPL 
-interpretation policy, available at
-http://www.db4o.com/about/company/legalpolicies/gplinterpretation/
-Alternatively you can write to db4objects, Inc., 1900 S Norfolk Street,
-Suite 350, San Mateo, CA 94403, USA.
-
-db4o is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. */
-package com.db4o.foundation;
-
-/**
- * @exclude
- */
-public interface Listener {
-       
-       public void onEvent(Object event);
-
-}

Deleted: 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/foundation/ListenerRegistry.java
===================================================================
--- 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/foundation/ListenerRegistry.java 
    2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/foundation/ListenerRegistry.java 
    2009-04-02 14:28:49 UTC (rev 26347)
@@ -1,62 +0,0 @@
-/* Copyright (C) 2004 - 2008  db4objects Inc.  http://www.db4o.com
-
-This file is part of the db4o open source object database.
-
-db4o is free software; you can redistribute it and/or modify it under
-the terms of version 2 of the GNU General Public License as published
-by the Free Software Foundation and as clarified by db4objects' GPL 
-interpretation policy, available at
-http://www.db4o.com/about/company/legalpolicies/gplinterpretation/
-Alternatively you can write to db4objects, Inc., 1900 S Norfolk Street,
-Suite 350, San Mateo, CA 94403, USA.
-
-db4o is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. */
-package com.db4o.foundation;
-
-
-/**
- * @exclude
- */
-public class ListenerRegistry {
-       
-       public static ListenerRegistry newInstance() {
-               return new ListenerRegistry();
-       }
-
-       private Collection4 _listeners;
-       
-       public void register(Listener listener){
-               if(_listeners == null){
-                       _listeners = new Collection4();
-               }               
-               if (_listeners.containsByIdentity(listener)) {                  
-                       return;
-               }
-               
-               _listeners.add(listener);
-       }
-       
-       public void notifyListeners(Object event){
-               if(_listeners == null){
-                       return;
-               }
-               Iterator4 i = _listeners.iterator();
-               while(i.moveNext()){
-                       ((Listener)i.current()).onEvent(event);
-               }
-       }
-
-       public void remove(Listener listener) {
-               if (_listeners == null) {
-                       return;
-               }               
-               _listeners.remove(listener);                    
-       }
-}

Modified: 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/foundation/SignatureGenerator.java
===================================================================
--- 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/foundation/SignatureGenerator.java
   2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/foundation/SignatureGenerator.java
   2009-04-02 14:28:49 UTC (rev 26347)
@@ -52,7 +52,7 @@
                }
                sb.append(Integer.toHexString(hostAddress));
                sb.append(Long.toHexString(System.currentTimeMillis()));
-               sb.append(pad(Integer.toHexString(randomInt())));
+               sb.append(Integer.toHexString(randomInt()));
                sb.append(Integer.toHexString(_counter++));
                return sb.toString();
        }
@@ -60,9 +60,5 @@
        private static int randomInt() {
                return _random.nextInt();
        }
-       
-       private static String pad(String str){
-               return (str + "XXXXXXXX").substring(0, 8);
-       }
 
 }

Modified: 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/ClassMetadataRepository.java
===================================================================
--- 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/ClassMetadataRepository.java
        2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/ClassMetadataRepository.java
        2009-04-02 14:28:49 UTC (rev 26347)
@@ -479,14 +479,6 @@
             clazz.refresh();
         }
     }
-    
-    public void checkAllClassChanges(){
-       Iterator4 i = _classMetadataByID.keys();
-       while(i.moveNext()){
-               int classMetadataID = ((Integer)i.current()).intValue();
-               getClassMetadata(classMetadataID);
-       }
-    }
 
        public void refreshClass(ClassMetadata clazz) {
                if (_classMetadataByID.get(clazz.getID()) == null) {

Modified: 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/FieldMetadata.java
===================================================================
--- trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/FieldMetadata.java  
2009-04-02 14:18:44 UTC (rev 26346)
+++ trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/FieldMetadata.java  
2009-04-02 14:28:49 UTC (rev 26347)
@@ -484,10 +484,6 @@
         }
         try {
             removeIndexEntry(context);
-            if(isUpdate){
-               incrementOffset(context);
-               return;
-            }
             StatefulBuffer buffer = (StatefulBuffer) context.buffer();
             final DeleteContextImpl childContext = new 
DeleteContextImpl(context, getStoredType(), _config);
             context.slotFormat().doWithSlotIndirection(buffer, _handler, new 
Closure4() {

Modified: 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/ObjectReference.java
===================================================================
--- 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/ObjectReference.java    
    2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/ObjectReference.java    
    2009-04-02 14:28:49 UTC (rev 26347)
@@ -104,19 +104,14 @@
                        return;
                }
                _updateListener = new TransactionListener() {
-
-                       private Object _hardRef = getObject();
-
                        public void postRollback() {
                                resetListener();
-                               
transparentPersistence.rollback(transaction.objectContainer(), _hardRef);
-                               _hardRef = null;
+                               
transparentPersistence.rollback(transaction.objectContainer(), 
ObjectReference.this.getObject());
                        }
 
                        public void preCommit() {
                                resetListener();
-                               container().store(transaction, _hardRef);
-                               _hardRef = null;
+                               container().store(transaction, getObject());
                        }
                };
                transaction.addTransactionListener(_updateListener);

Modified: 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/PartialObjectContainer.java
===================================================================
--- 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/PartialObjectContainer.java
 2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/PartialObjectContainer.java
 2009-04-02 14:28:49 UTC (rev 26347)
@@ -772,7 +772,7 @@
             return queryAllObjects(trans);
         } 
         Query q = query(trans);
-        q.constrain(template).byExample();
+        q.constrain(template);
         return executeQuery((QQuery)q);
     }
     
@@ -795,12 +795,6 @@
             } catch(ArrayIndexOutOfBoundsException aiobe){
                completeTopLevelCall(new InvalidIDException(aiobe));
             } finally {
-               
-               // Never shut down for getById()
-               // There may be OutOfMemoryErrors or similar
-               // The user may want to catch and continue working.
-               _topLevelCallCompleted = true;
-
                endTopLevelCall();
             }
             // only to make the compiler happy

Modified: 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/activation/LegacyActivationDepth.java
===================================================================
--- 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/activation/LegacyActivationDepth.java
       2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/activation/LegacyActivationDepth.java
       2009-04-02 14:28:49 UTC (rev 26347)
@@ -42,7 +42,7 @@
 
        public ActivationDepth descend(ClassMetadata metadata) {
                if (null == metadata) {
-                       return new LegacyActivationDepth(_depth -1 , _mode);
+                       throw new ArgumentNullException();
                }
                return new LegacyActivationDepth(descendDepth(metadata), _mode);
        }

Modified: 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/cs/ClientTransactionHandle.java
===================================================================
--- 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/cs/ClientTransactionHandle.java
     2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/cs/ClientTransactionHandle.java
     2009-04-02 14:28:49 UTC (rev 26347)
@@ -51,7 +51,6 @@
     
     public void close() {
                if ((!_transactionPool.isClosed()) && (_mainTransaction != 
null)) {
-            _transactionPool.release(_mainTransaction, _rollbackOnClose);
             _mainTransaction.close(_rollbackOnClose);
         }
        }

Modified: 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/cs/ClientTransactionPool.java
===================================================================
--- 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/cs/ClientTransactionPool.java
       2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/cs/ClientTransactionPool.java
       2009-04-02 14:28:49 UTC (rev 26347)
@@ -85,9 +85,6 @@
                }
        }
 
-       public int openTransactionCount(){
-               return isClosed() ? 0 : _transaction2Container.size();
-       }
 
        public int openFileCount() {
                return isClosed() ? 0 : _fileName2Container.size();

Modified: 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/cs/ObjectServerImpl.java
===================================================================
--- 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/cs/ObjectServerImpl.java
    2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/cs/ObjectServerImpl.java
    2009-04-02 14:28:49 UTC (rev 26347)
@@ -77,8 +77,6 @@
                _container.setServer(true);     
                configureObjectServer();
                
-               _container.classCollection().checkAllClassChanges();
-               
                boolean ok = false;
                try {
                        ensureLoadStaticClass();

Modified: 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/handlers/FirstClassObjectHandler.java
===================================================================
--- 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/handlers/FirstClassObjectHandler.java
       2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/handlers/FirstClassObjectHandler.java
       2009-04-02 14:28:49 UTC (rev 26347)
@@ -59,9 +59,6 @@
                     aspect.defragAspect(context);
                 } 
             }
-            public boolean accept(ClassAspect aspect) {
-               return aspect.enabled(context);
-            }
         };
         traverseAllAspects(context, command);
     }

Modified: 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/marshall/ClassMarshaller.java
===================================================================
--- 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/marshall/ClassMarshaller.java
       2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/marshall/ClassMarshaller.java
       2009-04-02 14:28:49 UTC (rev 26347)
@@ -151,7 +151,7 @@
                // ancestor ID
                context.copyID();
 
-               context.writeInt((classMetadata.hasClassIndex() ? 
indexIDForWriting(classIndexID) : 0));
+               context.writeInt(indexIDForWriting(classIndexID));
                
                final int aspectCount = context.readInt();
                

Modified: 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/marshall/MarshallerFamily.java
===================================================================
--- 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/marshall/MarshallerFamily.java
      2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/internal/marshall/MarshallerFamily.java
      2009-04-02 14:28:49 UTC (rev 26347)
@@ -20,7 +20,6 @@
 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. */
 package com.db4o.internal.marshall;
 
-import com.db4o.ext.*;
 import com.db4o.internal.*;
 import com.db4o.internal.convert.conversions.*;
 
@@ -121,15 +120,8 @@
     }
 
     public static MarshallerFamily version(int n) {
-       checkIfVersionIsTooNew(n);
         return allVersions[n];
     }
-    
-    private static void checkIfVersionIsTooNew(int n) {
-       if(n > allVersions.length){
-               throw new IncompatibleFileFormatException("Databasefile was 
created with a newer db4o version. Marshaller version: " + n);
-       }
-       }
 
     public static MarshallerFamily current() {
         if(CURRENT_VERSION < FamilyVersion.BTREE_FIELD_INDEXES){

Modified: trunk/contrib/db4o/src/db4oj/core/src/com/db4o/io/CachedIoAdapter.java
===================================================================
--- trunk/contrib/db4o/src/db4oj/core/src/com/db4o/io/CachedIoAdapter.java      
2009-04-02 14:18:44 UTC (rev 26346)
+++ trunk/contrib/db4o/src/db4oj/core/src/com/db4o/io/CachedIoAdapter.java      
2009-04-02 14:28:49 UTC (rev 26347)
@@ -389,7 +389,6 @@
        }
 
        private void writePageToDisk(Page page) throws Db4oIOException {
-               validateReadOnly();
            try{
                _io.write(page._buffer, page.size());
                _filePointer = page.endAddress();

Modified: trunk/contrib/db4o/src/db4oj/core/src/com/db4o/io/MemoryIoAdapter.java
===================================================================
--- trunk/contrib/db4o/src/db4oj/core/src/com/db4o/io/MemoryIoAdapter.java      
2009-04-02 14:18:44 UTC (rev 26346)
+++ trunk/contrib/db4o/src/db4oj/core/src/com/db4o/io/MemoryIoAdapter.java      
2009-04-02 14:28:49 UTC (rev 26347)
@@ -193,9 +193,8 @@
        public void write(byte[] buffer, int length) throws Db4oIOException {
                if (_seekPos + length > _bytes.length) {
                        int growBy = _growBy;
-                       int missing = _seekPos + length - _bytes.length;
-                       if (missing > growBy) {
-                               growBy = missing;
+                       if (_seekPos + length > growBy) {
+                               growBy = _seekPos + length;
                        }
                        byte[] temp = new byte[_bytes.length + growBy];
                        System.arraycopy(_bytes, 0, temp, 0, _length);

Modified: 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/reflect/generic/GenericClass.java
===================================================================
--- 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/reflect/generic/GenericClass.java
    2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/reflect/generic/GenericClass.java
    2009-04-02 14:28:49 UTC (rev 26347)
@@ -247,7 +247,7 @@
         if (!(candidate instanceof GenericObject)) {
                return false;
         }
-        return isAssignableFrom(((GenericObject)candidate).getGenericClass());
+        return isAssignableFrom(((GenericObject)candidate)._class);
     }
 
     public boolean isInterface() {

Modified: 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/reflect/generic/GenericObject.java
===================================================================
--- 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/reflect/generic/GenericObject.java
   2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/reflect/generic/GenericObject.java
   2009-04-02 14:28:49 UTC (rev 26347)
@@ -20,12 +20,49 @@
 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. */
 package com.db4o.reflect.generic;
 
+
 /**
  * @exclude
  */
-public class GenericObject extends GenericObjectBase {
+public class GenericObject {
 
+    final GenericClass _class;
+    
+    private Object[] _values;
+    
     public GenericObject(GenericClass clazz) {
-        super(clazz);
+        _class = clazz;
     }
+    
+    private void ensureValuesInitialized() {
+       if(_values == null) {
+               _values = new Object[_class.getFieldCount()];
+       }
+    }
+    
+    public void set(int index,Object value) {
+       ensureValuesInitialized();
+       _values[index]=value;
+    }
+
+       /**
+        *
+        * @param index
+        * @return the value of the field at index, based on the fields 
obtained GenericClass.getDeclaredFields
+        */
+       public Object get(int index) {
+       ensureValuesInitialized();
+       return _values[index];
+    }
+
+    public String toString(){
+        if(_class == null){
+            return super.toString();    
+        }
+        return _class.toString(this);
+    }
+
+       public GenericClass getGenericClass(){
+               return _class;
+       }
 }

Deleted: 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/reflect/generic/GenericObjectBase.java
===================================================================
--- 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/reflect/generic/GenericObjectBase.java
       2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/reflect/generic/GenericObjectBase.java
       2009-04-02 14:28:49 UTC (rev 26347)
@@ -1,68 +0,0 @@
-/* Copyright (C) 2004 - 2008  db4objects Inc.  http://www.db4o.com
-
-This file is part of the db4o open source object database.
-
-db4o is free software; you can redistribute it and/or modify it under
-the terms of version 2 of the GNU General Public License as published
-by the Free Software Foundation and as clarified by db4objects' GPL 
-interpretation policy, available at
-http://www.db4o.com/about/company/legalpolicies/gplinterpretation/
-Alternatively you can write to db4objects, Inc., 1900 S Norfolk Street,
-Suite 350, San Mateo, CA 94403, USA.
-
-db4o is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. */
-package com.db4o.reflect.generic;
-
-public class GenericObjectBase {
-
-       private final GenericClass _class;
-       private Object[] _values;
-
-       public GenericObjectBase(GenericClass clazz) {
-               _class = clazz;
-       }
-
-       private void ensureValuesInitialized() {
-               if(_values == null) {
-                       _values = new Object[_class.getFieldCount()];
-               }
-       }
-
-       public void set(int index, Object value) {
-               ensureValuesInitialized();
-               _values[index]=value;
-       }
-
-       /**
-        *
-        * @param index
-        * @return the value of the field at index, based on the fields 
obtained GenericClass.getDeclaredFields
-        */
-       public Object get(int index) {
-               ensureValuesInitialized();
-               return _values[index];
-       }
-
-       public String toString() {
-           if(_class == null){
-               return super.toString();    
-           }
-           return _class.toString(cast());
-       }
-
-       private GenericObject cast() {
-               return (GenericObject)this;
-       }
-
-       public GenericClass getGenericClass() {
-               return _class;
-       }
-
-}
\ No newline at end of file

Modified: 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/reflect/generic/GenericReflector.java
===================================================================
--- 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/reflect/generic/GenericReflector.java
        2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/reflect/generic/GenericReflector.java
        2009-04-02 14:28:49 UTC (rev 26347)
@@ -22,7 +22,6 @@
 
 import com.db4o.foundation.*;
 import com.db4o.internal.*;
-import com.db4o.internal.reflect.generic.*;
 import com.db4o.reflect.*;
 
 /**
@@ -254,7 +253,7 @@
     }
 
        private ReflectClass forGenericObject(final GenericObject 
genericObject) {
-               GenericClass claxx = genericObject.getGenericClass();
+               GenericClass claxx = genericObject._class;
                if(claxx == null){
                        throw new IllegalStateException(); 
                }
@@ -364,8 +363,25 @@
      * @return an array of classes known to the reflector
      */
        public ReflectClass[] knownClasses() {
-               return new KnownClassesCollector(_stream, 
_repository).collect();
+        Collection4 classes = new Collection4();
+               collectKnownClasses(classes);
+               return (ReflectClass[])classes.toArray(new 
ReflectClass[classes.size()]);
        }
+
+       private void collectKnownClasses(Collection4 classes) {
+               Iterator4 i = _repository.classes();
+               while(i.moveNext()){
+            GenericClass clazz = (GenericClass)i.current();
+            if(! _stream._handlers.ICLASS_INTERNAL.isAssignableFrom(clazz)){
+                ClassMetadata clazzMeta = 
_stream.classMetadataForReflectClass(clazz);
+                               if(clazzMeta == null || 
!clazzMeta.isSecondClass()){
+                                       if(! clazz.isArray()){
+                                               classes.add(clazz);
+                                       }
+                }
+            }
+               }
+       }
        
        /**
         * Registers primitive class

Modified: 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/reflect/generic/KnownClassesRepository.java
===================================================================
--- 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/reflect/generic/KnownClassesRepository.java
  2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/reflect/generic/KnownClassesRepository.java
  2009-04-02 14:28:49 UTC (rev 26347)
@@ -58,7 +58,6 @@
     private final Hashtable4 _classByID = new Hashtable4();
        private Collection4 _pendingClasses = new Collection4();
     private final Collection4 _classes = new Collection4();
-       private final ListenerRegistry _listeners = 
ListenerRegistry.newInstance();
 
     public KnownClassesRepository(ReflectClassBuilder builder) {
        _builder=builder;
@@ -72,16 +71,10 @@
        }
     
     public void register(ReflectClass clazz) {
-       register(clazz.getName(), clazz);
+       _classByName.put(clazz.getName(), clazz);
+               _classes.add(clazz);
     }
 
-       private void register(String className, ReflectClass clazz) {
-               _classByName.put(className, clazz);
-               _classes.add(clazz);
-               
-               _listeners.notifyListeners(clazz);              
-       }
-
     public ReflectClass forID(int id) {
        synchronized(_stream.lock()) {
                if(_stream.handlers().isSystemHandler(id)) {
@@ -183,7 +176,9 @@
                        return;
                }
                
-        register(className, clazz);
+        // step 2 add the class to _classByName and _classes to denote reading 
is completed
+        _classByName.put(className, clazz);
+               _classes.add(clazz);
                
                int numFields=classInfo.numFields();
                ReflectField[] fields=_builder.fieldArray(numFields);
@@ -278,14 +273,6 @@
        return (ReflectClass)_classByName.get(name);
     }
     
-       public void addListener(Listener listener) {
-               _listeners.register(listener);
-       }
-
-       public void removeListener(Listener listener) {
-               _listeners.remove(listener);
-       }
-       
        private ReflectClass arrayClass(ReflectClass clazz) {
                Object proto=clazz.reflector().array().newInstance(clazz,0);
                return clazz.reflector().forObject(proto);

Deleted: 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/ta/ActivatableInstrumented.java
===================================================================
--- 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/ta/ActivatableInstrumented.java  
    2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4oj/core/src/com/db4o/ta/ActivatableInstrumented.java  
    2009-04-02 14:28:49 UTC (rev 26347)
@@ -1,28 +0,0 @@
-/* Copyright (C) 2004 - 2008  db4objects Inc.  http://www.db4o.com
-
-This file is part of the db4o open source object database.
-
-db4o is free software; you can redistribute it and/or modify it under
-the terms of version 2 of the GNU General Public License as published
-by the Free Software Foundation and as clarified by db4objects' GPL 
-interpretation policy, available at
-http://www.db4o.com/about/company/legalpolicies/gplinterpretation/
-Alternatively you can write to db4objects, Inc., 1900 S Norfolk Street,
-Suite 350, San Mateo, CA 94403, USA.
-
-db4o is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. */
-package com.db4o.ta;
-
-/**
- * Marker interface to declare a class already implements the required TA/TP 
hooks
- * and does not want to be instrumented further.
- */
-public interface ActivatableInstrumented {
-}

Modified: 
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/db4ounit/common/migration/Db4oMigrationTestSuite.java
===================================================================
--- 
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/db4ounit/common/migration/Db4oMigrationTestSuite.java
   2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/db4ounit/common/migration/Db4oMigrationTestSuite.java
   2009-04-02 14:28:49 UTC (rev 26347)
@@ -94,7 +94,6 @@
             ArrayListUpdateTestCase.class,
             HashtableUpdateTestCase.class,
             VectorUpdateTestCase.class,
-            KnownClassesMigrationTestCase.class,
            };
        }
        

Deleted: 
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/db4ounit/common/migration/KnownClassesMigrationTestCase.java
===================================================================
--- 
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/db4ounit/common/migration/KnownClassesMigrationTestCase.java
    2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/db4ounit/common/migration/KnownClassesMigrationTestCase.java
    2009-04-02 14:28:49 UTC (rev 26347)
@@ -1,72 +0,0 @@
-/* Copyright (C) 2004 - 2008  db4objects Inc.  http://www.db4o.com
-
-This file is part of the db4o open source object database.
-
-db4o is free software; you can redistribute it and/or modify it under
-the terms of version 2 of the GNU General Public License as published
-by the Free Software Foundation and as clarified by db4objects' GPL 
-interpretation policy, available at
-http://www.db4o.com/about/company/legalpolicies/gplinterpretation/
-Alternatively you can write to db4objects, Inc., 1900 S Norfolk Street,
-Suite 350, San Mateo, CA 94403, USA.
-
-db4o is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. */
-package com.db4o.db4ounit.common.migration;
-
-import java.util.*;
-
-import com.db4o.config.*;
-import com.db4o.db4ounit.common.handlers.*;
-import com.db4o.ext.*;
-import com.db4o.foundation.*;
-import com.db4o.reflect.*;
-
-import db4ounit.*;
-
-/**
- * @sharpen.ignore
- * @decaf.ignore.jdk11
- */
-public class KnownClassesMigrationTestCase extends FormatMigrationTestCaseBase 
{
-
-       protected void assertObjectsAreReadable(ExtObjectContainer 
objectContainer) {
-               if (isVersionWithoutTCollection())
-                       return;
-               
-               final ReflectClass[] knownClasses = 
objectContainer.knownClasses();
-               
-               Assert.isNotNull(knownClasses);
-               Assert.isGreater(2, knownClasses.length);
-               
-               ReflectClass type = 
objectContainer.reflector().forClass(TCollection.class);
-               Assert.isGreaterOrEqual(0, Arrays4.indexOf(knownClasses, type));
-       }
-
-       private boolean isVersionWithoutTCollection() {
-               return db4oMajorVersion() < 5;
-       }
-
-       protected String fileNamePrefix() {
-               return "KnownClasses";
-       }
-
-       protected void store(ExtObjectContainer objectContainer) {
-               objectContainer.set(new Item(new LinkedList()));
-       }
-       
-       private static class Item {
-               public Item(LinkedList list) {
-                       _list = list;
-               }
-               
-               public LinkedList _list;
-       }
-
-}

Modified: 
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/db4ounit/jre12/assorted/AllTests.java
===================================================================
--- 
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/db4ounit/jre12/assorted/AllTests.java
   2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/db4ounit/jre12/assorted/AllTests.java
   2009-04-02 14:28:49 UTC (rev 26347)
@@ -29,7 +29,6 @@
                                GenericPrimitiveArrayTestCase.class,
                                StoreComparableFieldTestCase.class,
                                TranslatorStoredClassesTestCase.class,
-                               UnavailableClassAsTreeSetElementTestCase.class,
                                //Comment out this test temporarily
                                //UpdatingDb4oVersionsTestCase.class,
                };

Deleted: 
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/db4ounit/jre12/assorted/UnavailableClassAsTreeSetElementTestCase.java
===================================================================
--- 
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/db4ounit/jre12/assorted/UnavailableClassAsTreeSetElementTestCase.java
   2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/db4ounit/jre12/assorted/UnavailableClassAsTreeSetElementTestCase.java
   2009-04-02 14:28:49 UTC (rev 26347)
@@ -1,77 +0,0 @@
-/* Copyright (C) 2004 - 2008  db4objects Inc.  http://www.db4o.com
-
-This file is part of the db4o open source object database.
-
-db4o is free software; you can redistribute it and/or modify it under
-the terms of version 2 of the GNU General Public License as published
-by the Free Software Foundation and as clarified by db4objects' GPL 
-interpretation policy, available at
-http://www.db4o.com/about/company/legalpolicies/gplinterpretation/
-Alternatively you can write to db4objects, Inc., 1900 S Norfolk Street,
-Suite 350, San Mateo, CA 94403, USA.
-
-db4o is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. */
-package com.db4o.db4ounit.jre12.assorted;
-
-import java.util.*;
-
-import com.db4o.*;
-import com.db4o.db4ounit.common.assorted.*;
-
-import db4ounit.*;
-
-public class UnavailableClassAsTreeSetElementTestCase extends 
UnavailableClassTestCaseBase {
-       
-       public static class Item implements Comparable {
-               private int _value;
-
-               public Item(int value) {
-                       _value = value;
-        }
-
-               public int compareTo(Object o) {
-                       return _value - ((Item)o)._value;
-        }
-       }
-       
-       public static class Parent {
-               Set _items = new TreeSet();
-               
-               public Parent(Item[] items) {
-                       for (int i = 0; i < items.length; i++) {
-                               _items.add(items[i]);
-                       }
-               }
-       }
-       
-       protected void store() throws Exception {
-           store(new Parent(new Item[] { new Item(-1), new Item(42) }));
-       }
-       
-       public void testDefragment() throws Exception {
-               reopenHidingItemClass();
-               defragment();
-       }
-
-       private void reopenHidingItemClass() throws Exception {
-               reopenHidingClasses(new Class[] { Item.class });
-       }
-       
-       public void testUnavailableItem() throws Exception {
-               reopenHidingItemClass();
-               
-               final ObjectSet result = newQuery().execute();
-               Assert.areEqual(4, result.size());
-               while (result.hasNext()) {
-               Assert.isNotNull(result.next());
-        }
-       }
-
-}

Modified: 
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/db4ounit/jre12/collections/HashMapUpdateFileSizeTestCase.java
===================================================================
--- 
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/db4ounit/jre12/collections/HashMapUpdateFileSizeTestCase.java
   2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/db4ounit/jre12/collections/HashMapUpdateFileSizeTestCase.java
   2009-04-02 14:28:49 UTC (rev 26347)
@@ -23,8 +23,6 @@
 import java.io.*;
 import java.util.*;
 
-import com.db4o.internal.FrozenObjectInfo;
-
 import db4ounit.*;
 import db4ounit.extensions.*;
 import db4ounit.extensions.fixtures.*;
@@ -46,7 +44,7 @@
                map.put(new Integer(2), "String 2");
        }
 
-       public void _testFileSize() throws Exception {
+       public void testFileSize() throws Exception {
                warmUp();
                assertFileSizeConstant();
        }
@@ -60,8 +58,8 @@
                defragment();
                long afterUpdate = dbSize();
                /*
-                * The database file size is a bit uncertain because
-                * the signature length may vary. 
+                * FIXME: the database file size is uncertain? 
+                * We met similar problem before.
                 */
                Assert.isTrue(afterUpdate - beforeUpdate < 2);
        }

Modified: 
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/test/CascadeToHashMap.java
===================================================================
--- 
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/test/CascadeToHashMap.java  
    2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/test/CascadeToHashMap.java  
    2009-04-02 14:28:49 UTC (rev 26347)
@@ -67,10 +67,10 @@
                        }
                });
                
-               // Cascade-On-Delete Test: We only want two atom objects to 
remain.
+               // Cascade-On-Delete Test: We only want one atom to remain.
                
                Test.reOpen();
                Test.deleteAllInstances(this);
-               Test.ensureOccurrences(new Atom(), 2);
+               Test.ensureOccurrences(new Atom(), 1);
        }
 }

Modified: 
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/test/util/ExcludingClassLoader.java
===================================================================
--- 
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/test/util/ExcludingClassLoader.java
     2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4ojdk1.2/test/src/com/db4o/test/util/ExcludingClassLoader.java
     2009-04-02 14:28:49 UTC (rev 26347)
@@ -33,26 +33,16 @@
     private final Map _cache = new HashMap();
     
     private Collection4 _excludedNames;
-    private Collection4 _delegatedNames;
 
-    public ExcludingClassLoader(ClassLoader parent, Class[] excludedClasses) {
-        this(parent, collectNames(excludedClasses), new Collection4());
+    public ExcludingClassLoader(ClassLoader parent,Class[] excludedClasses) {
+        this(parent, collectNames(excludedClasses));
     }
-
-    public ExcludingClassLoader(ClassLoader parent, Class[] excludedClasses, 
Class[] delegatedClasses) {
-        this(parent, collectNames(excludedClasses), 
collectNames(delegatedClasses));
-    }
-
+    
     public ExcludingClassLoader(ClassLoader parent,Collection4 excludedNames) {
-       this(parent, excludedNames, new Collection4());
+        super(new URL[]{},parent);
+        this._excludedNames=excludedNames;
     }
 
-    public ExcludingClassLoader(ClassLoader parent,Collection4 excludedNames, 
Collection4 delegatedNames) {
-        super(new URL[]{}, parent);
-        this._excludedNames = excludedNames;
-        this._delegatedNames = delegatedNames;
-    }
-
     protected synchronized Class loadClass(String name, boolean resolve) 
throws ClassNotFoundException {
         if(_excludedNames.contains(name)) {
             print("EXCLUDED: " + name);
@@ -66,10 +56,6 @@
             print("NATIVE: " + name);
             return super.loadClass(name, resolve);
         }
-        if(_delegatedNames.contains(name)) {
-            print("DELEGATED: " + name);
-            return super.loadClass(name, resolve);
-        }
         Class clazz = findRawClass(name);
         if(resolve) {
             resolveClass(clazz);
@@ -121,7 +107,7 @@
         ClassLoader parent=ExcludingClassLoader.class.getClassLoader();
         String excName=ExcludingClassLoader.class.getName();
         Collection4 excluded=new Collection4();
-        ClassLoader incLoader=new ExcludingClassLoader(parent, excluded, new 
Collection4());
+        ClassLoader incLoader=new ExcludingClassLoader(parent,excluded);
         System.out.println(incLoader.loadClass(excName));
         excluded.add(excName);
         try {

Modified: 
trunk/contrib/db4o/src/db4ojdk5/core/src/com/db4o/collections/ArrayList4.java
===================================================================
--- 
trunk/contrib/db4o/src/db4ojdk5/core/src/com/db4o/collections/ArrayList4.java   
    2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4ojdk5/core/src/com/db4o/collections/ArrayList4.java   
    2009-04-02 14:28:49 UTC (rev 26347)
@@ -100,6 +100,7 @@
         * 
         * @see java.util.ArrayList 
         */
+       @SuppressWarnings("unchecked")
        public ArrayList4(Collection<? extends E> c) {
                E[] data = collectionToArray(c);
                elements = allocateStorage(data.length);
@@ -128,6 +129,7 @@
         * 
         * @see java.util.ArrayList 
         */
+       @SuppressWarnings("unchecked")
        public ArrayList4(int initialCapacity) {
                if (initialCapacity < 0) {
                        throw new IllegalArgumentException();
@@ -308,6 +310,7 @@
         * 
         * @sharpen.ignore
         */
+       @SuppressWarnings("unchecked")
        public int lastIndexOf(Object o) {
                for (int index = size() - 1; index >= 0; --index) {
                        E element = get(index);
@@ -383,6 +386,8 @@
         * @see java.util.ArrayList 
         * @see com.db4o.ta.Activatable
         * 
+        * @sharpen.internal
+        * @sharpen.property
         */
        public int size() {
                activate(ActivationPurpose.READ);
@@ -438,6 +443,7 @@
                resize(size());
        }
 
+       @SuppressWarnings("unchecked")
        private void resize(int minCapacity) {
                markModified();
                E[] temp = allocateStorage(minCapacity);

Modified: 
trunk/contrib/db4o/src/db4ojdk5/core/src/com/db4o/collections/ArrayMap4.java
===================================================================
--- 
trunk/contrib/db4o/src/db4ojdk5/core/src/com/db4o/collections/ArrayMap4.java    
    2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4ojdk5/core/src/com/db4o/collections/ArrayMap4.java    
    2009-04-02 14:28:49 UTC (rev 26347)
@@ -117,8 +117,7 @@
         * 
         * @sharpen.ignore
         */
-    @SuppressWarnings("unchecked")
-       public boolean containsKey(Object key) {
+    public boolean containsKey(Object key) {
         return containsKeyImpl((K) key);
     }
 
@@ -284,6 +283,7 @@
         * 
         * @sharpen.ignore
         */
+    @SuppressWarnings("unchecked")
     public V remove(Object key) {        
         activate(ActivationPurpose.READ);
         int index = indexOfKey(key);
@@ -300,6 +300,7 @@
         * @see java.util.Map 
         * @see com.db4o.ta.Activatable
         * 
+        * @sharpen.internal
         * @sharpen.property
         */
     public int size() {
@@ -402,6 +403,7 @@
         return hashCode;
     }
 
+    @SuppressWarnings("unchecked")
     private void initializeBackingArray(int length) {
         _keys = allocateKeyStorage(length);
         _values = allocateValueStorage(length);
@@ -429,6 +431,7 @@
         _size ++;
     }
     
+    @SuppressWarnings("unchecked")
     private void ensureCapacity() {
         if (_size == _keys.length) {
             int count = _keys.length * 2;

Modified: 
trunk/contrib/db4o/src/db4ojdk5/core/src/com/db4o/collections/SubArrayList4.java
===================================================================
--- 
trunk/contrib/db4o/src/db4ojdk5/core/src/com/db4o/collections/SubArrayList4.java
    2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4ojdk5/core/src/com/db4o/collections/SubArrayList4.java
    2009-04-02 14:28:49 UTC (rev 26347)
@@ -25,6 +25,7 @@
 /**
  * @exclude
  * @sharpen.ignore
+ * @decaf.ignore
  */
 public class SubArrayList4<E> extends AbstractList4<E> {
 

Modified: 
trunk/contrib/db4o/src/db4ojdk5/test/src/com/db4o/db4ounit/common/io/DiskFullTestCase.java
===================================================================
--- 
trunk/contrib/db4o/src/db4ojdk5/test/src/com/db4o/db4ounit/common/io/DiskFullTestCase.java
  2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4ojdk5/test/src/com/db4o/db4ounit/common/io/DiskFullTestCase.java
  2009-04-02 14:28:49 UTC (rev 26347)
@@ -22,15 +22,9 @@
 
 import java.io.*;
 
-import db4ounit.ConsoleTestRunner;
-
 public class DiskFullTestCase extends DiskFullTestCaseBase {
 
        private static final long NO_SIZE_LIMIT = -1;
-       
-       public static void main(String[] args) {
-               new ConsoleTestRunner(DiskFullTestCase.class).run();
-       }
 
        public void testReleasesFileLocks() {
                assertReleasesFileLocks(false);
@@ -65,12 +59,12 @@
 
        private void assertKeepsCommittedDataReadOnlyLimited(boolean doCache) {
                storeOneAndFail(NO_SIZE_LIMIT, doCache);
-               assertItemsStored(1, curFileLength(), true, doCache);
+               assertItemsStored(1, curFileLength(), true);
        }
 
        private void assertKeepsCommittedDataReadWriteUnlimited(boolean 
doCache) {
                storeOneAndFail(NO_SIZE_LIMIT, doCache);
-               assertItemsStored(1, NO_SIZE_LIMIT, false, doCache);
+               assertItemsStored(1, NO_SIZE_LIMIT, false);
        }
 
        @Override

Modified: 
trunk/contrib/db4o/src/db4ojdk5/test/src/com/db4o/db4ounit/common/io/DiskFullTestCaseBase.java
===================================================================
--- 
trunk/contrib/db4o/src/db4ojdk5/test/src/com/db4o/db4ounit/common/io/DiskFullTestCaseBase.java
      2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4ojdk5/test/src/com/db4o/db4ounit/common/io/DiskFullTestCaseBase.java
      2009-04-02 14:28:49 UTC (rev 26347)
@@ -75,16 +75,10 @@
                triggerDiskFullAndClose();
        }
 
-       protected void assertItemsStored(int numItems, Object conditionConfig, 
boolean readOnly, boolean withCache) {
+       protected void assertItemsStored(int numItems, Object conditionConfig, 
boolean readOnly) {
                Assert.isNull(_db);
                openDatabase(conditionConfig, readOnly, false);
-               int itemCount = _db.query(Item.class).size();
-               if(withCache){
-                       Assert.isTrue(itemCount == numItems || itemCount == 
numItems + 1);
-                       
-               }else{
-                       Assert.areEqual(numItems, itemCount);
-               }
+               Assert.areEqual(numItems, _db.query(Item.class).size());
                closeDb();
        }
 
@@ -94,8 +88,6 @@
                        public void run() throws Throwable {
                                _db.store(new Item(42));
                                _db.commit();
-                               _db.store(new Item(42));
-                               _db.commit();
                        }
                });
                Assert.expect(Db4oIOException.class, new CodeBlock() {

Modified: 
trunk/contrib/db4o/src/db4ojdk5/test/src/com/db4o/db4ounit/common/io/StackBasedDiskFullTestCase.java
===================================================================
--- 
trunk/contrib/db4o/src/db4ojdk5/test/src/com/db4o/db4ounit/common/io/StackBasedDiskFullTestCase.java
        2009-04-02 14:18:44 UTC (rev 26346)
+++ 
trunk/contrib/db4o/src/db4ojdk5/test/src/com/db4o/db4ounit/common/io/StackBasedDiskFullTestCase.java
        2009-04-02 14:28:49 UTC (rev 26347)
@@ -45,7 +45,7 @@
                                "commitParticipants",
                                hitThreshold);
                storeNAndFail(config, 95, 10, doCache);
-               assertItemsStored(90, config, false, doCache);
+               assertItemsStored(90, config, false);
        }
        
        protected void configureForFailure(ThrowCondition condition) {

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to