You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2017/02/03 21:56:44 UTC

svn commit: r1781610 - /tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java

Author: markt
Date: Fri Feb  3 21:56:43 2017
New Revision: 1781610

URL: http://svn.apache.org/viewvc?rev=1781610&view=rev
Log:
Clean-up prior to back-port
NPE warnings

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java?rev=1781610&r1=1781609&r2=1781610&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java Fri Feb  3 21:56:43 2017
@@ -1806,7 +1806,8 @@ class Generator {
 
         private static final String DOUBLE_QUOTE = "\\\"";
 
-        @Override
+        @SuppressWarnings("null") // NPEs identified by IDE are not possible
+		@Override
 		public void visit(Node.UninterpretedTag n) throws JasperException {
 
             n.setBeginJavaLine(out.getJavaLine());
@@ -2830,7 +2831,8 @@ class Generator {
             return JspUtil.makeJavaIdentifier(varName);
         }
 
-        private String evaluateAttribute(TagHandlerInfo handlerInfo,
+        @SuppressWarnings("null") // NPE identified by IDE is not possible
+		private String evaluateAttribute(TagHandlerInfo handlerInfo,
                 Node.JspAttribute attr, Node.CustomTag n, String tagHandlerVar)
                 throws JasperException {
 
@@ -2927,13 +2929,13 @@ class Generator {
                     // should the expression be evaluated before passing to
                     // the setter?
                     boolean evaluate = false;
-                    if (tai.canBeRequestTime()) {
+                    if (tai != null && tai.canBeRequestTime()) {
                         evaluate = true; // JSP.2.3.2
                     }
                     if (attr.isDeferredInput()) {
                         evaluate = false; // JSP.2.3.3
                     }
-                    if (attr.isDeferredInput() && tai.canBeRequestTime()) {
+                    if (attr.isDeferredInput() && tai != null && tai.canBeRequestTime()) {
                         evaluate = !attrValue.contains("#{"); // JSP.2.3.5
                     }
                     if (evaluate) {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org