Skip to content

Commit

Permalink
Avoid and handle fault masking
Browse files Browse the repository at this point in the history
  • Loading branch information
jonherrmann committed Oct 31, 2018
1 parent c24cfd5 commit 6e67022
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,31 +44,28 @@ private static class InternalHandler implements HashingSegmentHandler {

@Override
public void coordinate2d(final double x, final double y, final long hash, final long location, final int type) {
if(previousNode==null) {
previousNode=theme.topology.node(x,y);
if(previousNode==null) {
if (previousNode == null) {
previousNode = theme.topology.node(x, y);
if (previousNode == null) {
errorCollector.collectError(BOUNDARY_POINT_DETACHED,
x,y,
"IS", String.valueOf(location)
);
x, y,
"IS", String.valueOf(location));
}
}else{
} else {
final Topology.Node nextNode = theme.topology.node(x, y);
if(nextNode==null) {
if (nextNode == null) {
errorCollector.collectError(BOUNDARY_POINT_DETACHED,
x,y,
"IS", String.valueOf(location)
);
x, y,
"IS", String.valueOf(location));
previousNode = null;
}else{
} else {
final Topology.Edge edge = previousNode.edge(nextNode);
if(edge==null) {
if (edge == null) {
errorCollector.collectError(BOUNDARY_EDGE_INVALID,
x,y,
x, y,
"IS", String.valueOf(location),
"X2", String.valueOf(previousNode.x()),
"Y2", String.valueOf(previousNode.y())
);
"Y2", String.valueOf(previousNode.y()));
}
previousNode = nextNode;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ enum TopologyErrorType {
*/
BOUNDARY_EDGE_INVALID,


//////////////////////////////////////////////////////////////////////////
// Deprecated and removed later
/**
Expand Down

0 comments on commit 6e67022

Please sign in to comment.