From: kkolinko Date: Wed, 5 Oct 2011 15:38:38 +0000 (+0000) Subject: Resolve "Redundant null check: the variable cannot be null at this location" warning. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=c4567ac88d7d205946beaab0164f8d412641a9d9;p=tomcat7.0 Resolve "Redundant null check: the variable cannot be null at this location" warning. The JspC constructor cannot throw a JasperException. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1179268 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/jasper/JspC.java b/java/org/apache/jasper/JspC.java index 3d4c08cca..fda8b3263 100644 --- a/java/org/apache/jasper/JspC.java +++ b/java/org/apache/jasper/JspC.java @@ -250,9 +250,8 @@ public class JspC implements Options { if (arg.length == 0) { System.out.println(Localizer.getMessage("jspc.usage")); } else { - JspC jspc = null; + JspC jspc = new JspC(); try { - jspc = new JspC(); jspc.setArgs(arg); if (jspc.helpNeeded) { System.out.println(Localizer.getMessage("jspc.usage")); @@ -261,7 +260,7 @@ public class JspC implements Options { } } catch (JasperException je) { System.err.println(je); - if (jspc != null && jspc.dieLevel != NO_DIE_LEVEL) { + if (jspc.dieLevel != NO_DIE_LEVEL) { System.exit(jspc.dieLevel); } }