minor: fix for Intelij inspections (Prohibited exception 'Exception' thrown; Declaration has problems in Javadoc references ; 'assertEquals()' may be 'assertSame()' ;'assertEquals()' can be simplified to 'assertNull()')
This commit is contained in:
parent
3f3dedeacc
commit
ec2834e43a
|
|
@ -1987,6 +1987,8 @@
|
|||
<option value="ProhibitedExceptionCaught" />
|
||||
<!-- No way to split apart huge if/else branches in test. -->
|
||||
<option value="IfStatementWithTooManyBranches" />
|
||||
<!-- we have to catch Exception in Checker and rethrow it -->
|
||||
<option value="ProhibitedExceptionThrown" />
|
||||
</list>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
|
|
|
|||
|
|
@ -304,6 +304,7 @@ public class Checker extends AutomaticBean implements MessageDispatcher, RootMod
|
|||
* @param file a file to process.
|
||||
* @return a sorted set of messages to be logged.
|
||||
* @throws CheckstyleException if error condition within Checkstyle occurs.
|
||||
* @noinspection ProhibitedExceptionThrown
|
||||
*/
|
||||
private SortedSet<LocalizedMessage> processFile(File file) throws CheckstyleException {
|
||||
final SortedSet<LocalizedMessage> fileMessages = new TreeSet<>();
|
||||
|
|
@ -605,7 +606,7 @@ public class Checker extends AutomaticBean implements MessageDispatcher, RootMod
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the field {@link haltOnException}.
|
||||
* Sets the field haltOnException.
|
||||
* @param haltOnException the new value.
|
||||
*/
|
||||
public void setHaltOnException(boolean haltOnException) {
|
||||
|
|
|
|||
|
|
@ -254,9 +254,9 @@ public class ParseTreeTablePModelTest {
|
|||
final int column = (int) parseTree.getValueAt(child, 3);
|
||||
final String text = (String) parseTree.getValueAt(child, 4);
|
||||
final String expectedText = String.join("", System.lineSeparator(),
|
||||
"* class javadoc", System.lineSeparator(), "<EOF>");
|
||||
"* class javadoc", System.lineSeparator(), "<EOF>");
|
||||
|
||||
Assert.assertEquals(null, treeModel);
|
||||
Assert.assertNull(treeModel);
|
||||
Assert.assertEquals("JAVADOC", type);
|
||||
Assert.assertEquals(1, line);
|
||||
Assert.assertEquals(0, column);
|
||||
|
|
@ -275,11 +275,11 @@ public class ParseTreeTablePModelTest {
|
|||
@Test
|
||||
public void testColumnMethods() {
|
||||
final ParseTreeTablePModel parseTree = new ParseTreeTablePModel(null);
|
||||
Assert.assertEquals(ParseTreeTableModel.class, parseTree.getColumnClass(0));
|
||||
Assert.assertEquals(String.class, parseTree.getColumnClass(1));
|
||||
Assert.assertEquals(Integer.class, parseTree.getColumnClass(2));
|
||||
Assert.assertEquals(Integer.class, parseTree.getColumnClass(3));
|
||||
Assert.assertEquals(String.class, parseTree.getColumnClass(4));
|
||||
Assert.assertSame(ParseTreeTableModel.class, parseTree.getColumnClass(0));
|
||||
Assert.assertSame(String.class, parseTree.getColumnClass(1));
|
||||
Assert.assertSame(Integer.class, parseTree.getColumnClass(2));
|
||||
Assert.assertSame(Integer.class, parseTree.getColumnClass(3));
|
||||
Assert.assertSame(String.class, parseTree.getColumnClass(4));
|
||||
|
||||
try {
|
||||
parseTree.getColumnClass(parseTree.getColumnCount());
|
||||
|
|
|
|||
Loading…
Reference in New Issue