Don't access static methods via instance variable

from Chris Tilden


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@131823 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stephen Colebourne 2004-11-12 00:03:43 +00:00
parent c970798db6
commit 120e4a6b44
3 changed files with 12 additions and 9 deletions

View File

@ -284,6 +284,9 @@
<contributor>
<name>Leo Sutic</name>
</contributor>
<contributor>
<name>Chris Tilden</name>
</contributor>
<contributor>
<name>Neil O'Toole</name>
</contributor>

View File

@ -67,7 +67,7 @@ import org.apache.commons.collections.keyvalue.UnmodifiableMapEntry;
* UnsupportedOperationException on attempts to call that method.
*
* @since Commons Collections 3.0 (previously DoubleOrderedMap v2.0)
* @version $Revision: 1.14 $ $Date: 2004/05/26 21:58:02 $
* @version $Revision: 1.15 $ $Date: 2004/11/12 00:02:58 $
*
* @author Marc Johnson
* @author Stephen Colebourne
@ -1612,7 +1612,7 @@ public class TreeBidiMap implements OrderedBidiMap {
expectedModifications++;
lastReturnedNode = null;
if (nextNode == null) {
previousNode = main.greatestNode(main.rootNode[orderType], orderType);
previousNode = TreeBidiMap.greatestNode(main.rootNode[orderType], orderType);
} else {
previousNode = main.nextSmaller(nextNode, orderType);
}
@ -1674,7 +1674,7 @@ public class TreeBidiMap implements OrderedBidiMap {
*/
EntryView(final TreeBidiMap main, final int orderType, final int dataType) {
super(main, orderType, dataType);
this.oppositeType = main.oppositeIndex(orderType);
this.oppositeType = TreeBidiMap.oppositeIndex(orderType);
}
public boolean contains(Object obj) {
@ -1979,14 +1979,14 @@ public class TreeBidiMap implements OrderedBidiMap {
if (main.nodeCount == 0) {
throw new NoSuchElementException("Map is empty");
}
return main.leastNode(main.rootNode[VALUE], VALUE).getValue();
return TreeBidiMap.leastNode(main.rootNode[VALUE], VALUE).getValue();
}
public Object lastKey() {
if (main.nodeCount == 0) {
throw new NoSuchElementException("Map is empty");
}
return main.greatestNode(main.rootNode[VALUE], VALUE).getValue();
return TreeBidiMap.greatestNode(main.rootNode[VALUE], VALUE).getValue();
}
public Object nextKey(Object key) {

View File

@ -33,7 +33,7 @@ import org.apache.commons.collections.BufferUnderflowException;
* implementation.
*
* @since Commons Collections 3.0
* @version $Revision: 1.5 $
* @version $Revision: 1.6 $
*
* @author Janek Bogucki
* @author Phil Steitz
@ -380,7 +380,7 @@ public class TestBlockingBuffer extends AbstractTestObject {
try {
// wait for other thread to block on get() or remove()
Thread.currentThread().sleep(100);
Thread.sleep(100);
}
catch (InterruptedException e) {}
@ -403,7 +403,7 @@ public class TestBlockingBuffer extends AbstractTestObject {
try {
// wait for other thread to block on get() or remove()
Thread.currentThread().sleep(100);
Thread.sleep(100);
}
catch (InterruptedException e) {}
@ -481,7 +481,7 @@ public class TestBlockingBuffer extends AbstractTestObject {
private void delay(){
try {
Thread.currentThread().sleep(100);
Thread.sleep(100);
} catch (InterruptedException e) {}
}