You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ta...@apache.org on 2018/12/12 15:41:12 UTC
[myfaces] branch master updated: cosmetics + unused code
This is an automated email from the ASF dual-hosted git repository.
tandraschko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces.git
The following commit(s) were added to refs/heads/master by this push:
new 4f36f88 cosmetics + unused code
4f36f88 is described below
commit 4f36f885128260883ed2feb01d4d03738dbe3bbb
Author: Thomas Andraschko <ta...@apache.org>
AuthorDate: Wed Dec 12 16:41:06 2018 +0100
cosmetics + unused code
---
.../el/CacheableValueExpressionWrapper.java | 3 --
.../facelets/el/CompositeComponentELUtils.java | 28 +++++-----
.../view/facelets/el/CompositeVariableMapper.java | 2 +
.../view/facelets/el/ContextAwareELException.java | 27 ++--------
.../view/facelets/el/ContextAwareException.java | 8 +--
.../el/ContextAwareMethodNotFoundException.java | 27 ++--------
.../el/ContextAwarePropertyNotFoundException.java | 27 ++--------
.../ContextAwarePropertyNotWritableException.java | 4 ++
.../el/ContextAwareTagMethodExpression.java | 16 ++++--
.../view/facelets/el/ContextAwareUtils.java | 59 ----------------------
.../view/facelets/el/DefaultFunctionMapper.java | 4 ++
.../facelets/tag/jstl/core/IterationState.java | 12 -----
.../tag/jstl/core/LegacyForEachHandler.java | 30 ++++-------
.../facelets/tag/jstl/core/LegacySetHandler.java | 18 -------
.../tag/jstl/core/MappedValueExpression.java | 1 -
.../view/facelets/tag/ui/ComponentRefHandler.java | 15 ++----
.../view/facelets/tag/ui/CompositionHandler.java | 3 --
.../view/facelets/tag/ui/DebugPhaseListener.java | 1 +
.../view/facelets/tag/ui/DefineHandler.java | 4 --
.../view/facelets/tag/ui/IncludeHandler.java | 3 --
.../view/facelets/tag/ui/InsertHandler.java | 4 +-
.../facelets/tag/ui/LegacyCompositionHandler.java | 8 ---
.../facelets/tag/ui/LegacyDecorateHandler.java | 8 ---
.../view/facelets/tag/ui/LegacyIncludeHandler.java | 8 ---
.../view/facelets/tag/ui/LegacyParamHandler.java | 12 -----
.../myfaces/view/facelets/tag/ui/UIDebug.java | 5 +-
.../view/jsp/JspViewDeclarationLanguage.java | 8 +--
.../myfaces/webapp/webxml/FilterMapping.java | 4 +-
.../myfaces/webapp/webxml/ServletMapping.java | 5 +-
.../ExceptionNoWrapContextAwareTestCase.java | 35 -------------
30 files changed, 76 insertions(+), 313 deletions(-)
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/el/CacheableValueExpressionWrapper.java b/impl/src/main/java/org/apache/myfaces/view/facelets/el/CacheableValueExpressionWrapper.java
index 7bc668b..27cc07f 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/el/CacheableValueExpressionWrapper.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/el/CacheableValueExpressionWrapper.java
@@ -27,9 +27,6 @@ import javax.el.ValueExpression;
import javax.el.ValueReference;
import javax.faces.FacesWrapper;
-/**
- *
- */
public class CacheableValueExpressionWrapper extends ValueExpression
implements FacesWrapper<ValueExpression>, Externalizable, CacheableValueExpression
{
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/el/CompositeComponentELUtils.java b/impl/src/main/java/org/apache/myfaces/view/facelets/el/CompositeComponentELUtils.java
index 089a5df..d5062df 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/el/CompositeComponentELUtils.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/el/CompositeComponentELUtils.java
@@ -80,9 +80,6 @@ public final class CompositeComponentELUtils
public static final String CC_FIND_COMPONENT_EXPRESSION = "oam.CC_FIND_COMPONENT_EXPRESSION";
- /**
- * private constructor
- */
private CompositeComponentELUtils()
{
// no instantiation of this class
@@ -252,8 +249,7 @@ public final class CompositeComponentELUtils
UIComponent currentComponent = baseComponent;
while (currentComponent != null)
{
- Location componentLocation = (Location) currentComponent.getAttributes().get(
- LOCATION_KEY);
+ Location componentLocation = (Location) currentComponent.getAttributes().get(LOCATION_KEY);
if (componentLocation != null
&& componentLocation.getPath().equals(location.getPath()))
{
@@ -286,8 +282,8 @@ public final class CompositeComponentELUtils
{
Location componentLocation = (Location) currentCompositeComponent.getAttributes().get(LOCATION_KEY);
if (componentLocation != null
- && componentLocation.getPath().equals(location.getPath()) &&
- (ccLevel == getCCLevel(currentCompositeComponent)) )
+ && componentLocation.getPath().equals(location.getPath())
+ && ccLevel == getCCLevel(currentCompositeComponent))
{
return currentCompositeComponent;
}
@@ -333,8 +329,8 @@ public final class CompositeComponentELUtils
{
Location foundComponentLocation = (Location) currentComponent.getAttributes().get(LOCATION_KEY);
if (foundComponentLocation != null
- && foundComponentLocation.getPath().equals(location.getPath()) &&
- ccLevel == getCCLevel(foundComponent))
+ && foundComponentLocation.getPath().equals(location.getPath())
+ && ccLevel == getCCLevel(foundComponent))
{
return foundComponent;
}
@@ -345,8 +341,8 @@ public final class CompositeComponentELUtils
Location componentLocation
= (Location) foundComponent.getAttributes().get(LOCATION_KEY);
if (componentLocation != null
- && componentLocation.getPath().equals(location.getPath()) &&
- ccLevel == getCCLevel(foundComponent))
+ && componentLocation.getPath().equals(location.getPath())
+ && ccLevel == getCCLevel(foundComponent))
{
return foundComponent;
}
@@ -374,8 +370,8 @@ public final class CompositeComponentELUtils
{
Location componentLocation = (Location) currentComponent.getAttributes().get(LOCATION_KEY);
if (componentLocation != null
- && componentLocation.getPath().equals(location.getPath()) &&
- ccLevel == getCCLevel(currentComponent))
+ && componentLocation.getPath().equals(location.getPath())
+ && ccLevel == getCCLevel(currentComponent))
{
return currentComponent;
}
@@ -395,8 +391,8 @@ public final class CompositeComponentELUtils
{
Location componentLocation = (Location) currentComponent.getAttributes().get(LOCATION_KEY);
if (componentLocation != null
- && componentLocation.getPath().equals(location.getPath()) &&
- (ccLevel == getCCLevel(currentComponent)) )
+ && componentLocation.getPath().equals(location.getPath())
+ && ccLevel == getCCLevel(currentComponent))
{
return currentComponent;
}
@@ -407,7 +403,7 @@ public final class CompositeComponentELUtils
UIComponent c = UIComponent.getCurrentComponent(facesContext);
if (c != null)
{
- return lookForCompositeComponentOnStack( facesContext, location, ccLevel, c);
+ return lookForCompositeComponentOnStack(facesContext, location, ccLevel, c);
}
else
{
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/el/CompositeVariableMapper.java b/impl/src/main/java/org/apache/myfaces/view/facelets/el/CompositeVariableMapper.java
index 122cecf..516c49b 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/el/CompositeVariableMapper.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/el/CompositeVariableMapper.java
@@ -47,6 +47,7 @@ public final class CompositeVariableMapper extends VariableMapper
/**
* @see javax.el.VariableMapper#resolveVariable(java.lang.String)
*/
+ @Override
public ValueExpression resolveVariable(String name)
{
ValueExpression ve = this.var0.resolveVariable(name);
@@ -60,6 +61,7 @@ public final class CompositeVariableMapper extends VariableMapper
/**
* @see javax.el.VariableMapper#setVariable(java.lang.String, javax.el.ValueExpression)
*/
+ @Override
public ValueExpression setVariable(String name, ValueExpression expression)
{
return this.var0.setVariable(name, expression);
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwareELException.java b/impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwareELException.java
index e98749e..774e916 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwareELException.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwareELException.java
@@ -31,10 +31,6 @@ import javax.faces.view.Location;
*/
public class ContextAwareELException extends ELException implements ContextAwareExceptionWrapper
{
-
- /**
- *
- */
private static final long serialVersionUID = -2231893442274827689L;
private ContextAwareExceptionWrapper _delegate;
@@ -46,42 +42,27 @@ public class ContextAwareELException extends ELException implements ContextAware
_delegate = new DefaultContextAwareELException(location, expressionString, qName, wrapped);
}
+ @Override
public String getExpressionString()
{
return _delegate.getExpressionString();
}
+ @Override
public String getQName()
{
return _delegate.getQName();
}
+ @Override
public Throwable getWrapped()
{
return _delegate.getWrapped();
}
+ @Override
public Location getLocation()
{
return _delegate.getLocation();
}
-
- /*
- @Override
- public String getLocalizedMessage()
- {
- return _localizedMessage;
- }
-
- @Override
- public Throwable getCause()
- {
- return _wrappedException.getCause();
- }
-
- @Override
- public synchronized Throwable initCause(Throwable cause)
- {
- return _wrappedException.initCause(cause);
- }*/
}
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwareException.java b/impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwareException.java
index 2341bfe..1af786a 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwareException.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwareException.java
@@ -30,10 +30,6 @@ import javax.faces.view.Location;
*/
public class ContextAwareException extends RuntimeException implements ContextAwareExceptionWrapper
{
-
- /**
- *
- */
private static final long serialVersionUID = 7239367504106332588L;
private ContextAwareExceptionWrapper _delegate;
@@ -45,21 +41,25 @@ public class ContextAwareException extends RuntimeException implements ContextAw
_delegate = new DefaultContextAwareELException(location, expressionString, qName, wrapped);
}
+ @Override
public String getExpressionString()
{
return _delegate.getExpressionString();
}
+ @Override
public String getQName()
{
return _delegate.getQName();
}
+ @Override
public Throwable getWrapped()
{
return _delegate.getWrapped();
}
+ @Override
public Location getLocation()
{
return _delegate.getLocation();
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwareMethodNotFoundException.java b/impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwareMethodNotFoundException.java
index 60e1b33..524bcc2 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwareMethodNotFoundException.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwareMethodNotFoundException.java
@@ -31,10 +31,6 @@ import javax.faces.view.Location;
*/
public class ContextAwareMethodNotFoundException extends MethodNotFoundException implements ContextAwareExceptionWrapper
{
-
- /**
- *
- */
private static final long serialVersionUID = -8172862923048615707L;
private ContextAwareExceptionWrapper _delegate;
@@ -47,42 +43,27 @@ public class ContextAwareMethodNotFoundException extends MethodNotFoundException
_delegate = new DefaultContextAwareELException(location, expressionString, qName, wrapped);
}
+ @Override
public Throwable getWrapped()
{
return _delegate.getWrapped();
}
+ @Override
public Location getLocation()
{
return _delegate.getLocation();
}
+ @Override
public String getExpressionString()
{
return _delegate.getExpressionString();
}
+ @Override
public String getQName()
{
return _delegate.getQName();
}
-
- /*
- @Override
- public String getLocalizedMessage()
- {
- return _localizedMessage;
- }
-
- @Override
- public Throwable getCause()
- {
- return _wrappedException.getCause();
- }
-
- @Override
- public synchronized Throwable initCause(Throwable cause)
- {
- return _wrappedException.initCause(cause);
- }*/
}
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwarePropertyNotFoundException.java b/impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwarePropertyNotFoundException.java
index 5373748..e83dbbb 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwarePropertyNotFoundException.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwarePropertyNotFoundException.java
@@ -33,14 +33,10 @@ public class ContextAwarePropertyNotFoundException
implements ContextAwareExceptionWrapper
{
- /**
- *
- */
private static final long serialVersionUID = -4194177998555929451L;
private ContextAwareExceptionWrapper _delegate;
-
public ContextAwarePropertyNotFoundException(Location location,
String expressionString, String qName,
Throwable wrapped)
@@ -49,42 +45,27 @@ public class ContextAwarePropertyNotFoundException
_delegate = new DefaultContextAwareELException(location, expressionString, qName, wrapped);
}
+ @Override
public Location getLocation()
{
return _delegate.getLocation();
}
+ @Override
public String getExpressionString()
{
return _delegate.getExpressionString();
}
+ @Override
public String getQName()
{
return _delegate.getQName();
}
+ @Override
public Throwable getWrapped()
{
return _delegate.getWrapped();
}
-
- /*
- @Override
- public String getLocalizedMessage()
- {
- return _localizedMessage;
- }
-
- @Override
- public Throwable getCause()
- {
- return _wrappedException.getCause();
- }
-
- @Override
- public synchronized Throwable initCause(Throwable cause)
- {
- return _wrappedException.initCause(cause);
- }*/
}
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwarePropertyNotWritableException.java b/impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwarePropertyNotWritableException.java
index 2154fe7..e05622a 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwarePropertyNotWritableException.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwarePropertyNotWritableException.java
@@ -43,21 +43,25 @@ public class ContextAwarePropertyNotWritableException
_delegate = new DefaultContextAwareELException(location, expressionString, qName, wrapped);
}
+ @Override
public String getExpressionString()
{
return _delegate.getExpressionString();
}
+ @Override
public String getQName()
{
return _delegate.getQName();
}
+ @Override
public Throwable getWrapped()
{
return _delegate.getWrapped();
}
+ @Override
public Location getLocation()
{
return _delegate.getLocation();
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwareTagMethodExpression.java b/impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwareTagMethodExpression.java
index ca65409..ebd19e4 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwareTagMethodExpression.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwareTagMethodExpression.java
@@ -39,7 +39,7 @@ import javax.faces.view.facelets.TagAttribute;
* @author Jacob Hookom
* @version $Id$
*/
-public final class ContextAwareTagMethodExpression
+public final class ContextAwareTagMethodExpression
extends MethodExpression
implements Externalizable, FacesWrapper<MethodExpression>, ContextAware
{
@@ -47,9 +47,7 @@ public final class ContextAwareTagMethodExpression
private static final long serialVersionUID = 1L;
private MethodExpression _wrapped;
-
private Location _location;
-
private String _qName;
public ContextAwareTagMethodExpression()
@@ -64,6 +62,7 @@ public final class ContextAwareTagMethodExpression
_wrapped = methodExpression;
}
+ @Override
public MethodInfo getMethodInfo(ELContext context)
{
try
@@ -89,6 +88,7 @@ public final class ContextAwareTagMethodExpression
//}
}
+ @Override
public Object invoke(ELContext context, Object[] params)
{
try
@@ -129,26 +129,31 @@ public final class ContextAwareTagMethodExpression
return expressionString;
}
+ @Override
public String getExpressionString()
{
return _wrapped.getExpressionString();
}
+ @Override
public boolean equals(Object obj)
{
return _wrapped.equals(obj);
}
+ @Override
public int hashCode()
{
return _wrapped.hashCode();
}
+ @Override
public boolean isLiteralText()
{
return _wrapped.isLiteralText();
}
+ @Override
public void writeExternal(ObjectOutput out) throws IOException
{
out.writeObject(_wrapped);
@@ -156,6 +161,7 @@ public final class ContextAwareTagMethodExpression
out.writeUTF(_qName);
}
+ @Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
_wrapped = (MethodExpression) in.readObject();
@@ -163,21 +169,25 @@ public final class ContextAwareTagMethodExpression
_qName = in.readUTF();
}
+ @Override
public String toString()
{
return _location + ": " + _wrapped;
}
+ @Override
public Location getLocation()
{
return _location;
}
+ @Override
public String getQName()
{
return _qName;
}
+ @Override
public MethodExpression getWrapped()
{
return _wrapped;
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwareUtils.java b/impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwareUtils.java
deleted file mode 100644
index 97a0b1d..0000000
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwareUtils.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.myfaces.view.facelets.el;
-
-import javax.el.ELContext;
-import javax.faces.context.FacesContext;
-
-import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFWebConfigParam;
-import org.apache.myfaces.util.WebConfigParamUtils;
-
-public class ContextAwareUtils
-{
- /**
- * Wrap exception caused by calls to EL expressions, so information like
- * the location, expression string and tag name can be retrieved by
- * the ExceptionHandler implementation and used to output meaningful information about itself.
- *
- * <p>Note in some cases this will wrap the original javax.el.ELException, so the
- * information will not be on the stack trace unless ExceptionHandler
- * retrieve checking if the exception implements ContextAware interface and calling getWrapped() method.
- * </p>
- *
- */
- @JSFWebConfigParam(since="2.0.9, 2.1.3" , defaultValue="true", expectedValues="true, false")
- public static final String INIT_PARAM_WRAP_TAG_EXCEPTIONS_AS_CONTEXT_AWARE
- = "org.apache.myfaces.WRAP_TAG_EXCEPTIONS_AS_CONTEXT_AWARE";
-
- public static boolean isWrapTagExceptionsAsContextAware(ELContext context)
- {
- FacesContext facesContext = (FacesContext) context.getContext(FacesContext.class);
- facesContext = facesContext == null ? FacesContext.getCurrentInstance() : facesContext;
- if (facesContext != null)
- {
- return WebConfigParamUtils.getBooleanInitParameter(facesContext.getExternalContext(),
- INIT_PARAM_WRAP_TAG_EXCEPTIONS_AS_CONTEXT_AWARE, true);
- }
- else
- {
- //No facesContext, return false
- return false;
- }
- }
-}
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/el/DefaultFunctionMapper.java b/impl/src/main/java/org/apache/myfaces/view/facelets/el/DefaultFunctionMapper.java
index e4dfc17..01c6483 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/el/DefaultFunctionMapper.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/el/DefaultFunctionMapper.java
@@ -81,6 +81,7 @@ public final class DefaultFunctionMapper extends FunctionMapper implements Exter
*
* @see java.io.Externalizable#writeExternal(java.io.ObjectOutput)
*/
+ @Override
public void writeExternal(ObjectOutput out) throws IOException
{
out.writeObject(_functions);
@@ -92,6 +93,7 @@ public final class DefaultFunctionMapper extends FunctionMapper implements Exter
* @see java.io.Externalizable#readExternal(java.io.ObjectInput)
*/
@SuppressWarnings("unchecked")
+ @Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
_functions = (Map<String, Function>) in.readObject();
@@ -142,6 +144,7 @@ public final class DefaultFunctionMapper extends FunctionMapper implements Exter
*
* @see java.io.Externalizable#writeExternal(java.io.ObjectOutput)
*/
+ @Override
public void writeExternal(ObjectOutput out) throws IOException
{
out.writeUTF(_prefix != null ? _prefix : "");
@@ -156,6 +159,7 @@ public final class DefaultFunctionMapper extends FunctionMapper implements Exter
*
* @see java.io.Externalizable#readExternal(java.io.ObjectInput)
*/
+ @Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
_prefix = in.readUTF();
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jstl/core/IterationState.java b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jstl/core/IterationState.java
index 9faf403..123409b 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jstl/core/IterationState.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jstl/core/IterationState.java
@@ -42,33 +42,21 @@ public class IterationState implements Serializable
this.valueList = new ArrayList<Object[]>();
}
- /**
- * @return the valueList
- */
public List<Object[]> getValueList()
{
return valueList;
}
- /**
- * @param valueList the valueList to set
- */
public void setValueList(List<Object[]> valueList)
{
this.valueList = valueList;
}
- /**
- * @return the counter
- */
public int getCounter()
{
return counter;
}
- /**
- * @param counter the counter to set
- */
public void setCounter(int counter)
{
this.counter = counter;
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jstl/core/LegacyForEachHandler.java b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jstl/core/LegacyForEachHandler.java
index 785cd49..a360f69 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jstl/core/LegacyForEachHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jstl/core/LegacyForEachHandler.java
@@ -62,11 +62,8 @@ public final class LegacyForEachHandler extends TagHandler implements ComponentC
private static class ArrayIterator implements Iterator<Object>
{
-
protected final Object array;
-
protected int i;
-
protected final int len;
public ArrayIterator(Object src)
@@ -104,7 +101,6 @@ public final class LegacyForEachHandler extends TagHandler implements ComponentC
* Iteration begins with index set at the value
* specified.
*/
- //@JSFFaceletAttribute(className="int")
private final TagAttribute begin;
/**
@@ -115,20 +111,17 @@ public final class LegacyForEachHandler extends TagHandler implements ComponentC
* Iteration ends when index reaches the value
* specified.
*/
- //@JSFFaceletAttribute(className="int")
private final TagAttribute end;
/**
* Collection of items to iterate over.
*/
- //@JSFFaceletAttribute(className="javax.el.ValueExpression")
private final TagAttribute items;
/**
* Iteration will only process every step items of
* the collection, starting with the first one.
*/
- //@JSFFaceletAttribute(className="int")
private final TagAttribute step;
private final TagAttribute tranzient;
@@ -139,19 +132,14 @@ public final class LegacyForEachHandler extends TagHandler implements ComponentC
* variable has nested visibility. Its type depends
* on the object of the underlying collection.
*/
- //@JSFFaceletAttribute(className="java.lang.String")
private final TagAttribute var;
/**
* Name of the exported scoped variable for the
* status of the iteration.
*/
- //@JSFFaceletAttribute(className="java.lang.String")
private final TagAttribute varStatus;
- /**
- * @param config
- */
public LegacyForEachHandler(TagConfig config)
{
super(config);
@@ -336,7 +324,7 @@ public final class LegacyForEachHandler extends TagHandler implements ComponentC
}
}
- private final ValueExpression capture(String name, PageContext pctx)
+ private ValueExpression capture(String name, PageContext pctx)
{
if (name != null)
{
@@ -345,7 +333,7 @@ public final class LegacyForEachHandler extends TagHandler implements ComponentC
return null;
}
- private final int getBegin(FaceletContext ctx)
+ private int getBegin(FaceletContext ctx)
{
if (this.begin != null)
{
@@ -354,7 +342,7 @@ public final class LegacyForEachHandler extends TagHandler implements ComponentC
return 0;
}
- private final int getEnd(FaceletContext ctx)
+ private int getEnd(FaceletContext ctx)
{
if (this.end != null)
{
@@ -363,7 +351,7 @@ public final class LegacyForEachHandler extends TagHandler implements ComponentC
return Integer.MAX_VALUE - 1; // hotspot bug in the JVM
}
- private final int getStep(FaceletContext ctx)
+ private int getStep(FaceletContext ctx)
{
if (this.step != null)
{
@@ -372,7 +360,7 @@ public final class LegacyForEachHandler extends TagHandler implements ComponentC
return 1;
}
- private final boolean getTransient(FaceletContext ctx)
+ private boolean getTransient(FaceletContext ctx)
{
if (this.tranzient != null)
{
@@ -381,7 +369,7 @@ public final class LegacyForEachHandler extends TagHandler implements ComponentC
return false;
}
- private final ValueExpression getVarExpr(ValueExpression ve, Object src, Object value, int i)
+ private ValueExpression getVarExpr(ValueExpression ve, Object src, Object value, int i)
{
if (src instanceof List || src.getClass().isArray())
{
@@ -398,7 +386,7 @@ public final class LegacyForEachHandler extends TagHandler implements ComponentC
throw new IllegalStateException("Cannot create VE for: " + src);
}
- private final String getVarName(FaceletContext ctx)
+ private String getVarName(FaceletContext ctx)
{
if (this.var != null)
{
@@ -407,7 +395,7 @@ public final class LegacyForEachHandler extends TagHandler implements ComponentC
return null;
}
- private final String getVarStatusName(FaceletContext ctx)
+ private String getVarStatusName(FaceletContext ctx)
{
if (this.varStatus != null)
{
@@ -416,7 +404,7 @@ public final class LegacyForEachHandler extends TagHandler implements ComponentC
return null;
}
- private final Iterator<?> toIterator(Object src)
+ private Iterator<?> toIterator(Object src)
{
if (src == null)
{
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jstl/core/LegacySetHandler.java b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jstl/core/LegacySetHandler.java
index c2a39e1..f7b9673 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jstl/core/LegacySetHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jstl/core/LegacySetHandler.java
@@ -55,35 +55,17 @@ public class LegacySetHandler extends TagHandler
* specified in the action. The type of the scoped variable is
* whatever type the value expression evaluates to.
*/
- //@JSFFaceletAttribute(className="java.lang.String")
private final TagAttribute var;
/**
* Expression to be evaluated.
*/
- //@JSFFaceletAttribute(
- // className="javax.el.ValueExpression",
- // deferredValueType="java.lang.Object")
private final TagAttribute value;
- //@JSFFaceletAttribute(
- // name="scope",
- // className="java.lang.String",
- // longDescription="Scope for var.")
private final TagAttribute scope;
- //@JSFFaceletAttribute(
- // name="target",
- // className="java.lang.String",
- // longDescription="Target object whose property will be set."+
- // " Must evaluate to a JavaBeans object with setter property"+
- // "property, or to a java.util.Map object.")
private final TagAttribute target;
- //@JSFFaceletAttribute(
- // name="property",
- // className="java.lang.String",
- // longDescription="Name of the property to be set in the target object.")
private final TagAttribute property;
public LegacySetHandler(TagConfig config)
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jstl/core/MappedValueExpression.java b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jstl/core/MappedValueExpression.java
index a47aef1..b6416ce 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jstl/core/MappedValueExpression.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jstl/core/MappedValueExpression.java
@@ -64,7 +64,6 @@ public final class MappedValueExpression extends ValueExpression
private static final long serialVersionUID = 1L;
private final Object key;
-
private final ValueExpression orig;
public MappedValueExpression(ValueExpression orig, Map.Entry entry)
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/ComponentRefHandler.java b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/ComponentRefHandler.java
index f7e4460..5f59639 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/ComponentRefHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/ComponentRefHandler.java
@@ -24,16 +24,11 @@ import javax.faces.view.facelets.ComponentHandler;
import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFFaceletTag;
import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFFaceletTags;
-/**
- *
- */
-@JSFFaceletTags(tags={
- @JSFFaceletTag(
- name="ui:component",
- componentClass="org.apache.myfaces.view.facelets.tag.ui._Component"),
- @JSFFaceletTag(
- name="ui:fragment",
- componentClass="org.apache.myfaces.view.facelets.tag.ui._Fragment")
+@JSFFaceletTags(tags = {
+ @JSFFaceletTag(name = "ui:component",
+ componentClass = "org.apache.myfaces.view.facelets.tag.ui._Component"),
+ @JSFFaceletTag(name = "ui:fragment",
+ componentClass = "org.apache.myfaces.view.facelets.tag.ui._Fragment")
})
public final class ComponentRefHandler extends ComponentHandler
{
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/CompositionHandler.java b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/CompositionHandler.java
index 18c9552..2981e59 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/CompositionHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/CompositionHandler.java
@@ -68,9 +68,6 @@ public final class CompositionHandler extends TagHandler implements TemplateClie
protected final ParamHandler[] _params;
- /**
- * @param config
- */
public CompositionHandler(TagConfig config)
{
super(config);
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/DebugPhaseListener.java b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/DebugPhaseListener.java
index 32623ba..79ce4b8 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/DebugPhaseListener.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/DebugPhaseListener.java
@@ -161,6 +161,7 @@ public class DebugPhaseListener implements PhaseListener
private class DebugVisitCallback implements VisitCallback
{
+ @Override
public VisitResult visit(VisitContext context, UIComponent target)
{
if (target instanceof EditableValueHolder)
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/DefineHandler.java b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/DefineHandler.java
index 8ef45f0..3533168 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/DefineHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/DefineHandler.java
@@ -54,9 +54,6 @@ public final class DefineHandler extends TagHandler
required=true)
private final String name;
- /**
- * @param config
- */
public DefineHandler(TagConfig config)
{
super(config);
@@ -78,7 +75,6 @@ public final class DefineHandler extends TagHandler
ELException
{
// no-op
- // this.nextHandler.apply(ctx, parent);
}
public void applyDefinition(FaceletContext ctx, UIComponent parent) throws IOException, FacesException,
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/IncludeHandler.java b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/IncludeHandler.java
index 48b3061..450f8f4 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/IncludeHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/IncludeHandler.java
@@ -78,9 +78,6 @@ public final class IncludeHandler extends TagHandler implements ComponentContain
private final ParamHandler[] _params;
- /**
- * @param config
- */
public IncludeHandler(TagConfig config)
{
super(config);
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/InsertHandler.java b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/InsertHandler.java
index 3a472c1..f70d0d3 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/InsertHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/InsertHandler.java
@@ -57,9 +57,6 @@ public final class InsertHandler extends TagHandler implements TemplateClient, C
required=true)
private final String name;
- /**
- * @param config
- */
public InsertHandler(TagConfig config)
{
super(config);
@@ -104,6 +101,7 @@ public final class InsertHandler extends TagHandler implements TemplateClient, C
}
}
+ @Override
public boolean apply(FaceletContext ctx, UIComponent parent, String name) throws IOException, FacesException,
FaceletException, ELException
{
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/LegacyCompositionHandler.java b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/LegacyCompositionHandler.java
index c2507d4..e2cf989 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/LegacyCompositionHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/LegacyCompositionHandler.java
@@ -48,7 +48,6 @@ import org.apache.myfaces.view.facelets.tag.TagHandlerUtils;
* @author Jacob Hookom
* @version $Id: CompositionHandler.java,v 1.14 2008/07/13 19:01:42 rlubke Exp $
*/
-//@JSFFaceletTag(name="ui:composition")
public final class LegacyCompositionHandler extends TagHandler implements TemplateClient
{
@@ -60,19 +59,12 @@ public final class LegacyCompositionHandler extends TagHandler implements Templa
* The resolvable URI of the template to use. The content within the composition tag will
* be used in populating the template specified.
*/
- //@JSFFaceletAttribute(
- // name="template",
- // className="javax.el.ValueExpression",
- // deferredValueType="java.lang.String")
protected final TagAttribute _template;
protected final Map<String, DefineHandler> _handlers;
protected final LegacyParamHandler[] _params;
- /**
- * @param config
- */
public LegacyCompositionHandler(TagConfig config)
{
super(config);
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/LegacyDecorateHandler.java b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/LegacyDecorateHandler.java
index 5594ff1..7568734 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/LegacyDecorateHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/LegacyDecorateHandler.java
@@ -58,7 +58,6 @@ import org.apache.myfaces.view.facelets.tag.jsf.ComponentSupport;
* @author Jacob Hookom
* @version $Id: DecorateHandler.java,v 1.16 2008/07/13 19:01:41 rlubke Exp $
*/
-//@JSFFaceletTag(name="ui:decorate")
public final class LegacyDecorateHandler extends TagHandler implements TemplateClient
{
@@ -68,19 +67,12 @@ public final class LegacyDecorateHandler extends TagHandler implements TemplateC
* The resolvable URI of the template to use. The content within the decorate tag
* will be used in populating the template specified.
*/
- //@JSFFaceletAttribute(
- // name="template",
- // className="javax.el.ValueExpression",
- // deferredValueType="java.lang.String")
private final TagAttribute _template;
private final Map<String, DefineHandler> _handlers;
private final LegacyParamHandler[] _params;
- /**
- * @param config
- */
public LegacyDecorateHandler(TagConfig config)
{
super(config);
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/LegacyIncludeHandler.java b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/LegacyIncludeHandler.java
index d9a793a..4bc394c 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/LegacyIncludeHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/LegacyIncludeHandler.java
@@ -61,7 +61,6 @@ import org.apache.myfaces.view.facelets.tag.jsf.ComponentSupport;
* @author Jacob Hookom
* @version $Id$
*/
-//@JSFFaceletTag(name="ui:include", bodyContent="JSP")
public final class LegacyIncludeHandler extends TagHandler implements ComponentContainerHandler
{
@@ -72,17 +71,10 @@ public final class LegacyIncludeHandler extends TagHandler implements ComponentC
* A literal or EL expression that specifies the target Facelet that you
* would like to include into your document.
*/
- //@JSFFaceletAttribute(
- // className="javax.el.ValueExpression",
- // deferredValueType="java.lang.String",
- // required=true)
private final TagAttribute src;
private final LegacyParamHandler[] _params;
- /**
- * @param config
- */
public LegacyIncludeHandler(TagConfig config)
{
super(config);
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/LegacyParamHandler.java b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/LegacyParamHandler.java
index 3b73410..0f6342b 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/LegacyParamHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/LegacyParamHandler.java
@@ -40,31 +40,19 @@ import org.apache.myfaces.view.facelets.AbstractFaceletContext;
* @author Jacob Hookom
* @version $Id: ParamHandler.java,v 1.6 2008/07/13 19:01:42 rlubke Exp $
*/
-//@JSFFaceletTag(name="ui:param")
public class LegacyParamHandler extends TagHandler
{
/**
* The name of the variable to pass to the included Facelet.
*/
- //@JSFFaceletAttribute(
- // className="javax.el.ValueExpression",
- // deferredValueType="java.lang.String",
- // required=true)
private final TagAttribute name;
/**
* The literal or EL expression value to assign to the named variable.
*/
- //@JSFFaceletAttribute(
- // className="javax.el.ValueExpression",
- // deferredValueType="java.lang.String",
- // required=true)
private final TagAttribute value;
- /**
- * @param config
- */
public LegacyParamHandler(TagConfig config)
{
super(config);
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/UIDebug.java b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/UIDebug.java
index 9bf1630..d3fe245 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/UIDebug.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/UIDebug.java
@@ -83,11 +83,13 @@ public final class UIDebug extends UIComponentBase
{
return new ArrayList<UIComponent>()
{
+ @Override
public boolean add(UIComponent o)
{
throw new IllegalStateException("<ui:debug> does not support children");
}
+ @Override
public void add(int index, UIComponent o)
{
throw new IllegalStateException("<ui:debug> does not support children");
@@ -95,6 +97,7 @@ public final class UIDebug extends UIComponentBase
};
}
+ @Override
public void encodeBegin(FacesContext faces) throws IOException
{
boolean partialRequest = faces.getPartialViewContext().isPartialRequest();
@@ -152,6 +155,7 @@ public final class UIDebug extends UIComponentBase
{
debugs = new LinkedHashMap<String, String>()
{
+ @Override
protected boolean removeEldestEntry(Entry<String, String> eldest)
{
return (this.size() > 5);
@@ -222,7 +226,6 @@ public final class UIDebug extends UIComponentBase
@Override
public String getId()
{
- // TODO Auto-generated method stub
return super.getId();
}
diff --git a/impl/src/main/java/org/apache/myfaces/view/jsp/JspViewDeclarationLanguage.java b/impl/src/main/java/org/apache/myfaces/view/jsp/JspViewDeclarationLanguage.java
index f9c3824..0509f35 100644
--- a/impl/src/main/java/org/apache/myfaces/view/jsp/JspViewDeclarationLanguage.java
+++ b/impl/src/main/java/org/apache/myfaces/view/jsp/JspViewDeclarationLanguage.java
@@ -67,10 +67,7 @@ public class JspViewDeclarationLanguage extends JspViewDeclarationLanguageBase
private final ViewDeclarationLanguageStrategy _strategy;
private LinkedList<String> _suffixes;
-
- /**
- *
- */
+
public JspViewDeclarationLanguage()
{
if (log.isLoggable(Level.FINEST))
@@ -208,9 +205,6 @@ public class JspViewDeclarationLanguage extends JspViewDeclarationLanguageBase
context.getApplication().publishEvent(context, PostAddToViewEvent.class, UIViewRoot.class, view);
}
- /**
- *
- */
@Override
protected boolean isViewStateAlreadyEncoded(FacesContext context)
{
diff --git a/impl/src/main/java/org/apache/myfaces/webapp/webxml/FilterMapping.java b/impl/src/main/java/org/apache/myfaces/webapp/webxml/FilterMapping.java
index 1f28229..4e5131b 100644
--- a/impl/src/main/java/org/apache/myfaces/webapp/webxml/FilterMapping.java
+++ b/impl/src/main/java/org/apache/myfaces/webapp/webxml/FilterMapping.java
@@ -25,9 +25,7 @@ public class FilterMapping
private String _urlPattern;
private boolean _isExtensionMapping = false;
- public FilterMapping(String filterName,
- Class filterClass,
- String urlPattern)
+ public FilterMapping(String filterName, Class filterClass, String urlPattern)
{
_filterName = filterName;
_filterClass = filterClass;
diff --git a/impl/src/main/java/org/apache/myfaces/webapp/webxml/ServletMapping.java b/impl/src/main/java/org/apache/myfaces/webapp/webxml/ServletMapping.java
index c8db4ee..5d1e15a 100755
--- a/impl/src/main/java/org/apache/myfaces/webapp/webxml/ServletMapping.java
+++ b/impl/src/main/java/org/apache/myfaces/webapp/webxml/ServletMapping.java
@@ -31,8 +31,9 @@ public class ServletMapping
_servletName = servletName;
_servletClass = servletClass;
_urlPattern = urlPattern;
- _extension = _urlPattern != null && _urlPattern.startsWith("*.") ? _urlPattern.substring(_urlPattern
- .indexOf('.')) : null;
+ _extension = _urlPattern != null && _urlPattern.startsWith("*.")
+ ? _urlPattern.substring(_urlPattern.indexOf('.'))
+ : null;
if (_extension == null)
{
int index = _urlPattern.indexOf("/*");
diff --git a/impl/src/test/java/org/apache/myfaces/view/facelets/ExceptionNoWrapContextAwareTestCase.java b/impl/src/test/java/org/apache/myfaces/view/facelets/ExceptionNoWrapContextAwareTestCase.java
deleted file mode 100644
index 86dafea..0000000
--- a/impl/src/test/java/org/apache/myfaces/view/facelets/ExceptionNoWrapContextAwareTestCase.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.myfaces.view.facelets;
-
-import org.apache.myfaces.view.facelets.el.ContextAwareUtils;
-
-public class ExceptionNoWrapContextAwareTestCase extends ExceptionTestCase
-{
-
- @Override
- protected void setUpServletObjects() throws Exception
- {
- super.setUpServletObjects();
- servletContext.addInitParameter(
- ContextAwareUtils.INIT_PARAM_WRAP_TAG_EXCEPTIONS_AS_CONTEXT_AWARE,
- "false");
- }
-
-}