You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by dj...@apache.org on 2005/11/01 23:12:57 UTC
svn commit: r330133 -
/db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/BackingStoreHashtable.java
Author: djd
Date: Tue Nov 1 14:12:53 2005
New Revision: 330133
URL: http://svn.apache.org/viewcvs?rev=330133&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.
Modified:
db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/BackingStoreHashtable.java
Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/BackingStoreHashtable.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/BackingStoreHashtable.java?rev=330133&r1=330132&r2=330133&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/BackingStoreHashtable.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/BackingStoreHashtable.java Tue Nov 1 14:12:53 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;