db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r330136 - /db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/store/access/BackingStoreHashtable.java
Date Tue, 01 Nov 2005 22:29:01 GMT
Author: djd
Date: Tue Nov  1 14:28:59 2005
New Revision: 330136

URL: http://svn.apache.org/viewcvs?rev=330136&view=rev
Log:
DERBY-656 Use the size estimates from the catalog to avoid security
issues in BackingStoreHashtable. This matches the other uses of the
class size utilities, eg. for the DataValueDescriptors.

Merge of 330133 from trunk.

Modified:
    db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/store/access/BackingStoreHashtable.java

Modified: db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/store/access/BackingStoreHashtable.java
URL: http://svn.apache.org/viewcvs/db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/store/access/BackingStoreHashtable.java?rev=330136&r1=330135&r2=330136&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/store/access/BackingStoreHashtable.java
(original)
+++ db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/store/access/BackingStoreHashtable.java
Tue Nov  1 14:28:59 2005
@@ -121,17 +121,10 @@
     private long max_inmemory_size;
     private boolean keepAfterCommit;
 
-    private static int vectorSize; // The estimated number of bytes used by Vector(0)
-    static {
-        try
-        {
-            vectorSize = ClassSize.estimateBase( java.util.Vector.class);
-        }
-        catch( SecurityException se)
-        {
-            vectorSize = 4*ClassSize.refSize;
-        }
-    };
+    /**
+     * The estimated number of bytes used by Vector(0)
+     */  
+    private final static int vectorSize = ClassSize.estimateBaseFromCatalog(java.util.Vector.class);
     
     private DiskHashtable diskHashtable;
 



Mime
View raw message