From 86a286013d9378bf00e766931c2f92dc81c02aab Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Sun, 4 Mar 2018 13:33:31 +0000 Subject: Some IntelliJ and Javadoc fixes git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1825817 13f79535-47bb-0310-9956-ffa450edef68 --- src/testcases/org/apache/poi/hssf/usermodel/TestEscherGraphics2d.java | 4 ++-- src/testcases/org/apache/poi/ss/formula/TestMissingWorkbook.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/testcases') diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestEscherGraphics2d.java b/src/testcases/org/apache/poi/hssf/usermodel/TestEscherGraphics2d.java index b0b4293a74..130e0fd84b 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestEscherGraphics2d.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestEscherGraphics2d.java @@ -109,7 +109,7 @@ public final class TestEscherGraphics2d { @Test public void testSetFont() { - Font f = new Font("Helvetica", 0, 12); + Font f = new Font("Helvetica", Font.PLAIN, 12); graphics.setFont(f); assertEquals(f, graphics.getFont()); } @@ -133,7 +133,7 @@ public final class TestEscherGraphics2d { private boolean isDialogPresent() { String fontDebugStr = graphics.getFont().toString(); - return fontDebugStr.indexOf("dialog") != -1 || fontDebugStr.indexOf("Dialog") != -1; + return fontDebugStr.contains("dialog") || fontDebugStr.contains("Dialog"); } @Test diff --git a/src/testcases/org/apache/poi/ss/formula/TestMissingWorkbook.java b/src/testcases/org/apache/poi/ss/formula/TestMissingWorkbook.java index 1a8975c9b4..d1a5f02101 100644 --- a/src/testcases/org/apache/poi/ss/formula/TestMissingWorkbook.java +++ b/src/testcases/org/apache/poi/ss/formula/TestMissingWorkbook.java @@ -72,7 +72,7 @@ public class TestMissingWorkbook extends TestCase { evaluator.evaluateFormulaCell(lA1Cell); fail("Missing external workbook reference exception expected!"); }catch(RuntimeException re) { - assertTrue("Unexpected exception: " + re, re.getMessage().indexOf(SOURCE_DUMMY_WORKBOOK_FILENAME) != -1); + assertTrue("Unexpected exception: " + re, re.getMessage().contains(SOURCE_DUMMY_WORKBOOK_FILENAME)); } } -- cgit v1.2.3