diff options
4 files changed, 4 insertions, 4 deletions
diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/SourceCode.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/SourceCode.java index d44eef24e5a..9ee7749cc3c 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/SourceCode.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/SourceCode.java @@ -69,7 +69,7 @@ public class SourceCode { } 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); } diff --git a/sonar-graph/src/main/java/org/sonar/graph/Dsm.java b/sonar-graph/src/main/java/org/sonar/graph/Dsm.java index 941ecbb2c1c..8ac2715936d 100644 --- a/sonar-graph/src/main/java/org/sonar/graph/Dsm.java +++ b/sonar-graph/src/main/java/org/sonar/graph/Dsm.java @@ -53,7 +53,7 @@ public class Dsm<V> { 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; } diff --git a/sonar-graph/src/main/java/org/sonar/graph/DsmTopologicalSorter.java b/sonar-graph/src/main/java/org/sonar/graph/DsmTopologicalSorter.java index b28685a9f86..85a77a91b7e 100644 --- a/sonar-graph/src/main/java/org/sonar/graph/DsmTopologicalSorter.java +++ b/sonar-graph/src/main/java/org/sonar/graph/DsmTopologicalSorter.java @@ -39,7 +39,7 @@ public final class DsmTopologicalSorter<V> { 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."); } diff --git a/sonar-markdown/src/main/java/org/sonar/markdown/HtmlListChannel.java b/sonar-markdown/src/main/java/org/sonar/markdown/HtmlListChannel.java index 58fc67ea0fc..9e24ffa91e6 100644 --- a/sonar-markdown/src/main/java/org/sonar/markdown/HtmlListChannel.java +++ b/sonar-markdown/src/main/java/org/sonar/markdown/HtmlListChannel.java @@ -65,7 +65,7 @@ class HtmlListChannel extends Channel<MarkdownOutput> { 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; } |