I'm checking this in.
This fixes PR 27131. David already checked in a Mauve test for this.
Tom
2006-04-12 Tom Tromey <[EMAIL PROTECTED]>
PR classpath/27131:
* java/util/BitSet.java (get): Early return if to==from.
Index: java/util/BitSet.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/util/BitSet.java,v
retrieving revision 1.19
diff -u -r1.19 BitSet.java
--- java/util/BitSet.java 5 Jul 2005 10:28:03 -0000 1.19
+++ java/util/BitSet.java 12 Apr 2006 16:00:37 -0000
@@ -365,7 +365,7 @@
throw new IndexOutOfBoundsException();
BitSet bs = new BitSet(to - from);
int lo_offset = from >>> 6;
- if (lo_offset >= bits.length)
+ if (lo_offset >= bits.length || to == from)
return bs;
int lo_bit = from & LONG_MASK;