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 2011/06/24 20:01:48 UTC

svn commit: r1139392 - /commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/BaseMutableGraph.java

Author: simonetripodi
Date: Fri Jun 24 18:01:48 2011
New Revision: 1139392

URL: http://svn.apache.org/viewvc?rev=1139392&view=rev
Log:
GraphException accept String.format() pattern/arguments

Modified:
    commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/BaseMutableGraph.java

Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/BaseMutableGraph.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/BaseMutableGraph.java?rev=1139392&r1=1139391&r2=1139392&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/BaseMutableGraph.java (original)
+++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/BaseMutableGraph.java Fri Jun 24 18:01:48 2011
@@ -19,8 +19,6 @@ package org.apache.commons.graph.model;
  * under the License.
  */
 
-import static java.lang.String.format;
-
 import java.util.LinkedHashSet;
 
 import org.apache.commons.graph.Edge;
@@ -52,7 +50,7 @@ public abstract class BaseMutableGraph<V
 
         if ( getAdjacencyList().containsKey( v ) )
         {
-            throw new GraphException( format( "Vertex '%s' already present in the Graph", v ) );
+            throw new GraphException( "Vertex '%s' already present in the Graph", v );
         }
 
         getAdjacencyList().put( v, new LinkedHashSet<E>() );
@@ -76,7 +74,7 @@ public abstract class BaseMutableGraph<V
         }
 
         if ( !getAdjacencyList().containsKey( v ) ){
-            throw new GraphException( format( "Vertex '%s' not present in the Graph", v ) );
+            throw new GraphException( "Vertex '%s' not present in the Graph", v );
         }
 
         getAdjacencyList().remove( v );
@@ -153,11 +151,11 @@ public abstract class BaseMutableGraph<V
 
         if ( !getAdjacencyList().containsKey( e.getHead() ) )
         {
-            throw new GraphException( format( "Head Vertex '%s' not present in the Graph", e.getHead() ) );
+            throw new GraphException( "Head Vertex '%s' not present in the Graph", e.getHead() );
         }
         if ( !getAdjacencyList().containsKey( e.getTail() ) )
         {
-            throw new GraphException( format( "Tail Vertex '%s' not present in the Graph", e.getTail() ) );
+            throw new GraphException( "Tail Vertex '%s' not present in the Graph", e.getTail() );
         }
     }