Author: polx Date: Mon Dec 8 15:54:59 2008 New Revision: 724556 URL: http://svn.apache.org/viewvc?rev=724556&view=rev Log: Moved taglibs' version to snapshot (all of them), moved dependencies slowly to snapshot as well. Fixed API backwards breakage of JELLY-286 which was throwing an extra exception. Made getExpressionFactory() public (and removed the protected instances). paul
Modified: commons/proper/jelly/trunk/jelly-tags/ant/project.xml commons/proper/jelly/trunk/jelly-tags/beanshell/project.xml commons/proper/jelly/trunk/jelly-tags/beanshell/src/java/org/apache/commons/jelly/tags/beanshell/BeanShellTagLibrary.java commons/proper/jelly/trunk/jelly-tags/bsf/src/java/org/apache/commons/jelly/tags/bsf/BSFTagLibrary.java commons/proper/jelly/trunk/jelly-tags/interaction/project.xml commons/proper/jelly/trunk/jelly-tags/jmx/project.xml commons/proper/jelly/trunk/jelly-tags/tag-project.xml commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/CompositeExpression.java commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/ConstantExpression.java commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/Expression.java commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/ExpressionSupport.java commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/jexl/JexlExpression.java commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/jexl/JexlExpressionFactory.java commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/xpath/XPathExpression.java commons/proper/jelly/trunk/src/test/org/apache/commons/jelly/core/TestModularExceptionBean.java commons/proper/jelly/trunk/src/test/org/apache/commons/jelly/expression/TestExpressions.java Modified: commons/proper/jelly/trunk/jelly-tags/ant/project.xml URL: http://svn.apache.org/viewvc/commons/proper/jelly/trunk/jelly-tags/ant/project.xml?rev=724556&r1=724555&r2=724556&view=diff ============================================================================== --- commons/proper/jelly/trunk/jelly-tags/ant/project.xml (original) +++ commons/proper/jelly/trunk/jelly-tags/ant/project.xml Mon Dec 8 15:54:59 2008 @@ -66,7 +66,7 @@ <dependency> <groupId>commons-jelly</groupId> <artifactId>commons-jelly-tags-junit</artifactId> - <version>1.0</version> + <version>1.0.1-SNAPSHOT</version> <url>http://commons.apache.org/jelly/libs/junit/</url> <properties> <scope>test</scope> @@ -75,7 +75,7 @@ <dependency> <groupId>commons-jelly</groupId> <artifactId>commons-jelly-tags-util</artifactId> - <version>1.1.1</version> + <version>1.1.2-SNAPSHOT</version> <properties> <scope>test</scope> </properties> Modified: commons/proper/jelly/trunk/jelly-tags/beanshell/project.xml URL: http://svn.apache.org/viewvc/commons/proper/jelly/trunk/jelly-tags/beanshell/project.xml?rev=724556&r1=724555&r2=724556&view=diff ============================================================================== --- commons/proper/jelly/trunk/jelly-tags/beanshell/project.xml (original) +++ commons/proper/jelly/trunk/jelly-tags/beanshell/project.xml Mon Dec 8 15:54:59 2008 @@ -51,7 +51,7 @@ <dependency> <groupId>commons-jelly</groupId> <artifactId>commons-jelly-tags-junit</artifactId> - <version>1.0</version> + <version>1.0.1-SNAPSHOT</version> <url>http://commons.apache.org/jelly/libs/junit/</url> <properties> <scope>test</scope> Modified: commons/proper/jelly/trunk/jelly-tags/beanshell/src/java/org/apache/commons/jelly/tags/beanshell/BeanShellTagLibrary.java URL: http://svn.apache.org/viewvc/commons/proper/jelly/trunk/jelly-tags/beanshell/src/java/org/apache/commons/jelly/tags/beanshell/BeanShellTagLibrary.java?rev=724556&r1=724555&r2=724556&view=diff ============================================================================== --- commons/proper/jelly/trunk/jelly-tags/beanshell/src/java/org/apache/commons/jelly/tags/beanshell/BeanShellTagLibrary.java (original) +++ commons/proper/jelly/trunk/jelly-tags/beanshell/src/java/org/apache/commons/jelly/tags/beanshell/BeanShellTagLibrary.java Mon Dec 8 15:54:59 2008 @@ -33,9 +33,4 @@ registerTag("script", ScriptTag.class); } - /** Allows derived tag libraries to use their own factory */ - protected ExpressionFactory getExpressionFactory() { - return expressionFactory; - } - } Modified: commons/proper/jelly/trunk/jelly-tags/bsf/src/java/org/apache/commons/jelly/tags/bsf/BSFTagLibrary.java URL: http://svn.apache.org/viewvc/commons/proper/jelly/trunk/jelly-tags/bsf/src/java/org/apache/commons/jelly/tags/bsf/BSFTagLibrary.java?rev=724556&r1=724555&r2=724556&view=diff ============================================================================== --- commons/proper/jelly/trunk/jelly-tags/bsf/src/java/org/apache/commons/jelly/tags/bsf/BSFTagLibrary.java (original) +++ commons/proper/jelly/trunk/jelly-tags/bsf/src/java/org/apache/commons/jelly/tags/bsf/BSFTagLibrary.java Mon Dec 8 15:54:59 2008 @@ -57,11 +57,6 @@ expressionFactory.setLanguage(language); } - /** Allows derived tag libraries to use their own factory */ - protected ExpressionFactory getExpressionFactory() { - return expressionFactory; - } - protected BSFEngine getBSFEngine() throws BSFException { return expressionFactory.getBSFEngine(); } Modified: commons/proper/jelly/trunk/jelly-tags/interaction/project.xml URL: http://svn.apache.org/viewvc/commons/proper/jelly/trunk/jelly-tags/interaction/project.xml?rev=724556&r1=724555&r2=724556&view=diff ============================================================================== --- commons/proper/jelly/trunk/jelly-tags/interaction/project.xml (original) +++ commons/proper/jelly/trunk/jelly-tags/interaction/project.xml Mon Dec 8 15:54:59 2008 @@ -21,7 +21,7 @@ <extend>${basedir}/../tag-project.xml</extend> <artifactId>commons-jelly-tags-interaction</artifactId> <name>commons-jelly-tags-interaction</name> - <currentVersion>1.1</currentVersion> + <currentVersion>1.1.1-SNAPSHOT</currentVersion> <package>org.apache.commons.jelly.tags.interaction</package> <description>This is a Jelly interface to the user.</description> <shortDescription>Commons Jelly Interaction Tag Library</shortDescription> Modified: commons/proper/jelly/trunk/jelly-tags/jmx/project.xml URL: http://svn.apache.org/viewvc/commons/proper/jelly/trunk/jelly-tags/jmx/project.xml?rev=724556&r1=724555&r2=724556&view=diff ============================================================================== --- commons/proper/jelly/trunk/jelly-tags/jmx/project.xml (original) +++ commons/proper/jelly/trunk/jelly-tags/jmx/project.xml Mon Dec 8 15:54:59 2008 @@ -19,7 +19,7 @@ <extend>${basedir}/../tag-project.xml</extend> <artifactId>commons-jelly-tags-jmx</artifactId> <name>commons-jelly-tags-jmx</name> - <currentVersion>1.0</currentVersion> + <currentVersion>1.0.1-SNAPSHOT</currentVersion> <package>org.apache.commons.jelly.tags.jmx</package> Modified: commons/proper/jelly/trunk/jelly-tags/tag-project.xml URL: http://svn.apache.org/viewvc/commons/proper/jelly/trunk/jelly-tags/tag-project.xml?rev=724556&r1=724555&r2=724556&view=diff ============================================================================== --- commons/proper/jelly/trunk/jelly-tags/tag-project.xml (original) +++ commons/proper/jelly/trunk/jelly-tags/tag-project.xml Mon Dec 8 15:54:59 2008 @@ -275,7 +275,7 @@ <dependency> <groupId>commons-jelly</groupId> <artifactId>commons-jelly</artifactId> - <version>1.0</version> + <version>1.1-SNAPSHOT</version> </dependency> <dependency> Modified: commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/CompositeExpression.java URL: http://svn.apache.org/viewvc/commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/CompositeExpression.java?rev=724556&r1=724555&r2=724556&view=diff ============================================================================== --- commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/CompositeExpression.java (original) +++ commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/CompositeExpression.java Mon Dec 8 15:54:59 2008 @@ -254,12 +254,12 @@ // inherit javadoc from interface - public Object evaluate(JellyContext context) throws JellyTagException { + public Object evaluate(JellyContext context) { return evaluateAsString(context); } // inherit javadoc from interface - public String evaluateAsString(JellyContext context) throws JellyTagException { + public String evaluateAsString(JellyContext context) { StringBuffer buffer = new StringBuffer(); for (Iterator iter = expressions.iterator(); iter.hasNext(); ) { Expression expression = (Expression) iter.next(); @@ -273,7 +273,7 @@ } // inherit javadoc from interface - public Iterator evaluateAsIterator(JellyContext context) throws JellyTagException { + public Iterator evaluateAsIterator(JellyContext context) { String value = evaluateAsString(context); if ( value == null ) { return Collections.EMPTY_LIST.iterator(); Modified: commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/ConstantExpression.java URL: http://svn.apache.org/viewvc/commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/ConstantExpression.java?rev=724556&r1=724555&r2=724556&view=diff ============================================================================== --- commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/ConstantExpression.java (original) +++ commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/ConstantExpression.java Mon Dec 8 15:54:59 2008 @@ -17,7 +17,6 @@ package org.apache.commons.jelly.expression; import org.apache.commons.jelly.JellyContext; -import org.apache.commons.jelly.JellyTagException; /** <p><code>ConstantExpression</code> represents a constant expression.</p> * @@ -56,7 +55,7 @@ * @param context evaluate expression against this context * @return current value of <code>value</code> property */ - public Object evaluate(JellyContext context) throws JellyTagException { + public Object evaluate(JellyContext context) { return value; } Modified: commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/Expression.java URL: http://svn.apache.org/viewvc/commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/Expression.java?rev=724556&r1=724555&r2=724556&view=diff ============================================================================== --- commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/Expression.java (original) +++ commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/Expression.java Mon Dec 8 15:54:59 2008 @@ -19,7 +19,6 @@ import java.util.Iterator; import org.apache.commons.jelly.JellyContext; -import org.apache.commons.jelly.JellyTagException; /** <p><code>Expression</code> represents an arbitrary expression using some pluggable * expression language.</p> @@ -37,27 +36,26 @@ /** * Evaluates the expression with the given context * and returns the result - * @throws JellyTagException */ - public Object evaluate(JellyContext context) throws JellyTagException; + public Object evaluate(JellyContext context); /** * Evaluates the expression with the given context * coercing the result to be a String. */ - public String evaluateAsString(JellyContext context) throws JellyTagException; + public String evaluateAsString(JellyContext context); /** * Evaluates the expression with the given context * coercing the result to be a boolean. */ - public boolean evaluateAsBoolean(JellyContext context) throws JellyTagException; + public boolean evaluateAsBoolean(JellyContext context); /** * Evaluates the expression with the given context * coercing the result to be an Iterator. */ - public Iterator evaluateAsIterator(JellyContext context) throws JellyTagException; + public Iterator evaluateAsIterator(JellyContext context); /** * This method evaluates the expression until a value (a non-Expression) object @@ -75,5 +73,5 @@ * So using this method, nested expressions can be evaluated to the * actual underlying value object. */ - public Object evaluateRecurse(JellyContext context) throws JellyTagException; + public Object evaluateRecurse(JellyContext context); } Modified: commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/ExpressionSupport.java URL: http://svn.apache.org/viewvc/commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/ExpressionSupport.java?rev=724556&r1=724555&r2=724556&view=diff ============================================================================== --- commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/ExpressionSupport.java (original) +++ commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/ExpressionSupport.java Mon Dec 8 15:54:59 2008 @@ -44,7 +44,7 @@ protected static final Iterator EMPTY_ITERATOR = Collections.EMPTY_LIST.iterator(); // inherit javadoc from interface - public String evaluateAsString(JellyContext context) throws JellyTagException { + public String evaluateAsString(JellyContext context) { Object value = evaluateRecurse(context); // sometimes when Jelly is used inside Maven the value // of an expression can actually be an expression. @@ -59,7 +59,7 @@ // inherit javadoc from interface - public Object evaluateRecurse(JellyContext context) throws JellyTagException { + public Object evaluateRecurse(JellyContext context) { Object value = evaluate(context); if (value instanceof Expression) { Expression expression = (Expression) value; @@ -69,7 +69,7 @@ } // inherit javadoc from interface - public boolean evaluateAsBoolean(JellyContext context) throws JellyTagException { + public boolean evaluateAsBoolean(JellyContext context) { Object value = evaluateRecurse(context); if ( value instanceof Boolean ) { Boolean b = (Boolean) value; @@ -92,7 +92,7 @@ } // inherit javadoc from interface - public Iterator evaluateAsIterator(JellyContext context) throws JellyTagException { + public Iterator evaluateAsIterator(JellyContext context) { Object value = evaluateRecurse(context); if ( value == null ) { return EMPTY_ITERATOR; Modified: commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/jexl/JexlExpression.java URL: http://svn.apache.org/viewvc/commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/jexl/JexlExpression.java?rev=724556&r1=724555&r2=724556&view=diff ============================================================================== --- commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/jexl/JexlExpression.java (original) +++ commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/jexl/JexlExpression.java Mon Dec 8 15:54:59 2008 @@ -62,7 +62,7 @@ return "${" + expression.getExpression() + "}"; } - public Object evaluate(JellyContext context) throws JellyTagException { + public Object evaluate(JellyContext context) { try { JexlContext jexlContext = new JellyJexlContext( context ); if (log.isDebugEnabled()) { @@ -83,9 +83,9 @@ } else { if (e instanceof RuntimeException) throw (RuntimeException)e; - if (e instanceof JellyTagException) - throw (JellyTagException)e; - throw new JellyTagException(e.getMessage(), e); + if (e instanceof IllegalStateException) + throw (IllegalStateException )e; + throw new IllegalStateException(e.getMessage(), e); } } } Modified: commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/jexl/JexlExpressionFactory.java URL: http://svn.apache.org/viewvc/commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/jexl/JexlExpressionFactory.java?rev=724556&r1=724555&r2=724556&view=diff ============================================================================== --- commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/jexl/JexlExpressionFactory.java (original) +++ commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/jexl/JexlExpressionFactory.java Mon Dec 8 15:54:59 2008 @@ -120,7 +120,7 @@ this.text = text; } - public Object evaluate(JellyContext context) throws JellyTagException { + public Object evaluate(JellyContext context) { Object answer = jexlExpression.evaluate(context); if ( answer == null ) { Modified: commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/xpath/XPathExpression.java URL: http://svn.apache.org/viewvc/commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/xpath/XPathExpression.java?rev=724556&r1=724555&r2=724556&view=diff ============================================================================== --- commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/xpath/XPathExpression.java (original) +++ commons/proper/jelly/trunk/src/java/org/apache/commons/jelly/expression/xpath/XPathExpression.java Mon Dec 8 15:54:59 2008 @@ -72,7 +72,7 @@ return this.text; } - public Object evaluate(JellyContext context) throws JellyTagException { + public Object evaluate(JellyContext context) { this.context = context; try @@ -94,7 +94,7 @@ if (context.isSuppressExpressionExceptions()) log.error("Error constructing xpath", e); else - throw new JellyTagException(e.getMessage(), e); + throw new IllegalStateException (e.getMessage(), e); } return null; Modified: commons/proper/jelly/trunk/src/test/org/apache/commons/jelly/core/TestModularExceptionBean.java URL: http://svn.apache.org/viewvc/commons/proper/jelly/trunk/src/test/org/apache/commons/jelly/core/TestModularExceptionBean.java?rev=724556&r1=724555&r2=724556&view=diff ============================================================================== --- commons/proper/jelly/trunk/src/test/org/apache/commons/jelly/core/TestModularExceptionBean.java (original) +++ commons/proper/jelly/trunk/src/test/org/apache/commons/jelly/core/TestModularExceptionBean.java Mon Dec 8 15:54:59 2008 @@ -35,9 +35,9 @@ // TODO Auto-generated constructor stub } - public static void main(String[] args) { + /*public static void main(String[] args) { junit.swingui.TestRunner.run(TestModularExceptionBean.class); - } + }*/ public final void testThrowIt() { Modified: commons/proper/jelly/trunk/src/test/org/apache/commons/jelly/expression/TestExpressions.java URL: http://svn.apache.org/viewvc/commons/proper/jelly/trunk/src/test/org/apache/commons/jelly/expression/TestExpressions.java?rev=724556&r1=724555&r2=724556&view=diff ============================================================================== --- commons/proper/jelly/trunk/src/test/org/apache/commons/jelly/expression/TestExpressions.java (original) +++ commons/proper/jelly/trunk/src/test/org/apache/commons/jelly/expression/TestExpressions.java Mon Dec 8 15:54:59 2008 @@ -88,7 +88,7 @@ try { assertExpression("${test.throwAnException()}", Boolean.TRUE); assertTrue("An exception was suppressed while processing the JEXL script", false); - }catch(JellyTagException e) { + }catch(IllegalStateException e) { if (!(e.getCause() instanceof TestException)) throw e; // Nothing, the test passed