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/02/04 16:34:55 UTC

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

Author: simonetripodi
Date: Sat Feb  4 15:34:54 2012
New Revision: 1240522

URL: http://svn.apache.org/viewvc?rev=1240522&view=rev
Log:
use shortcuts to check non-null arguments

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

Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/RevertedGraph.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/RevertedGraph.java?rev=1240522&r1=1240521&r2=1240522&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/RevertedGraph.java (original)
+++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/RevertedGraph.java Sat Feb  4 15:34:54 2012
@@ -19,6 +19,8 @@ package org.apache.commons.graph.model;
  * under the License.
  */
 
+import static org.apache.commons.graph.utils.Assertions.checkNotNull;
+
 import org.apache.commons.graph.DirectedGraph;
 import org.apache.commons.graph.Edge;
 import org.apache.commons.graph.Vertex;
@@ -51,11 +53,7 @@ public final class RevertedGraph<V exten
      */
     public RevertedGraph( DirectedGraph<V, E> directedGraph )
     {
-        if ( directedGraph == null )
-        {
-            throw new IllegalArgumentException( "Adapted DirectedGraph must be not null" );
-        }
-
+        directedGraph = checkNotNull( directedGraph, "Adapted DirectedGraph must be not null" );
         this.directedGraph = directedGraph;
     }