This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
     new d112d80  No functional change. Align 10.0.x, 9.0.x and 8.5.x
d112d80 is described below

commit d112d806b8a741e0d08ddd0a8f811aaa478c2745
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Mar 29 16:11:26 2021 +0100

    No functional change. Align 10.0.x, 9.0.x and 8.5.x
---
 java/org/apache/jasper/compiler/ELFunctionMapper.java    |  3 ++-
 java/org/apache/jasper/compiler/ErrorDispatcher.java     |  3 ++-
 java/org/apache/jasper/compiler/Generator.java           | 16 +++++-----------
 java/org/apache/jasper/resources/LocalStrings.properties |  1 +
 .../apache/jasper/resources/LocalStrings_de.properties   |  1 +
 .../apache/jasper/resources/LocalStrings_fr.properties   |  1 +
 .../apache/jasper/resources/LocalStrings_ja.properties   |  1 +
 .../apache/jasper/resources/LocalStrings_ko.properties   |  1 +
 .../jasper/resources/LocalStrings_zh_CN.properties       |  1 +
 9 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/java/org/apache/jasper/compiler/ELFunctionMapper.java 
b/java/org/apache/jasper/compiler/ELFunctionMapper.java
index 58af9f8..2bd2d71 100644
--- a/java/org/apache/jasper/compiler/ELFunctionMapper.java
+++ b/java/org/apache/jasper/compiler/ELFunctionMapper.java
@@ -23,6 +23,7 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 
 import javax.servlet.jsp.tagext.FunctionInfo;
