Avoid NullPointerException in some corner cases.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1554653 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
83444ebe71
commit
57eff0d0c3
|
@ -45,6 +45,11 @@ public class SubOrientedPoint extends AbstractSubHyperplane<Euclidean1D, Euclide
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
protected AbstractSubHyperplane<Euclidean1D, Euclidean1D> buildNew(final Hyperplane<Euclidean1D> hyperplane,
|
protected AbstractSubHyperplane<Euclidean1D, Euclidean1D> buildNew(final Hyperplane<Euclidean1D> hyperplane,
|
||||||
|
|
|
@ -128,8 +128,11 @@ public abstract class AbstractRegion<S extends Space, T extends Space> implement
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
public void visitLeafNode(final BSPTree<S> node) {
|
public void visitLeafNode(final BSPTree<S> node) {
|
||||||
node.setAttribute((node == node.getParent().getPlus()) ?
|
if (node.getParent() == null || node == node.getParent().getMinus()) {
|
||||||
Boolean.FALSE : Boolean.TRUE);
|
node.setAttribute(Boolean.TRUE);
|
||||||
|
} else {
|
||||||
|
node.setAttribute(Boolean.FALSE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue