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

markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit b0c26eef87afad7941a43a55a6ca7d9b84e823aa
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed May 26 23:43:42 2021 +0100

    Code clean-up. Fix remaining braces.
---
 java/org/apache/el/lang/ELSupport.java             |  3 +-
 java/org/apache/jasper/el/JspValueExpression.java  | 36 ++++++++++++++++------
 .../apache/jasper/runtime/JspContextWrapper.java   |  3 +-
 3 files changed, 31 insertions(+), 11 deletions(-)

diff --git a/java/org/apache/el/lang/ELSupport.java 
b/java/org/apache/el/lang/ELSupport.java
index 16fd4db..6a0b14c 100644
--- a/java/org/apache/el/lang/ELSupport.java
+++ b/java/org/apache/el/lang/ELSupport.java
@@ -532,8 +532,9 @@ public class ELSupport {
         }
 
         // new to spec
-        if (obj == null)
+        if (obj == null) {
             return null;
+        }
         if (obj instanceof String) {
             String str = (String) obj;
             PropertyEditor editor = PropertyEditorManager.findEditor(type);
diff --git a/java/org/apache/jasper/el/JspValueExpression.java 
b/java/org/apache/jasper/el/JspValueExpression.java
index 9fbea5f..526195b 100644
--- a/java/org/apache/jasper/el/JspValueExpression.java
+++ b/java/org/apache/jasper/el/JspValueExpression.java
@@ -62,10 +62,14 @@ public final class JspValueExpression extends 
ValueExpression implements
             context.notifyAfterEvaluation(getExpressionString());
             return result;
         } catch (PropertyNotFoundException e) {
-            if (e instanceof JspPropertyNotFoundException) throw e;
+            if (e instanceof JspPropertyNotFoundException) {
+                throw e;
+            }
             throw new JspPropertyNotFoundException(this.mark, e);
         } catch (ELException e) {
-            if (e instanceof JspELException) throw e;
+            if (e instanceof JspELException) {
+                throw e;
+            }
             throw new JspELException(this.mark, e);
         }
     }
@@ -79,10 +83,14 @@ public final class JspValueExpression extends 
ValueExpression implements
             context.notifyAfterEvaluation(getExpressionString());
             return result;
         } catch (PropertyNotFoundException e) {
-            if (e instanceof JspPropertyNotFoundException) throw e;
+            if (e instanceof JspPropertyNotFoundException) {
+                throw e;
+            }
             throw new JspPropertyNotFoundException(this.mark, e);
         } catch (ELException e) {
-            if (e instanceof JspELException) throw e;
+            if (e instanceof JspELException) {
+                throw e;
+            }
             throw new JspELException(this.mark, e);
         }
     }
@@ -96,13 +104,19 @@ public final class JspValueExpression extends 
ValueExpression implements
             this.target.setValue(context, value);
             context.notifyAfterEvaluation(getExpressionString());
         } catch (PropertyNotWritableException e) {
-            if (e instanceof JspPropertyNotWritableException) throw e;
+            if (e instanceof JspPropertyNotWritableException) {
+                throw e;
+            }
             throw new JspPropertyNotWritableException(this.mark, e);
         } catch (PropertyNotFoundException e) {
-            if (e instanceof JspPropertyNotFoundException) throw e;
+            if (e instanceof JspPropertyNotFoundException) {
+                throw e;
+            }
             throw new JspPropertyNotFoundException(this.mark, e);
         } catch (ELException e) {
-            if (e instanceof JspELException) throw e;
+            if (e instanceof JspELException) {
+                throw e;
+            }
             throw new JspELException(this.mark, e);
         }
     }
@@ -116,10 +130,14 @@ public final class JspValueExpression extends 
ValueExpression implements
             context.notifyAfterEvaluation(getExpressionString());
             return result;
         } catch (PropertyNotFoundException e) {
-            if (e instanceof JspPropertyNotFoundException) throw e;
+            if (e instanceof JspPropertyNotFoundException) {
+                throw e;
+            }
             throw new JspPropertyNotFoundException(this.mark, e);
         } catch (ELException e) {
-            if (e instanceof JspELException) throw e;
+            if (e instanceof JspELException) {
+                throw e;
+            }
             throw new JspELException(this.mark, e);
         }
     }
diff --git a/java/org/apache/jasper/runtime/JspContextWrapper.java 
b/java/org/apache/jasper/runtime/JspContextWrapper.java
index 746be09..3f1f9c7 100644
--- a/java/org/apache/jasper/runtime/JspContextWrapper.java
+++ b/java/org/apache/jasper/runtime/JspContextWrapper.java
@@ -496,8 +496,9 @@ public class JspContextWrapper extends PageContext 
implements VariableResolver {
      */
     private String findAlias(String varName) {
 
-        if (aliases == null)
+        if (aliases == null) {
             return varName;
+        }
 
         String alias = aliases.get(varName);
         if (alias == null) {

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

Reply via email to