From e5d9df60b019fad6cb9d03e8f24935189aff017b Mon Sep 17 00:00:00 2001 From: aclement Date: Fri, 22 Aug 2008 19:24:46 +0000 Subject: [PATCH] eclipse: testcode: redundant null check --- ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java | 2 +- ajdoc/testsrc/org/aspectj/tools/ajdoc/DeclareFormsTest.java | 4 ++-- ajdoc/testsrc/org/aspectj/tools/ajdoc/ITDTest.java | 2 +- .../org/aspectj/tools/ajdoc/PointcutVisibilityTest.java | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java index 817ddc066..db36be452 100644 --- a/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java +++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java @@ -625,7 +625,7 @@ public class CoverageTestCase extends AjdocTestCase { // get the html file for the enclosing class File htmlFileClass = new File(getAbsolutePathOutdir() + "/PkgVisibleClass.html"); - if (htmlFileClass == null || !htmlFileClass.exists()) { + if (!htmlFileClass.exists()) { fail("couldn't find " + htmlFileClass.getAbsolutePath() + " - were there compilation errors?"); } diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/DeclareFormsTest.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/DeclareFormsTest.java index f00a9b10f..652d1a5e7 100644 --- a/ajdoc/testsrc/org/aspectj/tools/ajdoc/DeclareFormsTest.java +++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/DeclareFormsTest.java @@ -234,7 +234,7 @@ public class DeclareFormsTest extends AjdocTestCase { runAjdoc("private","1.4",files); File htmlFile = new File(getAbsolutePathOutdir() + "/foo/DeclareCoverage2.html"); - if (htmlFile == null || !htmlFile.exists()) { + if (!htmlFile.exists()) { fail("couldn't find " + htmlFile.getAbsolutePath() + " - were there compilation errors?"); } @@ -375,7 +375,7 @@ public class DeclareFormsTest extends AjdocTestCase { runAjdoc("private","1.5",files); File htmlFile = new File(getAbsolutePathOutdir() + "/foo/C.html"); - if (htmlFile == null || !htmlFile.exists()) { + if (!htmlFile.exists()) { fail("couldn't find " + htmlFile.getAbsolutePath() + " - were there compilation errors?"); } diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/ITDTest.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/ITDTest.java index 2c61bc6e8..899782d88 100644 --- a/ajdoc/testsrc/org/aspectj/tools/ajdoc/ITDTest.java +++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/ITDTest.java @@ -79,7 +79,7 @@ public class ITDTest extends AjdocTestCase { // Check the contents of C.html File htmlC = new File(getAbsolutePathOutdir() + "/pack/C.html"); - if (htmlC == null || !htmlC.exists()) { + if (!htmlC.exists()) { fail("couldn't find " + getAbsolutePathOutdir() + "/pack/C.html - were there compilation errors?"); } diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/PointcutVisibilityTest.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/PointcutVisibilityTest.java index 6c5c47905..b3544d563 100644 --- a/ajdoc/testsrc/org/aspectj/tools/ajdoc/PointcutVisibilityTest.java +++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/PointcutVisibilityTest.java @@ -33,7 +33,7 @@ public class PointcutVisibilityTest extends AjdocTestCase { // private one (since "public" was an argument) // Check that this is the case...... File htmlFile = new File(getAbsolutePathOutdir() + "/foo/Pointcuts.html"); - if (htmlFile == null || !htmlFile.exists()) { + if (!htmlFile.exists()) { fail("couldn't find " + htmlFile.getAbsolutePath() + " - were there compilation errors?"); } // check the contents of the pointcut summary @@ -58,7 +58,7 @@ public class PointcutVisibilityTest extends AjdocTestCase { // private one (since "protected" was an argument) // Check that this is the case...... File htmlFile = new File(getAbsolutePathOutdir() + "/foo/Pointcuts.html"); - if (htmlFile == null || !htmlFile.exists()) { + if (!htmlFile.exists()) { fail("couldn't find " + htmlFile.getAbsolutePath() + " - were there compilation errors?"); } // check the contents of the pointcut summary -- 2.39.5