From ffb9625abf1081f44b4fdf07c8de841920995a61 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Fri, 13 Feb 2009 09:11:03 +0000 Subject: [PATCH] polishing --- .../org/springframework/expression/spel/ast/Ternary.java | 5 +++-- .../web/portlet/mvc/AbstractFormController.java | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/org.springframework.expression/src/main/java/org/springframework/expression/spel/ast/Ternary.java b/org.springframework.expression/src/main/java/org/springframework/expression/spel/ast/Ternary.java index 9ae1c3d501..7e523e5105 100644 --- a/org.springframework.expression/src/main/java/org/springframework/expression/spel/ast/Ternary.java +++ b/org.springframework.expression/src/main/java/org/springframework/expression/spel/ast/Ternary.java @@ -17,6 +17,7 @@ package org.springframework.expression.spel.ast; import org.antlr.runtime.Token; + import org.springframework.expression.EvaluationException; import org.springframework.expression.spel.ExpressionState; import org.springframework.expression.spel.SpelException; @@ -42,9 +43,9 @@ public class Ternary extends SpelNodeImpl { */ @Override public Object getValueInternal(ExpressionState state) throws EvaluationException { - Boolean b = getChild(0).getValue(state, Boolean.class); + Boolean value = getChild(0).getValue(state, Boolean.class); try { - if (b != null && b.booleanValue()) { + if (Boolean.TRUE.equals(value)) { return getChild(1).getValueInternal(state); } else { diff --git a/org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractFormController.java b/org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractFormController.java index f21a40ccec..5b081df6dd 100644 --- a/org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractFormController.java +++ b/org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractFormController.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2009 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -910,12 +910,12 @@ public abstract class AbstractFormController extends BaseCommandController { * resetting the form (prepopulating it with the current values if "bindOnNewForm" * is true). In this case, the form object in the session serves as transaction token. *
-	 * protected ModelAndView handleInvalidSubmit(RenderRequest request, RenderResponse response) throws Exception {
+	 * protected ModelAndView renderInvalidSubmit(RenderRequest request, RenderResponse response) throws Exception {
 	 *   return showNewForm(request, response);
 	 * }
* You can also show a new form but with special errors registered on it: *
-	 * protected ModelAndView handleInvalidSubmit(RenderRequest request, RenderResponse response) throws Exception {
+	 * protected ModelAndView renderInvalidSubmit(RenderRequest request, RenderResponse response) throws Exception {
 	 *   BindException errors = getErrorsForNewForm(request);
 	 *   errors.reject("duplicateFormSubmission", "Duplicate form submission");
 	 *   return showForm(request, response, errors);