You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by jb...@apache.org on 2010/11/20 19:14:04 UTC
svn commit: r1037284 [1/12] - in /tomcat/taglibs/standard/trunk/jstlel: ./
src/main/java/org/apache/taglibs/standard/lang/jstl/
src/main/java/org/apache/taglibs/standard/lang/jstl/parser/
src/main/java/org/apache/taglibs/standard/lang/support/ src/main...
Author: jboynes
Date: Sat Nov 20 18:14:00 2010
New Revision: 1037284
URL: http://svn.apache.org/viewvc?rev=1037284&view=rev
Log:
reformat code to clean up tabs
Modified:
tomcat/taglibs/standard/trunk/jstlel/pom.xml
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/AndOperator.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/ArithmeticOperator.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/ArraySuffix.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/BeanInfoIndexedProperty.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/BeanInfoManager.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/BeanInfoProperty.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/BinaryOperator.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/BinaryOperatorExpression.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/BooleanLiteral.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/ComplexValue.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/Constants.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/DivideOperator.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/ELEvaluator.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/ELException.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/EmptyOperator.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/EnumeratedMap.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/EqualityOperator.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/EqualsOperator.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/Evaluator.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/Expression.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/ExpressionString.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/FloatingPointLiteral.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/FunctionInvocation.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/GreaterThanOperator.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/GreaterThanOrEqualsOperator.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/ImplicitObjects.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/IntegerDivideOperator.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/IntegerLiteral.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/JSTLVariableResolver.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/LessThanOperator.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/LessThanOrEqualsOperator.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/Literal.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/Logger.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/MinusOperator.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/ModulusOperator.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/MultiplyOperator.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/NamedValue.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/NotEqualsOperator.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/NotOperator.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/NullLiteral.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/OrOperator.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/PlusOperator.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/PrimitiveObjects.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/PropertySuffix.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/RelationalOperator.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/StringLiteral.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/UnaryMinusOperator.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/UnaryOperator.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/UnaryOperatorExpression.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/ValueSuffix.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/VariableResolver.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/parser/ELParser.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/parser/ELParserConstants.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/parser/ELParserTokenManager.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/parser/ParseException.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/parser/SimpleCharStream.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/parser/Token.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/parser/TokenMgrError.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/support/ExpressionEvaluator.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/support/ExpressionEvaluatorManager.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/core/ExpressionUtil.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/core/ForEachTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/core/ForTokensTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/core/IfTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/core/ImportTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/core/OutTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/core/ParamTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/core/RedirectTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/core/UrlTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/core/WhenTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/BundleTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/FormatDateTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/FormatNumberTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/MessageTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/ParamTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/ParseDateTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/ParseNumberTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/RequestEncodingTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/SetBundleTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/SetLocaleTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/SetTimeZoneTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/TimeZoneTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/DateParamTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/ParamTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/QueryTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/SetDataSourceTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/TransactionTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/UpdateTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/xml/ExprTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/xml/ParamTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/xml/ParseTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/xml/TransformTag.java
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tlv/ValidationUtil.java
tomcat/taglibs/standard/trunk/jstlel/src/main/resources/META-INF/c-1_0.tld
tomcat/taglibs/standard/trunk/jstlel/src/main/resources/META-INF/fmt-1_0.tld
tomcat/taglibs/standard/trunk/jstlel/src/main/resources/META-INF/sql-1_0.tld
tomcat/taglibs/standard/trunk/jstlel/src/main/resources/META-INF/x-1_0.tld
tomcat/taglibs/standard/trunk/jstlel/src/test/java/org/apache/taglibs/standard/lang/jstl/test/Bean1.java
tomcat/taglibs/standard/trunk/jstlel/src/test/java/org/apache/taglibs/standard/lang/jstl/test/Bean2.java
tomcat/taglibs/standard/trunk/jstlel/src/test/java/org/apache/taglibs/standard/lang/jstl/test/Bean2Editor.java
tomcat/taglibs/standard/trunk/jstlel/src/test/java/org/apache/taglibs/standard/lang/jstl/test/EvaluationTest.java
tomcat/taglibs/standard/trunk/jstlel/src/test/java/org/apache/taglibs/standard/lang/jstl/test/PageContextImpl.java
tomcat/taglibs/standard/trunk/jstlel/src/test/java/org/apache/taglibs/standard/lang/jstl/test/ParserTest.java
tomcat/taglibs/standard/trunk/jstlel/src/test/java/org/apache/taglibs/standard/lang/jstl/test/StaticFunctionTest.java
tomcat/taglibs/standard/trunk/jstlel/src/test/java/org/apache/taglibs/standard/lang/jstl/test/beans/Factory.java
tomcat/taglibs/standard/trunk/jstlel/src/test/java/org/apache/taglibs/standard/lang/jstl/test/beans/PrivateBean1a.java
tomcat/taglibs/standard/trunk/jstlel/src/test/java/org/apache/taglibs/standard/lang/jstl/test/beans/PrivateBean2b.java
tomcat/taglibs/standard/trunk/jstlel/src/test/java/org/apache/taglibs/standard/lang/jstl/test/beans/PrivateBean2c.java
tomcat/taglibs/standard/trunk/jstlel/src/test/java/org/apache/taglibs/standard/lang/jstl/test/beans/PrivateBean2d.java
tomcat/taglibs/standard/trunk/jstlel/src/test/java/org/apache/taglibs/standard/lang/jstl/test/beans/PublicBean1.java
tomcat/taglibs/standard/trunk/jstlel/src/test/java/org/apache/taglibs/standard/lang/jstl/test/beans/PublicBean1b.java
tomcat/taglibs/standard/trunk/jstlel/src/test/java/org/apache/taglibs/standard/lang/jstl/test/beans/PublicBean2a.java
tomcat/taglibs/standard/trunk/jstlel/src/test/java/org/apache/taglibs/standard/lang/jstl/test/beans/PublicInterface2.java
Modified: tomcat/taglibs/standard/trunk/jstlel/pom.xml
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/pom.xml?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/pom.xml (original)
+++ tomcat/taglibs/standard/trunk/jstlel/pom.xml Sat Nov 20 18:14:00 2010
@@ -20,161 +20,190 @@
Enable Cactus tests
-->
<project
- xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.taglibs</groupId>
- <artifactId>taglibs-parent</artifactId>
- <version>1-SNAPSHOT</version>
- </parent>
-
- <artifactId>taglibs-standard-jstlel</artifactId>
- <version>1.2-SNAPSHOT</version>
- <packaging>bundle</packaging>
-
- <name>Apache Standard Taglib - JSTL 1.0 EL Support</name>
-
- <inceptionYear>2001</inceptionYear>
- <description>
- An implementation of the JSP Standard Tag Library (JSTL).
- </description>
-
- <url>http://tomcat.apache.org/taglibs/standard/</url>
-
- <scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/tomcat/taglibs/standard/trunk/jstlel</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/tomcat/taglibs/standard/trunk/jstlel</developerConnection>
- <url>http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel</url>
- </scm>
-
- <developers>
- <developer><name>Pierre Delisle</name></developer>
- <developer><name>Shawn Bayern</name></developer>
- <developer><name>Nathan Abramson</name></developer>
- <developer><name>Hans Bergsten</name></developer>
- <developer><name>Scott Hasse</name></developer>
- <developer><name>Justyna Horwat</name></developer>
- <developer><name>Mark Kolb</name></developer>
- <developer><name>Jan Luehe</name></developer>
- <developer><name>Glenn Nielsen</name></developer>
- <developer><name>Dmitri Plotnikov</name></developer>
- <developer><name>Felipe Leme</name></developer>
- <developer><name>Henri Yandell</name></developer>
- <developer><name>Bjorn Townsend</name></developer>
- </developers>
-
- <contributors>
- <contributor><name>Robert Goff</name></contributor>
- </contributors>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.taglibs</groupId>
- <artifactId>taglibs-standard-spec</artifactId>
- <version>1.2-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.taglibs</groupId>
- <artifactId>taglibs-standard-impl</artifactId>
- <version>1.2-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>jsp-api</artifactId>
- <version>2.1</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>xalan</groupId>
- <artifactId>xalan</artifactId>
- <version>2.7.1</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.8.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.easymock</groupId>
- <artifactId>easymock</artifactId>
- <version>3.0</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.taglibs</groupId>
+ <artifactId>taglibs-parent</artifactId>
+ <version>1-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>taglibs-standard-jstlel</artifactId>
+ <version>1.2-SNAPSHOT</version>
+ <packaging>bundle</packaging>
+
+ <name>Apache Standard Taglib - JSTL 1.0 EL Support</name>
+
+ <inceptionYear>2001</inceptionYear>
+ <description>
+ An implementation of the JSP Standard Tag Library (JSTL).
+ </description>
+
+ <url>http://tomcat.apache.org/taglibs/standard/</url>
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/tomcat/taglibs/standard/trunk/jstlel</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/tomcat/taglibs/standard/trunk/jstlel
+ </developerConnection>
+ <url>http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel</url>
+ </scm>
+
+ <developers>
+ <developer>
+ <name>Pierre Delisle</name>
+ </developer>
+ <developer>
+ <name>Shawn Bayern</name>
+ </developer>
+ <developer>
+ <name>Nathan Abramson</name>
+ </developer>
+ <developer>
+ <name>Hans Bergsten</name>
+ </developer>
+ <developer>
+ <name>Scott Hasse</name>
+ </developer>
+ <developer>
+ <name>Justyna Horwat</name>
+ </developer>
+ <developer>
+ <name>Mark Kolb</name>
+ </developer>
+ <developer>
+ <name>Jan Luehe</name>
+ </developer>
+ <developer>
+ <name>Glenn Nielsen</name>
+ </developer>
+ <developer>
+ <name>Dmitri Plotnikov</name>
+ </developer>
+ <developer>
+ <name>Felipe Leme</name>
+ </developer>
+ <developer>
+ <name>Henri Yandell</name>
+ </developer>
+ <developer>
+ <name>Bjorn Townsend</name>
+ </developer>
+ </developers>
+
+ <contributors>
+ <contributor>
+ <name>Robert Goff</name>
+ </contributor>
+ </contributors>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.taglibs</groupId>
+ <artifactId>taglibs-standard-spec</artifactId>
+ <version>1.2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.taglibs</groupId>
+ <artifactId>taglibs-standard-impl</artifactId>
+ <version>1.2-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <version>1.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>xalan</groupId>
+ <artifactId>xalan</artifactId>
+ <version>2.7.1</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymock</artifactId>
+ <version>3.0</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
<build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <excludeDependencies>true</excludeDependencies>
- <instructions>
- <Export-Package>*;version="1.2"</Export-Package>
- <Import-Package>org.apache.x*;resolution:=optional,*</Import-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <configuration>
+ <excludeDependencies>true</excludeDependencies>
+ <instructions>
+ <Export-Package>*;version="1.2"</Export-Package>
+ <Import-Package>org.apache.x*;resolution:=optional,*</Import-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
</build>
- <reporting>
- <plugins>
- <plugin>
- <artifactId>maven-pmd-plugin</artifactId>
- <version>2.3</version>
- <configuration>
- <targetJdk>${maven.compiler.target}</targetJdk>
- </configuration>
- <reportSets>
- <reportSet>
- <reports>
- <report>pmd</report>
- <report>cpd</report>
- </reports>
- </reportSet>
- </reportSets>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>taglist-maven-plugin</artifactId>
- <version>2.4</version>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>javancss-maven-plugin</artifactId>
- <version>2.0</version>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>findbugs-maven-plugin</artifactId>
- <version>1.2</version>
- <configuration>
- <threshold>Normal</threshold>
- <effort>Default</effort>
-<!-- <excludeFilterFile>${basedir}/findbugs-exclude-filter.xml</excludeFilterFile> -->
- </configuration>
- </plugin>
- </plugins>
- </reporting>
+ <reporting>
+ <plugins>
+ <plugin>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <targetJdk>${maven.compiler.target}</targetJdk>
+ </configuration>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>pmd</report>
+ <report>cpd</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>taglist-maven-plugin</artifactId>
+ <version>2.4</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>javancss-maven-plugin</artifactId>
+ <version>2.0</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <version>1.2</version>
+ <configuration>
+ <threshold>Normal</threshold>
+ <effort>Default</effort>
+ <!-- <excludeFilterFile>${basedir}/findbugs-exclude-filter.xml</excludeFilterFile> -->
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
</project>
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/AndOperator.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/AndOperator.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/AndOperator.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/AndOperator.java Sat Nov 20 18:14:00 2010
@@ -13,92 +13,85 @@
* 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.taglibs.standard.lang.jstl;
/**
- *
* <p>The implementation of the and operator
- *
+ *
* @author Nathan Abramson - Art Technology Group
* @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author$
- **/
+ */
public class AndOperator
- extends BinaryOperator
-{
- //-------------------------------------
- // Singleton
- //-------------------------------------
-
- public static final AndOperator SINGLETON =
- new AndOperator ();
-
- //-------------------------------------
- /**
- *
- * Constructor
- **/
- public AndOperator ()
- {
- }
-
- //-------------------------------------
- // Expression methods
- //-------------------------------------
- /**
- *
- * Returns the symbol representing the operator
- **/
- public String getOperatorSymbol ()
- {
- return "and";
- }
-
- //-------------------------------------
- /**
- *
- * Applies the operator to the given value
- **/
- public Object apply (Object pLeft,
- Object pRight,
- Object pContext,
- Logger pLogger)
- throws ELException
- {
- // Coerce the values to booleans
- boolean left =
- Coercions.coerceToBoolean (pLeft, pLogger).booleanValue ();
- boolean right =
- Coercions.coerceToBoolean (pRight, pLogger).booleanValue ();
-
- return PrimitiveObjects.getBoolean (left && right);
- }
-
- //-------------------------------------
- /**
- *
- * Returns true if evaluation is necessary given the specified Left
- * value. The And/OrOperators make use of this
- **/
- public boolean shouldEvaluate (Object pLeft)
- {
- return
- (pLeft instanceof Boolean) &&
- ((Boolean) pLeft).booleanValue () == true;
- }
-
- //-------------------------------------
- /**
- *
- * Returns true if the operator expects its arguments to be coerced
- * to Booleans. The And/Or operators set this to true.
- **/
- public boolean shouldCoerceToBoolean ()
- {
- return true;
- }
+ extends BinaryOperator {
+ //-------------------------------------
+ // Singleton
+ //-------------------------------------
+
+ public static final AndOperator SINGLETON =
+ new AndOperator();
+
+ //-------------------------------------
+
+ /**
+ * Constructor
+ */
+ public AndOperator() {
+ }
+
+ //-------------------------------------
+ // Expression methods
+ //-------------------------------------
+
+ /**
+ * Returns the symbol representing the operator
+ */
+ public String getOperatorSymbol() {
+ return "and";
+ }
+
+ //-------------------------------------
+
+ /**
+ * Applies the operator to the given value
+ */
+ public Object apply(Object pLeft,
+ Object pRight,
+ Object pContext,
+ Logger pLogger)
+ throws ELException {
+ // Coerce the values to booleans
+ boolean left =
+ Coercions.coerceToBoolean(pLeft, pLogger).booleanValue();
+ boolean right =
+ Coercions.coerceToBoolean(pRight, pLogger).booleanValue();
+
+ return PrimitiveObjects.getBoolean(left && right);
+ }
+
+ //-------------------------------------
+
+ /**
+ * Returns true if evaluation is necessary given the specified Left
+ * value. The And/OrOperators make use of this
+ */
+ public boolean shouldEvaluate(Object pLeft) {
+ return
+ (pLeft instanceof Boolean) &&
+ ((Boolean) pLeft).booleanValue() == true;
+ }
+
+ //-------------------------------------
+
+ /**
+ * Returns true if the operator expects its arguments to be coerced
+ * to Booleans. The And/Or operators set this to true.
+ */
+ public boolean shouldCoerceToBoolean() {
+ return true;
+ }
- //-------------------------------------
+ //-------------------------------------
}
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/ArithmeticOperator.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/ArithmeticOperator.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/ArithmeticOperator.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/ArithmeticOperator.java Sat Nov 20 18:14:00 2010
@@ -13,52 +13,49 @@
* 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.taglibs.standard.lang.jstl;
/**
- *
* <p>This is the superclass for all binary arithmetic operators
- *
+ *
* @author Nathan Abramson - Art Technology Group
* @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author$
- **/
+ */
public abstract class ArithmeticOperator
- extends BinaryOperator
-{
- //-------------------------------------
- /**
- *
- * Applies the operator to the given value
- **/
- public Object apply (Object pLeft,
- Object pRight,
- Object pContext,
- Logger pLogger)
- throws ELException
- {
- return Coercions.applyArithmeticOperator (pLeft, pRight, this, pLogger);
- }
-
- //-------------------------------------
- /**
- *
- * Applies the operator to the given double values, returning a double
- **/
- public abstract double apply (double pLeft,
- double pRight,
- Logger pLogger);
-
- //-------------------------------------
- /**
- *
- * Applies the operator to the given double values, returning a double
- **/
- public abstract long apply (long pLeft,
- long pRight,
- Logger pLogger);
-
- //-------------------------------------
+ extends BinaryOperator {
+ //-------------------------------------
+
+ /**
+ * Applies the operator to the given value
+ */
+ public Object apply(Object pLeft,
+ Object pRight,
+ Object pContext,
+ Logger pLogger)
+ throws ELException {
+ return Coercions.applyArithmeticOperator(pLeft, pRight, this, pLogger);
+ }
+
+ //-------------------------------------
+
+ /**
+ * Applies the operator to the given double values, returning a double
+ */
+ public abstract double apply(double pLeft,
+ double pRight,
+ Logger pLogger);
+
+ //-------------------------------------
+
+ /**
+ * Applies the operator to the given double values, returning a double
+ */
+ public abstract long apply(long pLeft,
+ long pRight,
+ Logger pLogger);
+
+ //-------------------------------------
}
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/ArraySuffix.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/ArraySuffix.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/ArraySuffix.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/ArraySuffix.java Sat Nov 20 18:14:00 2010
@@ -13,7 +13,7 @@
* 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.taglibs.standard.lang.jstl;
@@ -23,11 +23,10 @@ import java.util.List;
import java.util.Map;
/**
- *
* <p>Represents an operator that obtains a Map entry, an indexed
* value, a property value, or an indexed property value of an object.
* The following are the rules for evaluating this operator:
- *
+ * <p/>
* <ul><pre>
* Evaluating a[b] (assuming a.b == a["b"])
* a is null
@@ -50,267 +49,261 @@ import java.util.Map;
* a.get(b) or Array.get(a, b) throws other exception
* error
* return a.get(b) or Array.get(a, b)
- *
+ * <p/>
* coerce b to String
* b is a readable property of a
* getter throws an exception
* error
* otherwise
* return result of getter call
- *
+ * <p/>
* otherwise
* error
* </pre></ul>
- *
+ *
* @author Nathan Abramson - Art Technology Group
* @author Shawn Bayern
* @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author$
- **/
+ */
public class ArraySuffix
- extends ValueSuffix
-{
- //-------------------------------------
- // Constants
- //-------------------------------------
-
- // Zero-argument array
- static Object [] sNoArgs = new Object [0];
-
- //-------------------------------------
- // Properties
- //-------------------------------------
- // property index
-
- Expression mIndex;
- public Expression getIndex ()
- { return mIndex; }
- public void setIndex (Expression pIndex)
- { mIndex = pIndex; }
-
- //-------------------------------------
- /**
- *
- * Constructor
- **/
- public ArraySuffix (Expression pIndex)
- {
- mIndex = pIndex;
- }
-
- //-------------------------------------
- /**
- *
- * Gets the value of the index
- **/
- Object evaluateIndex (Object pContext,
- VariableResolver pResolver,
- Map functions,
- String defaultPrefix,
- Logger pLogger)
- throws ELException
- {
- return mIndex.evaluate (pContext, pResolver, functions, defaultPrefix,
- pLogger);
- }
-
- //-------------------------------------
- /**
- *
- * Returns the operator symbol
- **/
- String getOperatorSymbol ()
- {
- return "[]";
- }
-
- //-------------------------------------
- // ValueSuffix methods
- //-------------------------------------
- /**
- *
- * Returns the expression in the expression language syntax
- **/
- public String getExpressionString ()
- {
- return "[" + mIndex.getExpressionString () + "]";
- }
-
- //-------------------------------------
- /**
- *
- * Evaluates the expression in the given context, operating on the
- * given value.
- **/
- public Object evaluate (Object pValue,
- Object pContext,
- VariableResolver pResolver,
- Map functions,
- String defaultPrefix,
- Logger pLogger)
- throws ELException
- {
- Object indexVal;
- String indexStr;
- BeanInfoProperty property;
- BeanInfoIndexedProperty ixproperty;
-
- // Check for null value
- if (pValue == null) {
- if (pLogger.isLoggingWarning ()) {
- pLogger.logWarning
- (Constants.CANT_GET_INDEXED_VALUE_OF_NULL,
- getOperatorSymbol ());
- }
- return null;
+ extends ValueSuffix {
+ //-------------------------------------
+ // Constants
+ //-------------------------------------
+
+ // Zero-argument array
+ static Object[] sNoArgs = new Object[0];
+
+ //-------------------------------------
+ // Properties
+ //-------------------------------------
+ // property index
+
+ Expression mIndex;
+
+ public Expression getIndex() {
+ return mIndex;
}
- // Evaluate the index
- else if ((indexVal = evaluateIndex (pContext, pResolver,
- functions, defaultPrefix, pLogger)) ==
- null) {
- if (pLogger.isLoggingWarning ()) {
- pLogger.logWarning
- (Constants.CANT_GET_NULL_INDEX,
- getOperatorSymbol ());
- }
- return null;
+ public void setIndex(Expression pIndex) {
+ mIndex = pIndex;
}
- // See if it's a Map
- else if (pValue instanceof Map) {
- Map val = (Map) pValue;
- return val.get (indexVal);
+ //-------------------------------------
+
+ /**
+ * Constructor
+ */
+ public ArraySuffix(Expression pIndex) {
+ mIndex = pIndex;
}
- // See if it's a List or array
- else if (pValue instanceof List ||
- pValue.getClass ().isArray ()) {
- Integer indexObj = Coercions.coerceToInteger (indexVal, pLogger);
- if (indexObj == null) {
- if (pLogger.isLoggingError ()) {
- pLogger.logError
- (Constants.BAD_INDEX_VALUE,
- getOperatorSymbol (),
- indexVal.getClass ().getName ());
- }
- return null;
- }
- else if (pValue instanceof List) {
- try {
- return ((List) pValue).get (indexObj.intValue ());
- }
- catch (ArrayIndexOutOfBoundsException exc) {
- if (pLogger.isLoggingWarning ()) {
- pLogger.logWarning
- (Constants.EXCEPTION_ACCESSING_LIST,
- exc,
- indexObj);
- }
- return null;
- }
- catch (IndexOutOfBoundsException exc) {
- if (pLogger.isLoggingWarning ()) {
- pLogger.logWarning
- (Constants.EXCEPTION_ACCESSING_LIST,
- exc,
- indexObj);
- }
- return null;
- }
- catch (Exception exc) {
- if (pLogger.isLoggingError ()) {
- pLogger.logError
- (Constants.EXCEPTION_ACCESSING_LIST,
- exc,
- indexObj);
- }
- return null;
- }
- }
- else {
- try {
- return Array.get (pValue, indexObj.intValue ());
- }
- catch (ArrayIndexOutOfBoundsException exc) {
- if (pLogger.isLoggingWarning ()) {
- pLogger.logWarning
- (Constants.EXCEPTION_ACCESSING_ARRAY,
- exc,
- indexObj);
- }
- return null;
- }
- catch (IndexOutOfBoundsException exc) {
- if (pLogger.isLoggingWarning ()) {
- pLogger.logWarning
- (Constants.EXCEPTION_ACCESSING_ARRAY,
- exc,
- indexObj);
- }
- return null;
- }
- catch (Exception exc) {
- if (pLogger.isLoggingError ()) {
- pLogger.logError
- (Constants.EXCEPTION_ACCESSING_ARRAY,
- exc,
- indexObj);
- }
- return null;
- }
- }
+ //-------------------------------------
+
+ /**
+ * Gets the value of the index
+ */
+ Object evaluateIndex(Object pContext,
+ VariableResolver pResolver,
+ Map functions,
+ String defaultPrefix,
+ Logger pLogger)
+ throws ELException {
+ return mIndex.evaluate(pContext, pResolver, functions, defaultPrefix,
+ pLogger);
}
- // Coerce to a String for property access
+ //-------------------------------------
- else if ((indexStr = Coercions.coerceToString (indexVal, pLogger)) ==
- null) {
- return null;
+ /**
+ * Returns the operator symbol
+ */
+ String getOperatorSymbol() {
+ return "[]";
}
- // Look for a JavaBean property
- else if ((property = BeanInfoManager.getBeanInfoProperty
- (pValue.getClass (),
- indexStr,
- pLogger)) != null &&
- property.getReadMethod () != null) {
- try {
- return property.getReadMethod ().invoke (pValue, sNoArgs);
- }
- catch (InvocationTargetException exc) {
- if (pLogger.isLoggingError ()) {
- pLogger.logError
- (Constants.ERROR_GETTING_PROPERTY,
- exc.getTargetException (),
- indexStr,
- pValue.getClass ().getName ());
- }
- return null;
- }
- catch (Exception exc) {
- if (pLogger.isLoggingError ()) {
- pLogger.logError
- (Constants.ERROR_GETTING_PROPERTY,
- exc,
- indexStr,
- pValue.getClass ().getName ());
- }
- return null;
- }
+ //-------------------------------------
+ // ValueSuffix methods
+ //-------------------------------------
+
+ /**
+ * Returns the expression in the expression language syntax
+ */
+ public String getExpressionString() {
+ return "[" + mIndex.getExpressionString() + "]";
}
- else {
- if (pLogger.isLoggingError ()) {
- pLogger.logError
- (Constants.CANT_FIND_INDEX,
- indexVal,
- pValue.getClass ().getName (),
- getOperatorSymbol ());
- }
- return null;
+ //-------------------------------------
+
+ /**
+ * Evaluates the expression in the given context, operating on the
+ * given value.
+ */
+ public Object evaluate(Object pValue,
+ Object pContext,
+ VariableResolver pResolver,
+ Map functions,
+ String defaultPrefix,
+ Logger pLogger)
+ throws ELException {
+ Object indexVal;
+ String indexStr;
+ BeanInfoProperty property;
+ BeanInfoIndexedProperty ixproperty;
+
+ // Check for null value
+ if (pValue == null) {
+ if (pLogger.isLoggingWarning()) {
+ pLogger.logWarning
+ (Constants.CANT_GET_INDEXED_VALUE_OF_NULL,
+ getOperatorSymbol());
+ }
+ return null;
+ }
+
+ // Evaluate the index
+ else if ((indexVal = evaluateIndex(pContext, pResolver,
+ functions, defaultPrefix, pLogger)) ==
+ null) {
+ if (pLogger.isLoggingWarning()) {
+ pLogger.logWarning
+ (Constants.CANT_GET_NULL_INDEX,
+ getOperatorSymbol());
+ }
+ return null;
+ }
+
+ // See if it's a Map
+ else if (pValue instanceof Map) {
+ Map val = (Map) pValue;
+ return val.get(indexVal);
+ }
+
+ // See if it's a List or array
+ else if (pValue instanceof List ||
+ pValue.getClass().isArray()) {
+ Integer indexObj = Coercions.coerceToInteger(indexVal, pLogger);
+ if (indexObj == null) {
+ if (pLogger.isLoggingError()) {
+ pLogger.logError
+ (Constants.BAD_INDEX_VALUE,
+ getOperatorSymbol(),
+ indexVal.getClass().getName());
+ }
+ return null;
+ } else if (pValue instanceof List) {
+ try {
+ return ((List) pValue).get(indexObj.intValue());
+ }
+ catch (ArrayIndexOutOfBoundsException exc) {
+ if (pLogger.isLoggingWarning()) {
+ pLogger.logWarning
+ (Constants.EXCEPTION_ACCESSING_LIST,
+ exc,
+ indexObj);
+ }
+ return null;
+ }
+ catch (IndexOutOfBoundsException exc) {
+ if (pLogger.isLoggingWarning()) {
+ pLogger.logWarning
+ (Constants.EXCEPTION_ACCESSING_LIST,
+ exc,
+ indexObj);
+ }
+ return null;
+ }
+ catch (Exception exc) {
+ if (pLogger.isLoggingError()) {
+ pLogger.logError
+ (Constants.EXCEPTION_ACCESSING_LIST,
+ exc,
+ indexObj);
+ }
+ return null;
+ }
+ } else {
+ try {
+ return Array.get(pValue, indexObj.intValue());
+ }
+ catch (ArrayIndexOutOfBoundsException exc) {
+ if (pLogger.isLoggingWarning()) {
+ pLogger.logWarning
+ (Constants.EXCEPTION_ACCESSING_ARRAY,
+ exc,
+ indexObj);
+ }
+ return null;
+ }
+ catch (IndexOutOfBoundsException exc) {
+ if (pLogger.isLoggingWarning()) {
+ pLogger.logWarning
+ (Constants.EXCEPTION_ACCESSING_ARRAY,
+ exc,
+ indexObj);
+ }
+ return null;
+ }
+ catch (Exception exc) {
+ if (pLogger.isLoggingError()) {
+ pLogger.logError
+ (Constants.EXCEPTION_ACCESSING_ARRAY,
+ exc,
+ indexObj);
+ }
+ return null;
+ }
+ }
+ }
+
+ // Coerce to a String for property access
+
+ else if ((indexStr = Coercions.coerceToString(indexVal, pLogger)) ==
+ null) {
+ return null;
+ }
+
+ // Look for a JavaBean property
+ else if ((property = BeanInfoManager.getBeanInfoProperty
+ (pValue.getClass(),
+ indexStr,
+ pLogger)) != null &&
+ property.getReadMethod() != null) {
+ try {
+ return property.getReadMethod().invoke(pValue, sNoArgs);
+ }
+ catch (InvocationTargetException exc) {
+ if (pLogger.isLoggingError()) {
+ pLogger.logError
+ (Constants.ERROR_GETTING_PROPERTY,
+ exc.getTargetException(),
+ indexStr,
+ pValue.getClass().getName());
+ }
+ return null;
+ }
+ catch (Exception exc) {
+ if (pLogger.isLoggingError()) {
+ pLogger.logError
+ (Constants.ERROR_GETTING_PROPERTY,
+ exc,
+ indexStr,
+ pValue.getClass().getName());
+ }
+ return null;
+ }
+ } else {
+ if (pLogger.isLoggingError()) {
+ pLogger.logError
+ (Constants.CANT_FIND_INDEX,
+ indexVal,
+ pValue.getClass().getName(),
+ getOperatorSymbol());
+ }
+ return null;
+ }
}
- }
- //-------------------------------------
+ //-------------------------------------
}
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/BeanInfoIndexedProperty.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/BeanInfoIndexedProperty.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/BeanInfoIndexedProperty.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/BeanInfoIndexedProperty.java Sat Nov 20 18:14:00 2010
@@ -13,131 +13,114 @@
* 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.taglibs.standard.lang.jstl;
-
import java.beans.IndexedPropertyDescriptor;
-
import java.lang.reflect.Method;
-
/**
-
- *
-
* <p>This contains the information for one indexed property in a
-
+ * <p/>
* BeanInfo - IndexedPropertyDescriptor, read method, and write
-
+ * <p/>
* method. This class is necessary because the read/write methods in
-
+ * <p/>
* the IndexedPropertyDescriptor may not be accessible if the bean
-
+ * <p/>
* given to the introspector is not a public class. In this case, a
-
+ * <p/>
* publicly accessible version of the method must be found by
-
+ * <p/>
* searching for a public superclass/interface that declares the
-
+ * <p/>
* method (this searching is done by the BeanInfoManager).
-
- *
-
+ *
* @author Nathan Abramson - Art Technology Group
-
* @version $Change: 181181 $$DateTime: 2001/06/26 09:55:09 $$Author$
-
- **/
-
+ */
public class BeanInfoIndexedProperty
{
- //-------------------------------------
-
- // Properties
-
- //-------------------------------------
-
- // property readMethod
-
-
-
- Method mReadMethod;
-
- public Method getReadMethod ()
-
- { return mReadMethod; }
-
-
+ //-------------------------------------
- //-------------------------------------
+ // Properties
- // property writeMethod
+ //-------------------------------------
+ // property readMethod
- Method mWriteMethod;
+ Method mReadMethod;
- public Method getWriteMethod ()
+ public Method getReadMethod()
- { return mWriteMethod; }
+ {
+ return mReadMethod;
+ }
+ //-------------------------------------
- //-------------------------------------
+ // property writeMethod
- // property propertyDescriptor
+ Method mWriteMethod;
+ public Method getWriteMethod()
- IndexedPropertyDescriptor mIndexedPropertyDescriptor;
+ {
+ return mWriteMethod;
+ }
- public IndexedPropertyDescriptor getIndexedPropertyDescriptor ()
- { return mIndexedPropertyDescriptor; }
+ //-------------------------------------
+ // property propertyDescriptor
- //-------------------------------------
+ IndexedPropertyDescriptor mIndexedPropertyDescriptor;
- /**
+ public IndexedPropertyDescriptor getIndexedPropertyDescriptor()
- *
+ {
+ return mIndexedPropertyDescriptor;
+ }
- * Constructor
- **/
+ //-------------------------------------
- public BeanInfoIndexedProperty
+ /**
+ * Constructor
+ */
- (Method pReadMethod,
+ public BeanInfoIndexedProperty
- Method pWriteMethod,
+ (Method pReadMethod,
- IndexedPropertyDescriptor pIndexedPropertyDescriptor)
+ Method pWriteMethod,
- {
+ IndexedPropertyDescriptor pIndexedPropertyDescriptor)
- mReadMethod = pReadMethod;
+ {
- mWriteMethod = pWriteMethod;
+ mReadMethod = pReadMethod;
- mIndexedPropertyDescriptor = pIndexedPropertyDescriptor;
+ mWriteMethod = pWriteMethod;
- }
+ mIndexedPropertyDescriptor = pIndexedPropertyDescriptor;
+ }
- //-------------------------------------
+ //-------------------------------------
}
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/BeanInfoManager.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/BeanInfoManager.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/BeanInfoManager.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/BeanInfoManager.java Sat Nov 20 18:14:00 2010
@@ -13,7 +13,7 @@
* 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.taglibs.standard.lang.jstl;
@@ -29,355 +29,342 @@ import java.util.HashMap;
import java.util.Map;
/**
- *
* <p>Manages the BeanInfo for one class - contains the BeanInfo, and
* also a mapping from property name to BeanInfoProperty. There are
* also static methods for accessing the BeanInfoManager for a class -
* those mappings are cached permanently so that once the
* BeanInfoManager is calculated, it doesn't have to be calculated
* again.
- *
+ *
* @author Nathan Abramson - Art Technology Group
* @version $Change: 181181 $$DateTime: 2001/06/26 09:55:09 $$Author$
- **/
+ */
+
+public class BeanInfoManager {
+ //-------------------------------------
+ // Properties
+ //-------------------------------------
+ // property beanClass
+
+ Class mBeanClass;
+
+ public Class getBeanClass() {
+ return mBeanClass;
+ }
+
+ //-------------------------------------
+ // Member variables
+ //-------------------------------------
+
+ // The BeanInfo
+ BeanInfo mBeanInfo;
+
+ // Mapping from property name to BeanInfoProperty
+ Map mPropertyByName;
+
+ // Mapping from property name to BeanInfoIndexedProperty
+ Map mIndexedPropertyByName;
+
+ // Mapping from event set name to event set descriptor
+ Map mEventSetByName;
+
+ // Flag if this is initialized
+ boolean mInitialized;
+
+ // The global mapping from class to BeanInfoManager
+ static Map mBeanInfoManagerByClass = new HashMap();
+
+ //-------------------------------------
+
+ /**
+ * Constructor
+ */
+ BeanInfoManager(Class pBeanClass) {
+ mBeanClass = pBeanClass;
+ }
+
+ //-------------------------------------
+
+ /**
+ * Returns the BeanInfoManager for the specified class
+ */
+ public static BeanInfoManager getBeanInfoManager(Class pClass) {
+ BeanInfoManager ret = (BeanInfoManager)
+ mBeanInfoManagerByClass.get(pClass);
+ if (ret == null) {
+ ret = createBeanInfoManager(pClass);
+ }
+ return ret;
+ }
+
+ //-------------------------------------
+
+ /**
+ * Creates and registers the BeanInfoManager for the given class if
+ * it isn't already registered.
+ */
+ static synchronized BeanInfoManager createBeanInfoManager(Class pClass) {
+ // Because this method is synchronized statically, the
+ // BeanInfoManager is not initialized at this time (otherwise it
+ // could end up being a bottleneck for the entire system). It is
+ // put into the map in an uninitialized state. The first time
+ // someone tries to use it, it will be initialized (with proper
+ // synchronizations in place to make sure it is only initialized
+ // once).
+
+ BeanInfoManager ret = (BeanInfoManager)
+ mBeanInfoManagerByClass.get(pClass);
+ if (ret == null) {
+ ret = new BeanInfoManager(pClass);
+ mBeanInfoManagerByClass.put(pClass, ret);
+ }
+ return ret;
+ }
-public class BeanInfoManager
-{
- //-------------------------------------
- // Properties
- //-------------------------------------
- // property beanClass
-
- Class mBeanClass;
- public Class getBeanClass ()
- { return mBeanClass; }
-
- //-------------------------------------
- // Member variables
- //-------------------------------------
-
- // The BeanInfo
- BeanInfo mBeanInfo;
-
- // Mapping from property name to BeanInfoProperty
- Map mPropertyByName;
-
- // Mapping from property name to BeanInfoIndexedProperty
- Map mIndexedPropertyByName;
-
- // Mapping from event set name to event set descriptor
- Map mEventSetByName;
-
- // Flag if this is initialized
- boolean mInitialized;
-
- // The global mapping from class to BeanInfoManager
- static Map mBeanInfoManagerByClass = new HashMap ();
-
- //-------------------------------------
- /**
- *
- * Constructor
- **/
- BeanInfoManager (Class pBeanClass)
- {
- mBeanClass = pBeanClass;
- }
-
- //-------------------------------------
- /**
- *
- * Returns the BeanInfoManager for the specified class
- **/
- public static BeanInfoManager getBeanInfoManager (Class pClass)
- {
- BeanInfoManager ret = (BeanInfoManager)
- mBeanInfoManagerByClass.get (pClass);
- if (ret == null) {
- ret = createBeanInfoManager (pClass);
- }
- return ret;
- }
-
- //-------------------------------------
- /**
- *
- * Creates and registers the BeanInfoManager for the given class if
- * it isn't already registered.
- **/
- static synchronized BeanInfoManager createBeanInfoManager (Class pClass)
- {
- // Because this method is synchronized statically, the
- // BeanInfoManager is not initialized at this time (otherwise it
- // could end up being a bottleneck for the entire system). It is
- // put into the map in an uninitialized state. The first time
- // someone tries to use it, it will be initialized (with proper
- // synchronizations in place to make sure it is only initialized
- // once).
-
- BeanInfoManager ret = (BeanInfoManager)
- mBeanInfoManagerByClass.get (pClass);
- if (ret == null) {
- ret = new BeanInfoManager (pClass);
- mBeanInfoManagerByClass.put (pClass, ret);
- }
- return ret;
- }
-
- //-------------------------------------
- /**
- *
- * Returns the BeanInfoProperty for the specified property in the
- * given class, or null if not found.
- **/
- public static BeanInfoProperty getBeanInfoProperty
- (Class pClass,
- String pPropertyName,
- Logger pLogger)
- throws ELException
- {
- return getBeanInfoManager (pClass).getProperty (pPropertyName, pLogger);
- }
-
- //-------------------------------------
- /**
- *
- * Returns the BeanInfoIndexedProperty for the specified property in
- * the given class, or null if not found.
- **/
- public static BeanInfoIndexedProperty getBeanInfoIndexedProperty
- (Class pClass,
- String pIndexedPropertyName,
- Logger pLogger)
- throws ELException
- {
- return getBeanInfoManager
- (pClass).getIndexedProperty (pIndexedPropertyName, pLogger);
- }
-
- //-------------------------------------
- /**
- *
- * Makes sure that this class has been initialized, and synchronizes
- * the initialization if it's required.
- **/
- void checkInitialized (Logger pLogger)
- throws ELException
- {
- if (!mInitialized) {
- synchronized (this) {
- if (!mInitialized) {
- initialize (pLogger);
- mInitialized = true;
- }
- }
- }
- }
-
- //-------------------------------------
- /**
- *
- * Initializes by mapping property names to BeanInfoProperties
- **/
- void initialize (Logger pLogger)
- throws ELException
- {
- try {
- mBeanInfo = Introspector.getBeanInfo (mBeanClass);
-
- mPropertyByName = new HashMap ();
- mIndexedPropertyByName = new HashMap ();
- PropertyDescriptor [] pds = mBeanInfo.getPropertyDescriptors ();
- for (int i = 0; pds != null && i < pds.length; i++) {
- // Treat as both an indexed property and a normal property
- PropertyDescriptor pd = pds [i];
- if (pd instanceof IndexedPropertyDescriptor) {
- IndexedPropertyDescriptor ipd = (IndexedPropertyDescriptor) pd;
- Method readMethod = getPublicMethod (ipd.getIndexedReadMethod ());
- Method writeMethod = getPublicMethod (ipd.getIndexedWriteMethod ());
- BeanInfoIndexedProperty property = new BeanInfoIndexedProperty
- (readMethod,
- writeMethod,
- ipd);
-
- mIndexedPropertyByName.put (ipd.getName (), property);
- }
-
- Method readMethod = getPublicMethod (pd.getReadMethod ());
- Method writeMethod = getPublicMethod (pd.getWriteMethod ());
- BeanInfoProperty property = new BeanInfoProperty
- (readMethod,
- writeMethod,
- pd);
-
- mPropertyByName.put (pd.getName (), property);
- }
-
- mEventSetByName = new HashMap ();
- EventSetDescriptor [] esds = mBeanInfo.getEventSetDescriptors ();
- for (int i = 0; esds != null && i < esds.length; i++) {
- EventSetDescriptor esd = esds [i];
- mEventSetByName.put (esd.getName (), esd);
- }
- }
- catch (IntrospectionException exc) {
- if (pLogger.isLoggingWarning ()) {
- pLogger.logWarning
- (Constants.EXCEPTION_GETTING_BEANINFO,
- exc,
- mBeanClass.getName ());
- }
- }
- }
-
- //-------------------------------------
- /**
- *
- * Returns the BeanInfo for the class
- **/
- BeanInfo getBeanInfo (Logger pLogger)
- throws ELException
- {
- checkInitialized (pLogger);
- return mBeanInfo;
- }
-
- //-------------------------------------
- /**
- *
- * Returns the BeanInfoProperty for the given property name, or null
- * if not found.
- **/
- public BeanInfoProperty getProperty (String pPropertyName,
- Logger pLogger)
- throws ELException
- {
- checkInitialized (pLogger);
- return (BeanInfoProperty) mPropertyByName.get (pPropertyName);
- }
-
- //-------------------------------------
- /**
- *
- * Returns the BeanInfoIndexedProperty for the given property name,
- * or null if not found.
- **/
- public BeanInfoIndexedProperty getIndexedProperty
- (String pIndexedPropertyName,
- Logger pLogger)
- throws ELException
- {
- checkInitialized (pLogger);
- return (BeanInfoIndexedProperty)
- mIndexedPropertyByName.get (pIndexedPropertyName);
- }
-
- //-------------------------------------
- /**
- *
- * Returns the EventSetDescriptor for the given event set name, or
- * null if not found.
- **/
- public EventSetDescriptor getEventSet (String pEventSetName,
- Logger pLogger)
- throws ELException
- {
- checkInitialized (pLogger);
- return (EventSetDescriptor) mEventSetByName.get (pEventSetName);
- }
-
- //-------------------------------------
- // Finding the public version of a method - if a PropertyDescriptor
- // is obtained for a non-public class that implements a public
- // interface, the read/write methods will be for the class, and
- // therefore inaccessible. To correct this, a version of the same
- // method must be found in a superclass or interface.
- //-------------------------------------
- /**
- *
- * Returns a publicly-accessible version of the given method, by
- * searching for a public declaring class.
- **/
- static Method getPublicMethod (Method pMethod)
- {
- if (pMethod == null) {
- return null;
- }
-
- // See if the method is already available from a public class
- Class cl = pMethod.getDeclaringClass ();
- if (Modifier.isPublic (cl.getModifiers ())) {
- return pMethod;
- }
-
- // Otherwise, try to find a public class that declares the method
- Method ret = getPublicMethod (cl, pMethod);
- if (ret != null) {
- return ret;
- }
- else {
- return pMethod;
- }
- }
-
- //-------------------------------------
- /**
- *
- * If the given class is public and has a Method that declares the
- * same name and arguments as the given method, then that method is
- * returned. Otherwise the superclass and interfaces are searched
- * recursively.
- **/
- static Method getPublicMethod (Class pClass,
- Method pMethod)
- {
- // See if this is a public class declaring the method
- if (Modifier.isPublic (pClass.getModifiers ())) {
- try {
- Method m;
+ //-------------------------------------
+
+ /**
+ * Returns the BeanInfoProperty for the specified property in the
+ * given class, or null if not found.
+ */
+ public static BeanInfoProperty getBeanInfoProperty
+ (Class pClass,
+ String pPropertyName,
+ Logger pLogger)
+ throws ELException {
+ return getBeanInfoManager(pClass).getProperty(pPropertyName, pLogger);
+ }
+
+ //-------------------------------------
+
+ /**
+ * Returns the BeanInfoIndexedProperty for the specified property in
+ * the given class, or null if not found.
+ */
+ public static BeanInfoIndexedProperty getBeanInfoIndexedProperty
+ (Class pClass,
+ String pIndexedPropertyName,
+ Logger pLogger)
+ throws ELException {
+ return getBeanInfoManager
+ (pClass).getIndexedProperty(pIndexedPropertyName, pLogger);
+ }
+
+ //-------------------------------------
+
+ /**
+ * Makes sure that this class has been initialized, and synchronizes
+ * the initialization if it's required.
+ */
+ void checkInitialized(Logger pLogger)
+ throws ELException {
+ if (!mInitialized) {
+ synchronized (this) {
+ if (!mInitialized) {
+ initialize(pLogger);
+ mInitialized = true;
+ }
+ }
+ }
+ }
+
+ //-------------------------------------
+
+ /**
+ * Initializes by mapping property names to BeanInfoProperties
+ */
+ void initialize(Logger pLogger)
+ throws ELException {
try {
- m = pClass.getDeclaredMethod (pMethod.getName (),
- pMethod.getParameterTypes ());
- } catch (java.security.AccessControlException ex) {
- // kludge to accommodate J2EE RI's default settings
- // TODO: see if we can simply replace
- // getDeclaredMethod() with getMethod() ...?
- m = pClass.getMethod(pMethod.getName (),
- pMethod.getParameterTypes ());
- }
- if (Modifier.isPublic (m.getModifiers ())) {
- return m;
- }
- }
- catch (NoSuchMethodException exc) {}
- }
-
- // Search the interfaces
- {
- Class [] interfaces = pClass.getInterfaces ();
- if (interfaces != null) {
- for (int i = 0; i < interfaces.length; i++) {
- Method m = getPublicMethod (interfaces [i], pMethod);
- if (m != null) {
- return m;
- }
- }
- }
- }
-
- // Search the superclass
- {
- Class superclass = pClass.getSuperclass ();
- if (superclass != null) {
- Method m = getPublicMethod (superclass, pMethod);
- if (m != null) {
- return m;
- }
- }
+ mBeanInfo = Introspector.getBeanInfo(mBeanClass);
+
+ mPropertyByName = new HashMap();
+ mIndexedPropertyByName = new HashMap();
+ PropertyDescriptor[] pds = mBeanInfo.getPropertyDescriptors();
+ for (int i = 0; pds != null && i < pds.length; i++) {
+ // Treat as both an indexed property and a normal property
+ PropertyDescriptor pd = pds[i];
+ if (pd instanceof IndexedPropertyDescriptor) {
+ IndexedPropertyDescriptor ipd = (IndexedPropertyDescriptor) pd;
+ Method readMethod = getPublicMethod(ipd.getIndexedReadMethod());
+ Method writeMethod = getPublicMethod(ipd.getIndexedWriteMethod());
+ BeanInfoIndexedProperty property = new BeanInfoIndexedProperty
+ (readMethod,
+ writeMethod,
+ ipd);
+
+ mIndexedPropertyByName.put(ipd.getName(), property);
+ }
+
+ Method readMethod = getPublicMethod(pd.getReadMethod());
+ Method writeMethod = getPublicMethod(pd.getWriteMethod());
+ BeanInfoProperty property = new BeanInfoProperty
+ (readMethod,
+ writeMethod,
+ pd);
+
+ mPropertyByName.put(pd.getName(), property);
+ }
+
+ mEventSetByName = new HashMap();
+ EventSetDescriptor[] esds = mBeanInfo.getEventSetDescriptors();
+ for (int i = 0; esds != null && i < esds.length; i++) {
+ EventSetDescriptor esd = esds[i];
+ mEventSetByName.put(esd.getName(), esd);
+ }
+ }
+ catch (IntrospectionException exc) {
+ if (pLogger.isLoggingWarning()) {
+ pLogger.logWarning
+ (Constants.EXCEPTION_GETTING_BEANINFO,
+ exc,
+ mBeanClass.getName());
+ }
+ }
+ }
+
+ //-------------------------------------
+
+ /**
+ * Returns the BeanInfo for the class
+ */
+ BeanInfo getBeanInfo(Logger pLogger)
+ throws ELException {
+ checkInitialized(pLogger);
+ return mBeanInfo;
+ }
+
+ //-------------------------------------
+
+ /**
+ * Returns the BeanInfoProperty for the given property name, or null
+ * if not found.
+ */
+ public BeanInfoProperty getProperty(String pPropertyName,
+ Logger pLogger)
+ throws ELException {
+ checkInitialized(pLogger);
+ return (BeanInfoProperty) mPropertyByName.get(pPropertyName);
+ }
+
+ //-------------------------------------
+
+ /**
+ * Returns the BeanInfoIndexedProperty for the given property name,
+ * or null if not found.
+ */
+ public BeanInfoIndexedProperty getIndexedProperty
+ (String pIndexedPropertyName,
+ Logger pLogger)
+ throws ELException {
+ checkInitialized(pLogger);
+ return (BeanInfoIndexedProperty)
+ mIndexedPropertyByName.get(pIndexedPropertyName);
+ }
+
+ //-------------------------------------
+
+ /**
+ * Returns the EventSetDescriptor for the given event set name, or
+ * null if not found.
+ */
+ public EventSetDescriptor getEventSet(String pEventSetName,
+ Logger pLogger)
+ throws ELException {
+ checkInitialized(pLogger);
+ return (EventSetDescriptor) mEventSetByName.get(pEventSetName);
+ }
+
+ //-------------------------------------
+ // Finding the public version of a method - if a PropertyDescriptor
+ // is obtained for a non-public class that implements a public
+ // interface, the read/write methods will be for the class, and
+ // therefore inaccessible. To correct this, a version of the same
+ // method must be found in a superclass or interface.
+ //-------------------------------------
+
+ /**
+ * Returns a publicly-accessible version of the given method, by
+ * searching for a public declaring class.
+ */
+ static Method getPublicMethod(Method pMethod) {
+ if (pMethod == null) {
+ return null;
+ }
+
+ // See if the method is already available from a public class
+ Class cl = pMethod.getDeclaringClass();
+ if (Modifier.isPublic(cl.getModifiers())) {
+ return pMethod;
+ }
+
+ // Otherwise, try to find a public class that declares the method
+ Method ret = getPublicMethod(cl, pMethod);
+ if (ret != null) {
+ return ret;
+ } else {
+ return pMethod;
+ }
}
- return null;
- }
+ //-------------------------------------
+
+ /**
+ * If the given class is public and has a Method that declares the
+ * same name and arguments as the given method, then that method is
+ * returned. Otherwise the superclass and interfaces are searched
+ * recursively.
+ */
+ static Method getPublicMethod(Class pClass,
+ Method pMethod) {
+ // See if this is a public class declaring the method
+ if (Modifier.isPublic(pClass.getModifiers())) {
+ try {
+ Method m;
+ try {
+ m = pClass.getDeclaredMethod(pMethod.getName(),
+ pMethod.getParameterTypes());
+ } catch (java.security.AccessControlException ex) {
+ // kludge to accommodate J2EE RI's default settings
+ // TODO: see if we can simply replace
+ // getDeclaredMethod() with getMethod() ...?
+ m = pClass.getMethod(pMethod.getName(),
+ pMethod.getParameterTypes());
+ }
+ if (Modifier.isPublic(m.getModifiers())) {
+ return m;
+ }
+ }
+ catch (NoSuchMethodException exc) {
+ }
+ }
+
+ // Search the interfaces
+ {
+ Class[] interfaces = pClass.getInterfaces();
+ if (interfaces != null) {
+ for (int i = 0; i < interfaces.length; i++) {
+ Method m = getPublicMethod(interfaces[i], pMethod);
+ if (m != null) {
+ return m;
+ }
+ }
+ }
+ }
+
+ // Search the superclass
+ {
+ Class superclass = pClass.getSuperclass();
+ if (superclass != null) {
+ Method m = getPublicMethod(superclass, pMethod);
+ if (m != null) {
+ return m;
+ }
+ }
+ }
+
+ return null;
+ }
- //-------------------------------------
+ //-------------------------------------
}
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/BeanInfoProperty.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/BeanInfoProperty.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/BeanInfoProperty.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/BeanInfoProperty.java Sat Nov 20 18:14:00 2010
@@ -13,7 +13,7 @@
* 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.taglibs.standard.lang.jstl;
@@ -21,7 +21,6 @@ import java.beans.PropertyDescriptor;
import java.lang.reflect.Method;
/**
- *
* <p>This contains the information for one property in a BeanInfo -
* PropertyDescriptor, read method, and write method. This class is
* necessary because the read/write methods in the PropertyDescriptor
@@ -30,49 +29,53 @@ import java.lang.reflect.Method;
* method must be found by searching for a public superclass/interface
* that declares the method (this searching is done by the
* BeanInfoManager).
- *
+ *
* @author Nathan Abramson - Art Technology Group
* @version $Change: 181181 $$DateTime: 2001/06/26 09:55:09 $$Author$
- **/
+ */
+
+public class BeanInfoProperty {
+ //-------------------------------------
+ // Properties
+ //-------------------------------------
+ // property readMethod
+
+ Method mReadMethod;
+
+ public Method getReadMethod() {
+ return mReadMethod;
+ }
+
+ //-------------------------------------
+ // property writeMethod
+
+ Method mWriteMethod;
+
+ public Method getWriteMethod() {
+ return mWriteMethod;
+ }
+
+ //-------------------------------------
+ // property propertyDescriptor
+
+ PropertyDescriptor mPropertyDescriptor;
+
+ public PropertyDescriptor getPropertyDescriptor() {
+ return mPropertyDescriptor;
+ }
+
+ //-------------------------------------
-public class BeanInfoProperty
-{
- //-------------------------------------
- // Properties
- //-------------------------------------
- // property readMethod
-
- Method mReadMethod;
- public Method getReadMethod ()
- { return mReadMethod; }
-
- //-------------------------------------
- // property writeMethod
-
- Method mWriteMethod;
- public Method getWriteMethod ()
- { return mWriteMethod; }
-
- //-------------------------------------
- // property propertyDescriptor
-
- PropertyDescriptor mPropertyDescriptor;
- public PropertyDescriptor getPropertyDescriptor ()
- { return mPropertyDescriptor; }
-
- //-------------------------------------
- /**
- *
- * Constructor
- **/
- public BeanInfoProperty (Method pReadMethod,
- Method pWriteMethod,
- PropertyDescriptor pPropertyDescriptor)
- {
- mReadMethod = pReadMethod;
- mWriteMethod = pWriteMethod;
- mPropertyDescriptor = pPropertyDescriptor;
- }
+ /**
+ * Constructor
+ */
+ public BeanInfoProperty(Method pReadMethod,
+ Method pWriteMethod,
+ PropertyDescriptor pPropertyDescriptor) {
+ mReadMethod = pReadMethod;
+ mWriteMethod = pWriteMethod;
+ mPropertyDescriptor = pPropertyDescriptor;
+ }
- //-------------------------------------
+ //-------------------------------------
}
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/BinaryOperator.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/BinaryOperator.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/BinaryOperator.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/BinaryOperator.java Sat Nov 20 18:14:00 2010
@@ -13,70 +13,65 @@
* 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.taglibs.standard.lang.jstl;
/**
- *
* <p>This is the superclass for all binary operators
- *
+ *
* @author Nathan Abramson - Art Technology Group
* @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author$
- **/
+ */
+
+public abstract class BinaryOperator {
+ //-------------------------------------
-public abstract class BinaryOperator
-{
- //-------------------------------------
- /**
- *
- * Constructor
- **/
- public BinaryOperator ()
- {
- }
-
- //-------------------------------------
- // Expression methods
- //-------------------------------------
- /**
- *
- * Returns the symbol representing the operator
- **/
- public abstract String getOperatorSymbol ();
-
- //-------------------------------------
- /**
- *
- * Applies the operator to the given pair of values
- **/
- public abstract Object apply (Object pLeft,
- Object pRight,
- Object pContext,
- Logger pLogger)
- throws ELException;
-
- //-------------------------------------
- /**
- *
- * Returns true if evaluation is necessary given the specified Left
- * value. The And/OrOperators make use of this
- **/
- public boolean shouldEvaluate (Object pLeft)
- {
- return true;
- }
-
- //-------------------------------------
- /**
- *
- * Returns true if the operator expects its arguments to be coerced
- * to Booleans. The And/Or operators set this to true.
- **/
- public boolean shouldCoerceToBoolean ()
- {
- return false;
- }
+ /**
+ * Constructor
+ */
+ public BinaryOperator() {
+ }
+
+ //-------------------------------------
+ // Expression methods
+ //-------------------------------------
+
+ /**
+ * Returns the symbol representing the operator
+ */
+ public abstract String getOperatorSymbol();
+
+ //-------------------------------------
+
+ /**
+ * Applies the operator to the given pair of values
+ */
+ public abstract Object apply(Object pLeft,
+ Object pRight,
+ Object pContext,
+ Logger pLogger)
+ throws ELException;
+
+ //-------------------------------------
+
+ /**
+ * Returns true if evaluation is necessary given the specified Left
+ * value. The And/OrOperators make use of this
+ */
+ public boolean shouldEvaluate(Object pLeft) {
+ return true;
+ }
+
+ //-------------------------------------
+
+ /**
+ * Returns true if the operator expects its arguments to be coerced
+ * to Booleans. The And/Or operators set this to true.
+ */
+ public boolean shouldCoerceToBoolean() {
+ return false;
+ }
- //-------------------------------------
+ //-------------------------------------
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org