@@ -81,7 +82,7 @@ public class ELFunctionMapper {
          * Use a global name map to facilitate reuse of function maps.
          * The key used is prefix:function:uri.
          */
-        private final HashMap<String, String> gMap = new HashMap<>();
+        private final Map<String, String> gMap = new HashMap<>();
 
         @Override
         public void visit(Node.ParamAction n) throws JasperException {
diff --git a/java/org/apache/jasper/compiler/ErrorDispatcher.java 
b/java/org/apache/jasper/compiler/ErrorDispatcher.java
index f9bf3b3..2ecc675 100644
--- a/java/org/apache/jasper/compiler/ErrorDispatcher.java
+++ b/java/org/apache/jasper/compiler/ErrorDispatcher.java
@@ -21,6 +21,7 @@ import java.io.IOException;
 import java.io.StringReader;
 import java.net.MalformedURLException;
 import java.util.ArrayList;
+import java.util.List;
 
 import org.apache.jasper.JasperException;
 import org.apache.jasper.JspCompilationContext;
@@ -316,7 +317,7 @@ public class ErrorDispatcher {
                                 String errMsg, String fname, Node.Nodes page)
                 throws IOException, JasperException {
 
-        ArrayList<JavacErrorDetail> errors = new ArrayList<>();
+        List<JavacErrorDetail> errors = new ArrayList<>();
         StringBuilder errMsgBuf = null;
         int lineNum = -1;
         JavacErrorDetail javacError = null;
diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java
index ef445da..b85c777 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -1079,9 +1079,7 @@ class Generator {
             String flush = n.getTextAttribute("flush");
             Node.JspAttribute page = n.getPage();
 
-            boolean isFlush = false; // default to false;
-            if ("true".equals(flush))
-                isFlush = true;
+            boolean isFlush = "true".equals(flush);
 
             n.setBeginJavaLine(out.getJavaLine());
 
@@ -3416,11 +3414,7 @@ class Generator {
         } else if (n instanceof Node.NamedAttribute) {
             ci = ((Node.NamedAttribute) n).getChildInfo();
         } else {
-            // Cannot access err since this method is static, but at
-            // least flag an error.
-            throw new JasperException("Unexpected Node Type");
-            // err.getString(
-            // "jsp.error.internal.unexpected_node_type" ) );
+            throw new 
JasperException(Localizer.getMessage("jsp.error.internal.unexpectedNodeType"));
         }
 
         if (ci.hasUseBean()) {
@@ -3632,8 +3626,8 @@ class Generator {
         String className = tagInfo.getTagClassName();
         int lastIndex = className.lastIndexOf('.');
         if (lastIndex != -1) {
-            String pkgName = className.substring(0, lastIndex);
-            genPreamblePackage(pkgName);
+            String packageName = className.substring(0, lastIndex);
+            genPreamblePackage(packageName);
             className = className.substring(lastIndex + 1);
         }
 
@@ -4211,7 +4205,7 @@ class Generator {
         // True if the helper class should be generated.
         private boolean used = false;
 
-        private ArrayList<Fragment> fragments = new ArrayList<>();
+        private List<Fragment> fragments = new ArrayList<>();
 
         private String className;
 
diff --git a/java/org/apache/jasper/resources/LocalStrings.properties 
b/java/org/apache/jasper/resources/LocalStrings.properties
index 26b8adf..4fd82ec 100644
--- a/java/org/apache/jasper/resources/LocalStrings.properties
+++ b/java/org/apache/jasper/resources/LocalStrings.properties
@@ -75,6 +75,7 @@ jsp.error.function.classnotfound=The class [{0}] specified in 
TLD for the functi
 jsp.error.include.exception=Unable to include [{0}]
 jsp.error.include.tag=Invalid jsp:include tag
 jsp.error.internal.filenotfound=Internal Error: File [{0}] not found
+jsp.error.internal.unexpectedNodeType=Unexpected node type
 jsp.error.invalid.attribute=[{0}] has invalid attribute: [{1}]
 jsp.error.invalid.bean=The value for the useBean class attribute [{0}] is 
invalid.
 jsp.error.invalid.directive=Invalid directive
diff --git a/java/org/apache/jasper/resources/LocalStrings_de.properties 
b/java/org/apache/jasper/resources/LocalStrings_de.properties
index 3efd441..56b5be5 100644
--- a/java/org/apache/jasper/resources/LocalStrings_de.properties
+++ b/java/org/apache/jasper/resources/LocalStrings_de.properties
@@ -26,6 +26,7 @@ jsp.error.el.template.deferred=#{...} is im Template Text 
nicht erlaubt
 jsp.error.fallback.invalidUse=jsp:fallback muss ein direktes Kind von 
jsp:plugin sein
 jsp.error.file.not.found=Datei [{0}] nicht gefunden
 jsp.error.internal.filenotfound=Interner Fehler: Datei [{0}] nicht gefunden
+jsp.error.internal.unexpectedNodeType=Unerwarteter Knotentyp
 jsp.error.invalid.attribute=[{0}] hat ein ungültiges Attribut: [{1}]
 jsp.error.invalid.tagdir=Tag Verzeichnis [{0}] beginnt nicht mit 
"/WEB-INF/tags"
 jsp.error.invalid.version=Ungültige JSP Version für tag-Datei in [{0}] 
definiert
diff --git a/java/org/apache/jasper/resources/LocalStrings_fr.properties 
b/java/org/apache/jasper/resources/LocalStrings_fr.properties
index 94ebd69..f1ef97e 100644
--- a/java/org/apache/jasper/resources/LocalStrings_fr.properties
+++ b/java/org/apache/jasper/resources/LocalStrings_fr.properties
@@ -75,6 +75,7 @@ jsp.error.function.classnotfound=La classe [{0}] spécifiée 
dans la TLD pour la
 jsp.error.include.exception=Impossible d''inclure (include) [{0}]
 jsp.error.include.tag=Tag jsp:include incorrect
 jsp.error.internal.filenotfound=Erreur interne : Fichier [{0}] introuvable
+jsp.error.internal.unexpectedNodeType=Type de nœud inattendu
 jsp.error.invalid.attribute=[{0}] : Attribut incorrect : [{1}]
 jsp.error.invalid.bean=La valeur [{0}] de l''attribut de classe useBean est 
invalide
 jsp.error.invalid.directive=Directive incorrecte
diff --git a/java/org/apache/jasper/resources/LocalStrings_ja.properties 
b/java/org/apache/jasper/resources/LocalStrings_ja.properties
index c26f713..5cab672 100644
--- a/java/org/apache/jasper/resources/LocalStrings_ja.properties
+++ b/java/org/apache/jasper/resources/LocalStrings_ja.properties
@@ -76,6 +76,7 @@ jsp.error.function.classnotfound=TLDの中で関数 [{1}] に指定されてい
 jsp.error.include.exception=[{0}] を include 出来ません
 jsp.error.include.tag=無効なjsp:includeタグです
 jsp.error.internal.filenotfound=内部エラー: ファイル [{0}] が見つかりません
+jsp.error.internal.unexpectedNodeType=予想外のノードタイプ
 jsp.error.invalid.attribute=[{0}]は無効な属性を持っています: [{1}]
 jsp.error.invalid.bean=useBeanのクラス属性 [{0}] の値が無効です
 jsp.error.invalid.directive=無効なディレクティブ
diff --git a/java/org/apache/jasper/resources/LocalStrings_ko.properties 
b/java/org/apache/jasper/resources/LocalStrings_ko.properties
index 632eeb7..9382177 100644
--- a/java/org/apache/jasper/resources/LocalStrings_ko.properties
+++ b/java/org/apache/jasper/resources/LocalStrings_ko.properties
@@ -76,6 +76,7 @@ jsp.error.function.classnotfound=function [{1}]을(를) 위하여 TLD에 
지정
 jsp.error.include.exception=[{0}]을(를) include할 수 없습니다.
 jsp.error.include.tag=유효하지 않은 jsp:include 태그
 jsp.error.internal.filenotfound=내부 오류: 파일 [{0}]을(를) 찾을 수 없습니다.
+jsp.error.internal.unexpectedNodeType=예기치 않은 노드 타입
 jsp.error.invalid.attribute=[{0}]은(는) 유효하지 않은 속성을 가지고 있습니다: [{1}]
 jsp.error.invalid.bean=useBean의 class 속성을 위한 값 [{0}]은(는) 유효하지 않습니다.
 jsp.error.invalid.directive=유효하지 않은 지시어
diff --git a/java/org/apache/jasper/resources/LocalStrings_zh_CN.properties 
b/java/org/apache/jasper/resources/LocalStrings_zh_CN.properties
index c74ef48..bc2700b 100644
--- a/java/org/apache/jasper/resources/LocalStrings_zh_CN.properties
+++ b/java/org/apache/jasper/resources/LocalStrings_zh_CN.properties
@@ -75,6 +75,7 @@ jsp.error.function.classnotfound=找不到在TLD中为函数[{1}]指定的类[{0
 jsp.error.include.exception=无法包含[{0}]
 jsp.error.include.tag=无效的jsp:include标签
 jsp.error.internal.filenotfound=内部错误:找不到文件 [{0}]
+jsp.error.internal.unexpectedNodeType=节点类型不一致
 jsp.error.invalid.attribute=[{0}]有一个无效属性:[{1}]
 jsp.error.invalid.bean=useBean类属性[{0}]的值无效。
 jsp.error.invalid.directive=无效指令

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to