Author: husted
Date: Fri Feb 10 10:11:36 2006
New Revision: 376782
URL: http://svn.apache.org/viewcvs?rev=376782&view=rev
Log:
Checkstyle Roundup
* EL package reformatted with latest Jalopy settings. Stylistic changes only.
Modified:
struts/el/trunk/src/java/org/apache/strutsel/taglib/utils/EvalHelper.java
Modified:
struts/el/trunk/src/java/org/apache/strutsel/taglib/utils/EvalHelper.java
URL:
http://svn.apache.org/viewcvs/struts/el/trunk/src/java/org/apache/strutsel/taglib/utils/EvalHelper.java?rev=376782&r1=376781&r2=376782&view=diff
==============================================================================
--- struts/el/trunk/src/java/org/apache/strutsel/taglib/utils/EvalHelper.java
(original)
+++ struts/el/trunk/src/java/org/apache/strutsel/taglib/utils/EvalHelper.java
Fri Feb 10 10:11:36 2006
@@ -1,27 +1,27 @@
/*
- * $Id$
+ * $Id$
*
* Copyright 1999-2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.apache.strutsel.taglib.utils;
-import javax.servlet.jsp.PageContext;
+import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager;
+
import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.tagext.Tag;
-import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager;
/**
* This class is used in the <code>evaluateExpressions</code> method of each
@@ -30,27 +30,24 @@
* evaluate the expression assuming it is an Object, String, Integer, or
* Boolean result.
*/
-public final class EvalHelper
-{
- private EvalHelper() {}
+public final class EvalHelper {
+ private EvalHelper() {
+ }
/**
* Evaluates the attribute value in the JSTL EL engine, returning the raw
- * Object value of the evaluated expression. If the original expression is
- * null, or the resulting value is null, it will return null.
+ * Object value of the evaluated expression. If the original expression
+ * is null, or the resulting value is null, it will return null.
*/
- public static Object eval(String attrName,
- String attrValue,
- Tag tagObject,
- PageContext pageContext)
- throws JspException
- {
- Object result = null;
+ public static Object eval(String attrName, String attrValue, Tag tagObject,
+ PageContext pageContext)
+ throws JspException {
+ Object result = null;
+
if (attrValue != null) {
- result =
- ExpressionEvaluatorManager.
- evaluate(attrName, attrValue, Object.class, tagObject,
- pageContext);
+ result =
+ ExpressionEvaluatorManager.evaluate(attrName, attrValue,
+ Object.class, tagObject, pageContext);
}
return (result);
@@ -58,21 +55,18 @@
/**
* Evaluates the attribute value in the JSTL EL engine, assuming the
- * resulting value is a String object. If the original expression is null,
- * or the resulting value is null, it will return null.
+ * resulting value is a String object. If the original expression is
+ * null, or the resulting value is null, it will return null.
*/
- public static String evalString(String attrName,
- String attrValue,
- Tag tagObject,
- PageContext pageContext)
- throws JspException
- {
- Object result = null;
+ public static String evalString(String attrName, String attrValue,
+ Tag tagObject, PageContext pageContext)
+ throws JspException {
+ Object result = null;
+
if (attrValue != null) {
- result =
- ExpressionEvaluatorManager.
- evaluate(attrName, attrValue, String.class, tagObject,
- pageContext);
+ result =
+ ExpressionEvaluatorManager.evaluate(attrName, attrValue,
+ String.class, tagObject, pageContext);
}
return ((String) result);
@@ -83,17 +77,15 @@
* resulting value is an Integer object. If the original expression is
* null, or the resulting value is null, it will return null.
*/
- public static Integer evalInteger(String attrName,
- String attrValue,
- Tag tagObject,
- PageContext pageContext)
- throws JspException
- {
- Object result = null;
+ public static Integer evalInteger(String attrName, String attrValue,
+ Tag tagObject, PageContext pageContext)
+ throws JspException {
+ Object result = null;
+
if (attrValue != null) {
- result = ExpressionEvaluatorManager.
- evaluate(attrName, attrValue, Integer.class, tagObject,
- pageContext);
+ result =
+ ExpressionEvaluatorManager.evaluate(attrName, attrValue,
+ Integer.class, tagObject, pageContext);
}
return ((Integer) result);
@@ -104,17 +96,15 @@
* resulting value is an Boolean object. If the original expression is
* null, or the resulting value is null, it will return null.
*/
- public static Boolean evalBoolean(String attrName,
- String attrValue,
- Tag tagObject,
- PageContext pageContext)
- throws JspException
- {
- Object result = null;
+ public static Boolean evalBoolean(String attrName, String attrValue,
+ Tag tagObject, PageContext pageContext)
+ throws JspException {
+ Object result = null;
+
if (attrValue != null) {
- result = ExpressionEvaluatorManager.
- evaluate(attrName, attrValue, Boolean.class, tagObject,
- pageContext);
+ result =
+ ExpressionEvaluatorManager.evaluate(attrName, attrValue,
+ Boolean.class, tagObject, pageContext);
}
return ((Boolean) result);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]