}
return lines;
} catch (Exception e) {
- throw new RuntimeException("Problem while reading " + getFileName() + ":" + e.getMessage(), e);
+ throw new IllegalStateException("Problem while reading " + getFileName() + ":" + e.getMessage(), e);
} finally {
Closeables.closeQuietly(lnr);
}
V to = vertices[y];
Edge<V> edge = graph.getEdge(from, to);
- boolean isFeedbackEdge = (edge != null && feedbackEdges.contains(edge));
+ boolean isFeedbackEdge = edge != null && feedbackEdges.contains(edge);
DsmCell cell = new DsmCell(edge, isFeedbackEdge);
cells[x][y] = cell;
}
boolean dsmCanBeSortedOnRight = partitionner.pushToRightVerticesWithoutOutgointEdges();
dsmCanBeSorted = dsmCanBeSortedOnLeft || dsmCanBeSortedOnRight;
}
- boolean isCyclicGraph = (partitionner.leftOrderedIndex < partitionner.rightOrderedIndex);
+ boolean isCyclicGraph = partitionner.leftOrderedIndex < partitionner.rightOrderedIndex;
if (isCyclicGraph) {
throw new IllegalStateException("Can't sort a cyclic graph.");
}
private int searchIndexOfFirstCharacter(CharSequence token) {
for (int index = 0; index < token.length(); index++) {
if (token.charAt(index) == '*') {
- for (index++; index < token.length(); index++) {
+ while (++index<token.length()) {
if (token.charAt(index) != ' ') {
return index;
}