You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by lu...@apache.org on 2012/05/13 17:51:31 UTC

svn commit: r1337928 - in /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/partitioning: AbstractRegion.java BSPTree.java

Author: luc
Date: Sun May 13 15:51:30 2012
New Revision: 1337928

URL: http://svn.apache.org/viewvc?rev=1337928&view=rev
Log:
Replaced RuntimeException with MathInternalError.

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/partitioning/AbstractRegion.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/partitioning/BSPTree.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/partitioning/AbstractRegion.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/partitioning/AbstractRegion.java?rev=1337928&r1=1337927&r2=1337928&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/partitioning/AbstractRegion.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/partitioning/AbstractRegion.java Sun May 13 15:51:30 2012
@@ -22,6 +22,7 @@ import java.util.Comparator;
 import java.util.Iterator;
 import java.util.TreeSet;
 
+import org.apache.commons.math3.exception.MathInternalError;
 import org.apache.commons.math3.geometry.Space;
 import org.apache.commons.math3.geometry.Vector;
 
@@ -297,7 +298,7 @@ public abstract class AbstractRegion<S e
             characterize(node.getPlus(), node.getCut().copySelf(), plusChar);
 
             if (plusChar.hasOut()) {
-                // plusChar.out corresponds to a subset of the cut
+                // plusChar.getOut() corresponds to a subset of the cut
                 // sub-hyperplane known to have outside cells on its plus
                 // side, we want to check if parts of this subset do have
                 // inside cells on their minus side
@@ -309,7 +310,7 @@ public abstract class AbstractRegion<S e
             }
 
             if (plusChar.hasIn()) {
-                // plusChar.in corresponds to a subset of the cut
+                // plusChar.getIn() corresponds to a subset of the cut
                 // sub-hyperplane known to have inside cells on its plus
                 // side, we want to check if parts of this subset do have
                 // outside cells on their minus side
@@ -362,7 +363,7 @@ public abstract class AbstractRegion<S e
                 break;
             default:
                 // this should not happen
-                throw new RuntimeException("internal error");
+                throw new MathInternalError();
             }
         }
     }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/partitioning/BSPTree.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/partitioning/BSPTree.java?rev=1337928&r1=1337927&r2=1337928&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/partitioning/BSPTree.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/partitioning/BSPTree.java Sun May 13 15:51:30 2012
@@ -16,6 +16,7 @@
  */
 package org.apache.commons.math3.geometry.partitioning;
 
+import org.apache.commons.math3.exception.MathInternalError;
 import org.apache.commons.math3.geometry.Vector;
 import org.apache.commons.math3.geometry.Space;
 import org.apache.commons.math3.util.FastMath;
@@ -273,7 +274,7 @@ public class BSPTree<S extends Space> {
                 plus.visit(visitor);
                 break;
             default:
-                throw new RuntimeException("internal error");
+                throw new MathInternalError();
             }
 
         }