You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by si...@apache.org on 2012/06/28 12:36:23 UTC
svn commit: r1354906 -
/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/collections/FibonacciHeap.java
Author: simonetripodi
Date: Thu Jun 28 10:36:22 2012
New Revision: 1354906
URL: http://svn.apache.org/viewvc?rev=1354906&view=rev
Log:
Collection methods with no implementation throw UnsupportedOperationException rather than doing nothing (it would be confusing for users)
Modified:
commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/collections/FibonacciHeap.java
Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/collections/FibonacciHeap.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/collections/FibonacciHeap.java?rev=1354906&r1=1354905&r2=1354906&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/collections/FibonacciHeap.java (original)
+++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/collections/FibonacciHeap.java Thu Jun 28 10:36:22 2012
@@ -203,7 +203,7 @@ public final class FibonacciHeap<E>
*/
public Iterator<E> iterator()
{
- return null;
+ throw new UnsupportedOperationException();
}
/**
@@ -211,7 +211,7 @@ public final class FibonacciHeap<E>
*/
public boolean remove( Object o )
{
- return false;
+ throw new UnsupportedOperationException();
}
/**
@@ -219,7 +219,7 @@ public final class FibonacciHeap<E>
*/
public boolean removeAll( Collection<?> c )
{
- return false;
+ throw new UnsupportedOperationException();
}
/**
@@ -227,7 +227,7 @@ public final class FibonacciHeap<E>
*/
public boolean retainAll( Collection<?> c )
{
- return false;
+ throw new UnsupportedOperationException();
}
/**
@@ -243,7 +243,7 @@ public final class FibonacciHeap<E>
*/
public Object[] toArray()
{
- return null;
+ throw new UnsupportedOperationException();
}
/**
@@ -251,7 +251,7 @@ public final class FibonacciHeap<E>
*/
public <T> T[] toArray( T[] a )
{
- return null;
+ throw new UnsupportedOperationException();
}
/**