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 ka...@apache.org on 2006/12/20 12:28:09 UTC
svn commit: r489053 -
/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FormatableBitSet.java
Author: kahatlen
Date: Wed Dec 20 03:28:07 2006
New Revision: 489053
URL: http://svn.apache.org/viewvc?view=rev&rev=489053
Log:
DERBY-2191: Cleanup of FormatableBitSet
Removal of dead code. Patch contributed by Dyre Tjeldvoll.
Modified:
db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FormatableBitSet.java
Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FormatableBitSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FormatableBitSet.java?view=diff&rev=489053&r1=489052&r2=489053
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FormatableBitSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FormatableBitSet.java Wed Dec 20 03:28:07 2006
@@ -1050,31 +1050,14 @@
if (otherLength > getLength())
grow(otherLength); // expand this bit
- if (otherBit instanceof FormatableBitSet)
- {
- // we know the bit ordering, optimize this
- FormatableBitSet ob = (FormatableBitSet)otherBit;
- int obByteLen = ob.getLengthInBytes();
- for (int i = 0; i < obByteLen-1; i++)
- value[i] |= ob.value[i];
-
- // do the last byte bit by bit
- for (int i = (obByteLen-1)*8; i < otherLength; i++)
- if (otherBit.isSet(i))
- set(i);
- }
- else
- {
- // we don't know the bit ordering, call thru the interface and go
- // thru bit by bit
- // this bit impl's length >= other bit's length
-
- for (int i = 0; i < otherLength; i++)
- {
- if (otherBit.isSet(i))
- set(i);
- }
- }
+ int obByteLen = otherBit.getLengthInBytes();
+ for (int i = 0; i < obByteLen-1; i++)
+ value[i] |= otherBit.value[i];
+
+ // do the last byte bit by bit
+ for (int i = (obByteLen-1)*8; i < otherLength; i++)
+ if (otherBit.isSet(i))
+ set(i);
}
/**