You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2013/11/15 18:11:10 UTC
svn commit: r1542331 [7/28] - in /myfaces/tobago/trunk:
tobago-core/src/main/java/org/apache/myfaces/tobago/ajax/
tobago-core/src/main/java/org/apache/myfaces/tobago/application/
tobago-core/src/main/java/org/apache/myfaces/tobago/compat/ tobago-core/s...
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ResourceManagerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ResourceManagerImpl.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ResourceManagerImpl.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ResourceManagerImpl.java Fri Nov 15 17:10:58 2013
@@ -67,19 +67,19 @@ public class ResourceManagerImpl impleme
private TobagoConfigImpl tobagoConfig;
- public ResourceManagerImpl(TobagoConfigImpl tobagoConfig) {
+ public ResourceManagerImpl(final TobagoConfigImpl tobagoConfig) {
this.tobagoConfig = tobagoConfig;
this.production = tobagoConfig.getProjectStage() == ProjectStage.Production;
}
- public void add(String resourceKey) {
+ public void add(final String resourceKey) {
if (LOG.isDebugEnabled()) {
LOG.debug("adding resourceKey = '{}'", resourceKey);
}
resourceList.put(resourceKey, "");
}
- public void add(String resourceKey, String value) {
+ public void add(final String resourceKey, final String value) {
if (LOG.isDebugEnabled()) {
LOG.debug("adding resourceKey = '{}' value= '{}'", resourceKey, value);
}
@@ -87,12 +87,12 @@ public class ResourceManagerImpl impleme
}
@Deprecated
- public String getJsp(UIViewRoot viewRoot, String name) {
+ public String getJsp(final UIViewRoot viewRoot, final String name) {
String result = null;
if (name != null) {
- ClientPropertiesKey clientKey = ClientPropertiesKey.get(FacesContext.getCurrentInstance());
- JspCacheKey cacheKey = new JspCacheKey(clientKey, name);
+ final ClientPropertiesKey clientKey = ClientPropertiesKey.get(FacesContext.getCurrentInstance());
+ final JspCacheKey cacheKey = new JspCacheKey(clientKey, name);
result = jspCache.get(cacheKey);
if (result != null) {
@@ -102,7 +102,7 @@ public class ResourceManagerImpl impleme
result = (String) getPaths(clientKey, "",
JSP, name, "", false, true, true, null, true, false).get(0);
jspCache.put(cacheKey, result);
- } catch (Exception e) {
+ } catch (final Exception e) {
LOG.error("name = '" + name + "' clientProperties = '" + clientKey.toString() + "'", e);
}
}
@@ -110,19 +110,20 @@ public class ResourceManagerImpl impleme
}
@Deprecated
- public String getProperty(UIViewRoot viewRoot, String bundle, String propertyKey) {
+ public String getProperty(final UIViewRoot viewRoot, final String bundle, final String propertyKey) {
return getProperty(FacesContext.getCurrentInstance(), bundle, propertyKey);
}
- public String getProperty(FacesContext facesContext, String bundle, String propertyKey) {
+ public String getProperty(final FacesContext facesContext, final String bundle, final String propertyKey) {
if (bundle != null && propertyKey != null) {
- ClientPropertiesKey clientKey = ClientPropertiesKey.get(facesContext);
- PropertyCacheKey cacheKey = new PropertyCacheKey(clientKey, bundle, propertyKey);
+ final ClientPropertiesKey clientKey = ClientPropertiesKey.get(facesContext);
+ final PropertyCacheKey cacheKey = new PropertyCacheKey(clientKey, bundle, propertyKey);
StringValue result = propertyCache.get(cacheKey);
if (result == null) {
- List properties = getPaths(clientKey, "", PROPERTY, bundle, "", false, true, false, propertyKey, true, false);
+ final List properties
+ = getPaths(clientKey, "", PROPERTY, bundle, "", false, true, false, propertyKey, true, false);
if (properties != null) {
result = new StringValue((String) properties.get(0));
} else {
@@ -136,16 +137,16 @@ public class ResourceManagerImpl impleme
}
@Deprecated
- public Renderer getRenderer(UIViewRoot viewRoot, String rendererType) {
+ public Renderer getRenderer(final UIViewRoot viewRoot, final String rendererType) {
return getRenderer(FacesContext.getCurrentInstance(), rendererType);
}
- public Renderer getRenderer(FacesContext facesContext, String rendererType) {
+ public Renderer getRenderer(final FacesContext facesContext, final String rendererType) {
Renderer renderer = null;
if (rendererType != null) {
- ClientPropertiesKey clientKey = ClientPropertiesKey.get(facesContext);
- RendererCacheKey cacheKey = new RendererCacheKey(clientKey, rendererType);
+ final ClientPropertiesKey clientKey = ClientPropertiesKey.get(facesContext);
+ final RendererCacheKey cacheKey = new RendererCacheKey(clientKey, rendererType);
renderer = rendererCache.get(cacheKey);
if (renderer != null) {
@@ -154,17 +155,18 @@ public class ResourceManagerImpl impleme
String simpleClassName = null;
try {
simpleClassName = getRendererClassName(rendererType);
- List<Class> classes = getPaths(clientKey, "", TAG, simpleClassName, "", false, true, true, null, false, false);
+ final List<Class> classes
+ = getPaths(clientKey, "", TAG, simpleClassName, "", false, true, true, null, false, false);
if (classes != null && !classes.isEmpty()) {
- Class clazz = classes.get(0);
+ final Class clazz = classes.get(0);
renderer = (Renderer) clazz.newInstance();
rendererCache.put(cacheKey, renderer);
} else {
LOG.error("Don't find any RendererClass for " + simpleClassName + ". Please check you configuration.");
}
- } catch (InstantiationException e) {
+ } catch (final InstantiationException e) {
LOG.error("name = '" + simpleClassName + "' clientProperties = '" + clientKey.toString() + "'", e);
- } catch (IllegalAccessException e) {
+ } catch (final IllegalAccessException e) {
LOG.error("name = '" + simpleClassName + "' clientProperties = '" + clientKey.toString() + "'", e);
}
}
@@ -172,33 +174,34 @@ public class ResourceManagerImpl impleme
}
@Deprecated
- public String[] getScripts(UIViewRoot viewRoot, String name) {
+ public String[] getScripts(final UIViewRoot viewRoot, final String name) {
return getScripts(FacesContext.getCurrentInstance(), name);
}
- public String[] getScripts(FacesContext facesContext, String name) {
+ public String[] getScripts(final FacesContext facesContext, final String name) {
return getStrings(facesContext, name, null);
}
@Deprecated
- public String[] getStyles(UIViewRoot viewRoot, String name) {
+ public String[] getStyles(final UIViewRoot viewRoot, final String name) {
return getStyles(FacesContext.getCurrentInstance(), name);
}
- public String[] getStyles(FacesContext facesContext, String name) {
+ public String[] getStyles(final FacesContext facesContext, final String name) {
return getStrings(facesContext, name, null);
}
@Deprecated
- public String getThemeProperty(UIViewRoot viewRoot, String bundle, String propertyKey) {
+ public String getThemeProperty(final UIViewRoot viewRoot, final String bundle, final String propertyKey) {
if (bundle != null && propertyKey != null) {
- ClientPropertiesKey clientKey = ClientPropertiesKey.get(FacesContext.getCurrentInstance());
- PropertyCacheKey cacheKey = new PropertyCacheKey(clientKey, bundle, propertyKey);
+ final ClientPropertiesKey clientKey = ClientPropertiesKey.get(FacesContext.getCurrentInstance());
+ final PropertyCacheKey cacheKey = new PropertyCacheKey(clientKey, bundle, propertyKey);
StringValue result = propertyCache.get(cacheKey);
if (result == null) {
- List properties = getPaths(clientKey, "", PROPERTY, bundle, "", false, true, false, propertyKey, true, true);
+ final List properties
+ = getPaths(clientKey, "", PROPERTY, bundle, "", false, true, false, propertyKey, true, true);
if (properties != null) {
result = new StringValue((String) properties.get(0));
} else {
@@ -211,19 +214,20 @@ public class ResourceManagerImpl impleme
return null;
}
- public Measure getThemeMeasure(FacesContext facesContext, Configurable configurable, String name) {
+ public Measure getThemeMeasure(final FacesContext facesContext, final Configurable configurable, final String name) {
return getThemeMeasure(facesContext, configurable.getRendererType(), configurable.getCurrentMarkup(), name);
}
- public Measure getThemeMeasure(FacesContext facesContext, String rendererType, Markup markup, String name) {
+ public Measure getThemeMeasure(
+ final FacesContext facesContext, final String rendererType, final Markup markup, final String name) {
- ClientPropertiesKey clientKey = ClientPropertiesKey.get(facesContext);
- ThemeConfigCacheKey cacheKey = new ThemeConfigCacheKey(clientKey, rendererType, markup, name);
+ final ClientPropertiesKey clientKey = ClientPropertiesKey.get(facesContext);
+ final ThemeConfigCacheKey cacheKey = new ThemeConfigCacheKey(clientKey, rendererType, markup, name);
MeasureValue result = themeCache.get(cacheKey);
if (result == null) {
- List properties = getPaths(clientKey, "", PROPERTY, "tobago-theme-config", "",
+ final List properties = getPaths(clientKey, "", PROPERTY, "tobago-theme-config", "",
false, true, false, rendererType + "." + name, true, true);
Measure measure = null;
@@ -232,8 +236,8 @@ public class ResourceManagerImpl impleme
}
if (markup != null) {
- for (String m : markup) {
- List mProperties = getPaths(clientKey, "", PROPERTY, "tobago-theme-config", "",
+ for (final String m : markup) {
+ final List mProperties = getPaths(clientKey, "", PROPERTY, "tobago-theme-config", "",
false, true, false, rendererType + "[" + m + "]" + "." + name, true, true);
if (mProperties != null) {
final Measure summand = Measure.valueOf(mProperties.get(0));
@@ -253,32 +257,32 @@ public class ResourceManagerImpl impleme
}
@Deprecated
- public String getImage(UIViewRoot viewRoot, String name) {
+ public String getImage(final UIViewRoot viewRoot, final String name) {
return getImage(FacesContext.getCurrentInstance(), name);
}
- public String getImage(FacesContext facesContext, String name) {
+ public String getImage(final FacesContext facesContext, final String name) {
return getImage(facesContext, name, false);
}
@Deprecated
- public String getImage(UIViewRoot viewRoot, String name, boolean ignoreMissing) {
+ public String getImage(final UIViewRoot viewRoot, final String name, final boolean ignoreMissing) {
return getImage(FacesContext.getCurrentInstance(), name, ignoreMissing);
}
- public String getImage(FacesContext facesContext, String name, boolean ignoreMissing) {
+ public String getImage(final FacesContext facesContext, final String name, final boolean ignoreMissing) {
if (name != null) {
int dot = name.lastIndexOf('.');
if (dot == -1) {
dot = name.length();
}
- ClientPropertiesKey clientKey = ClientPropertiesKey.get(facesContext);
- ImageCacheKey cacheKey = new ImageCacheKey(clientKey, name);
+ final ClientPropertiesKey clientKey = ClientPropertiesKey.get(facesContext);
+ final ImageCacheKey cacheKey = new ImageCacheKey(clientKey, name);
StringValue result = imageCache.get(cacheKey);
if (result == null) {
- List paths = getPaths(clientKey, "", null, name.substring(0, dot),
+ final List paths = getPaths(clientKey, "", null, name.substring(0, dot),
name.substring(dot), false, true, true, null, true, ignoreMissing);
if (paths != null) {
result = new StringValue((String) paths.get(0));
@@ -300,17 +304,17 @@ public class ResourceManagerImpl impleme
}
private List getPaths(
- ClientPropertiesKey clientkey, String prefix, String subDir, String name, String suffix,
- boolean reverseOrder, boolean single, boolean returnKey, String key, boolean returnStrings,
- boolean ignoreMissing) {
- List matches = new ArrayList();
- String contentType = clientkey.getContentType();
- Theme theme = clientkey.getTheme();
- UserAgent browser = clientkey.getUserAgent();
- List<String> locales = LocaleUtils.getLocaleSuffixList(clientkey.getLocale());
+ final ClientPropertiesKey clientkey, final String prefix, final String subDir, final String name,
+ final String suffix, final boolean reverseOrder, final boolean single, final boolean returnKey, final String key,
+ final boolean returnStrings, final boolean ignoreMissing) {
+ final List matches = new ArrayList();
+ final String contentType = clientkey.getContentType();
+ final Theme theme = clientkey.getTheme();
+ final UserAgent browser = clientkey.getUserAgent();
+ final List<String> locales = LocaleUtils.getLocaleSuffixList(clientkey.getLocale());
// check first the local web application directory
- for (String localeSuffix : locales) {
+ for (final String localeSuffix : locales) {
if (production) {
boolean found = checkPath(prefix, reverseOrder, returnKey, returnStrings, matches,
name, MINIMIZE_SUFFIX, localeSuffix, suffix, key);
@@ -325,7 +329,7 @@ public class ResourceManagerImpl impleme
}
}
} else {
- boolean found = checkPath(prefix, reverseOrder, returnKey, returnStrings, matches,
+ final boolean found = checkPath(prefix, reverseOrder, returnKey, returnStrings, matches,
name, null, localeSuffix, suffix, key);
if (found && (single || !returnStrings)) {
return matches;
@@ -335,10 +339,10 @@ public class ResourceManagerImpl impleme
// after that check the whole resources tree
// e.g. 1. application, 2. library or renderkit
- for (Theme currentTheme : theme.getFallbackList()) {// theme loop
- for (String resourceDirectory : tobagoConfig.getResourceDirs()) {
- for (String browserType : browser.getFallbackList()) { // browser loop
- for (String localeSuffix : locales) { // locale loop
+ for (final Theme currentTheme : theme.getFallbackList()) {// theme loop
+ for (final String resourceDirectory : tobagoConfig.getResourceDirs()) {
+ for (final String browserType : browser.getFallbackList()) { // browser loop
+ for (final String localeSuffix : locales) { // locale loop
if (production) {
boolean found = checkPath(prefix, reverseOrder, returnKey, returnStrings, matches,
resourceDirectory, contentType, currentTheme, browserType, subDir, name, MINIMIZE_SUFFIX,
@@ -355,7 +359,7 @@ public class ResourceManagerImpl impleme
}
}
} else {
- boolean found = checkPath(prefix, reverseOrder, returnKey, returnStrings, matches,
+ final boolean found = checkPath(prefix, reverseOrder, returnKey, returnStrings, matches,
resourceDirectory, contentType, currentTheme, browserType, subDir, name, null,
localeSuffix, suffix, key);
if (found && (single || !returnStrings)) {
@@ -387,11 +391,12 @@ public class ResourceManagerImpl impleme
}
private boolean checkPath(
- String prefix, boolean reverseOrder, boolean returnKey, boolean returnStrings,
- List matches, String name, String minimizeSuffix, String localeSuffix, String extension, String key) {
+ final String prefix, final boolean reverseOrder, final boolean returnKey, final boolean returnStrings,
+ final List matches, final String name, final String minimizeSuffix, final String localeSuffix,
+ final String extension, final String key) {
String path = makePath(name, minimizeSuffix, localeSuffix, extension, key);
if (returnStrings && resourceList.containsKey(path)) {
- String result =
+ final String result =
returnKey
? prefix + path
: prefix + resourceList.get(path);
@@ -409,13 +414,13 @@ public class ResourceManagerImpl impleme
} else if (!returnStrings) {
try {
path = path.substring(1).replace('/', '.');
- Class clazz = Class.forName(path);
+ final Class clazz = Class.forName(path);
if (LOG.isTraceEnabled()) {
LOG.trace("testing path: " + path + " *"); // match
}
matches.add(clazz);
return true;
- } catch (ClassNotFoundException e) {
+ } catch (final ClassNotFoundException e) {
// not found
if (LOG.isTraceEnabled()) {
LOG.trace("testing path: " + path); // no match
@@ -430,13 +435,14 @@ public class ResourceManagerImpl impleme
}
private boolean checkPath(
- String prefix, boolean reverseOrder, boolean returnKey, boolean returnStrings,
- List matches, String resourceDirectory, String contentType, Theme currentTheme, String browserType,
- String subDir, String name, String minimizeSuffix, String localeSuffix, String suffix, String key) {
+ final String prefix, final boolean reverseOrder, final boolean returnKey, final boolean returnStrings,
+ final List matches, final String resourceDirectory, final String contentType, final Theme currentTheme,
+ final String browserType, final String subDir, final String name, final String minimizeSuffix,
+ final String localeSuffix, final String suffix, final String key) {
String path = makePath(resourceDirectory, contentType, currentTheme, browserType, subDir, name, minimizeSuffix,
localeSuffix, suffix, key, null);
if (returnStrings && resourceList.containsKey(path)) {
- String result;
+ final String result;
if (prefix.length() == 0 && returnKey && resourceDirectory.equals(currentTheme.getResourcePath())) {
result = makePath(resourceDirectory, contentType, currentTheme, browserType, subDir, name, minimizeSuffix,
localeSuffix, suffix, key, currentTheme.getVersion());
@@ -457,13 +463,13 @@ public class ResourceManagerImpl impleme
} else if (!returnStrings) {
try {
path = path.substring(1).replace('/', '.');
- Class clazz = Class.forName(path);
+ final Class clazz = Class.forName(path);
if (LOG.isTraceEnabled()) {
LOG.trace("testing path: " + path + " *"); // match
}
matches.add(clazz);
return true;
- } catch (ClassNotFoundException e) {
+ } catch (final ClassNotFoundException e) {
// not found
if (LOG.isTraceEnabled()) {
LOG.trace("testing path: " + path); // no match
@@ -478,9 +484,10 @@ public class ResourceManagerImpl impleme
}
private String makePath(
- String project, String language, Theme theme, String browser, String subDir,
- String name, String minimizeSuffix, String localeSuffix, String extension, String key, String version) {
- StringBuilder searchtext = new StringBuilder(64);
+ final String project, final String language, final Theme theme, final String browser, final String subDir,
+ final String name, final String minimizeSuffix, final String localeSuffix, final String extension,
+ final String key, final String version) {
+ final StringBuilder searchtext = new StringBuilder(64);
searchtext.append('/');
searchtext.append(project);
@@ -514,8 +521,9 @@ public class ResourceManagerImpl impleme
}
private String makePath(
- String name, String minimizeSuffix, String localeSuffix, String extension, String key) {
- StringBuilder searchtext = new StringBuilder(64);
+ final String name, final String minimizeSuffix, final String localeSuffix, final String extension,
+ final String key) {
+ final StringBuilder searchtext = new StringBuilder(64);
searchtext.append('/');
searchtext.append(name);
@@ -532,7 +540,7 @@ public class ResourceManagerImpl impleme
return searchtext.toString();
}
- private String getRendererClassName(String rendererType) {
+ private String getRendererClassName(final String rendererType) {
String name;
if (LOG.isDebugEnabled()) {
LOG.debug("rendererType = '{}'", rendererType);
@@ -551,7 +559,7 @@ public class ResourceManagerImpl impleme
return name;
}
- private String[] getStrings(FacesContext facesContext, String name, String type) {
+ private String[] getStrings(final FacesContext facesContext, final String name, final String type) {
String[] result = new String[0];
if (name != null) {
int dot = name.lastIndexOf('.');
@@ -559,20 +567,20 @@ public class ResourceManagerImpl impleme
dot = name.length();
}
- ClientPropertiesKey key = ClientPropertiesKey.get(facesContext);
- MiscCacheKey miscKey = new MiscCacheKey(key, name);
- String[] cacheResult = miscCache.get(miscKey);
+ final ClientPropertiesKey key = ClientPropertiesKey.get(facesContext);
+ final MiscCacheKey miscKey = new MiscCacheKey(key, name);
+ final String[] cacheResult = miscCache.get(miscKey);
if (cacheResult != null) {
return cacheResult;
}
try {
- List matches = getPaths(key, "", type,
+ final List matches = getPaths(key, "", type,
name.substring(0, dot), name.substring(dot), true, false, true, null, true, false);
if (matches != null) {
result = (String[]) matches.toArray(new String[matches.size()]);
}
miscCache.put(miscKey, result);
- } catch (Exception e) {
+ } catch (final Exception e) {
LOG.error("name = '" + name + "' clientProperties = '" + key.toString() + "'", e);
}
}
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ResponseWriterDivider.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ResponseWriterDivider.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ResponseWriterDivider.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ResponseWriterDivider.java Fri Nov 15 17:10:58 2013
@@ -47,7 +47,7 @@ public final class ResponseWriterDivider
private String nameInRequest;
- public static ResponseWriterDivider getInstance(FacesContext facesContext, String nameInRequest) {
+ public static ResponseWriterDivider getInstance(final FacesContext facesContext, final String nameInRequest) {
final Map<String, Object> map = facesContext.getExternalContext().getRequestMap();
ResponseWriterDivider divider = (ResponseWriterDivider) map.get(nameInRequest);
if (divider == null) {
@@ -59,7 +59,7 @@ public final class ResponseWriterDivider
return divider;
}
- private ResponseWriterDivider(FacesContext facesContext) {
+ private ResponseWriterDivider(final FacesContext facesContext) {
writers = new ArrayList<ResponseWriter>();
buffers = new ArrayList<FastStringWriter>();
current = -1;
@@ -73,16 +73,16 @@ public final class ResponseWriterDivider
* It is usually needed to get the response writer again with HtmlRendererUtils.getTobagoResponseWriter();
* @return true if the branch was not created new. So the branch was already existent.
*/
- public boolean activateBranch(FacesContext facesContext) {
+ public boolean activateBranch(final FacesContext facesContext) {
assert writers.size() == buffers.size();
boolean created = true;
current++;
if (writers.size() == current) {
- FastStringWriter buffer = new FastStringWriter();
+ final FastStringWriter buffer = new FastStringWriter();
buffers.add(buffer);
- ResponseWriter newWriter = facesContext.getResponseWriter().cloneWithWriter(buffer);
+ final ResponseWriter newWriter = facesContext.getResponseWriter().cloneWithWriter(buffer);
writers.add(newWriter);
created = false;
}
@@ -100,7 +100,7 @@ public final class ResponseWriterDivider
* It is usually needed to get the response writer again with HtmlRendererUtils.getTobagoResponseWriter();
* @return true, if the current writer is not the original writer. So the "stack" is at the bottom.
*/
- public boolean passivateBranch(FacesContext facesContext) {
+ public boolean passivateBranch(final FacesContext facesContext) {
assert writers.size() == buffers.size();
@@ -124,9 +124,9 @@ public final class ResponseWriterDivider
* Write the collected stuff in the original writer.
* This is always the last call on this object.
*/
- public void writeOutAndCleanUp(FacesContext facesContext) throws IOException {
+ public void writeOutAndCleanUp(final FacesContext facesContext) throws IOException {
facesContext.setResponseWriter(original);
- for (FastStringWriter buffer : buffers) {
+ for (final FastStringWriter buffer : buffers) {
original.write(buffer.toString());
}
// clean up.
@@ -136,14 +136,14 @@ public final class ResponseWriterDivider
@Override
public String toString() {
- StringBuilder builder = new StringBuilder();
+ final StringBuilder builder = new StringBuilder();
builder.append("StringBuilder(");
builder.append(System.identityHashCode(this));
builder.append(") current=");
builder.append(current);
builder.append("\n");
int i = 0;
- for (FastStringWriter buffer : buffers) {
+ for (final FastStringWriter buffer : buffers) {
builder.append("\n- buffer ");
builder.append(i++);
builder.append(" ------------------------------------------------------------\n");
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/StringValue.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/StringValue.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/StringValue.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/StringValue.java Fri Nov 15 17:10:58 2013
@@ -28,7 +28,7 @@ public final class StringValue {
private String value;
- public StringValue(String value) {
+ public StringValue(final String value) {
this.value = value;
}
@@ -37,7 +37,7 @@ public final class StringValue {
}
@Override
- public boolean equals(Object o) {
+ public boolean equals(final Object o) {
if (this == o) {
return true;
}
@@ -45,7 +45,7 @@ public final class StringValue {
return false;
}
- StringValue that = (StringValue) o;
+ final StringValue that = (StringValue) o;
if (value != null ? !value.equals(that.value) : that.value != null) {
return false;
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ThemeBuilder.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ThemeBuilder.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ThemeBuilder.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ThemeBuilder.java Fri Nov 15 17:10:58 2013
@@ -38,43 +38,43 @@ class ThemeBuilder {
private List<ThemeImpl> availableThemes = new ArrayList<ThemeImpl>();
private TobagoConfigImpl tobagoConfig;
- ThemeBuilder(TobagoConfigImpl tobagoConfig) {
+ ThemeBuilder(final TobagoConfigImpl tobagoConfig) {
this.tobagoConfig = tobagoConfig;
}
public void resolveThemes() {
- Map<String, ThemeImpl> map = new HashMap<String, ThemeImpl>();
- for (ThemeImpl theme : availableThemes) {
+ final Map<String, ThemeImpl> map = new HashMap<String, ThemeImpl>();
+ for (final ThemeImpl theme : availableThemes) {
if (LOG.isDebugEnabled()) {
LOG.debug("Theme from XML files: {} ", theme.getName());
}
map.put(theme.getName(), theme);
}
- for (ThemeImpl theme : availableThemes) {
- String fallbackName = theme.getFallbackName();
- ThemeImpl fallback = map.get(fallbackName);
+ for (final ThemeImpl theme : availableThemes) {
+ final String fallbackName = theme.getFallbackName();
+ final ThemeImpl fallback = map.get(fallbackName);
theme.setFallback(fallback);
}
- for (ThemeImpl theme : availableThemes) {
+ for (final ThemeImpl theme : availableThemes) {
theme.resolveFallbacks();
}
- for (ThemeImpl theme : availableThemes) {
+ for (final ThemeImpl theme : availableThemes) {
theme.resolveRendererConfig(tobagoConfig.getRenderersConfig());
}
- Map<String, Theme> result = new HashMap<String, Theme>();
- for (ThemeImpl theme : availableThemes) {
+ final Map<String, Theme> result = new HashMap<String, Theme>();
+ for (final ThemeImpl theme : availableThemes) {
result.put(theme.getName(), theme);
}
- for (ThemeImpl theme : availableThemes) {
+ for (final ThemeImpl theme : availableThemes) {
theme.resolveResources();
}
- for (ThemeImpl theme : availableThemes) {
+ for (final ThemeImpl theme : availableThemes) {
theme.init();
}
tobagoConfig.setAvailableThemes(Collections.unmodifiableMap(result));
}
- public void addTheme(ThemeImpl theme) {
+ public void addTheme(final ThemeImpl theme) {
availableThemes.add(theme);
}
}
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ThemeConfigCacheKey.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ThemeConfigCacheKey.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ThemeConfigCacheKey.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ThemeConfigCacheKey.java Fri Nov 15 17:10:58 2013
@@ -30,7 +30,8 @@ public final class ThemeConfigCacheKey {
private final int hashCode;
public ThemeConfigCacheKey(
- ClientPropertiesKey clientPropertiesKey, String rendererType, Markup markup, String name) {
+ final ClientPropertiesKey clientPropertiesKey, final String rendererType, final Markup markup,
+ final String name) {
this.clientPropertiesKey = clientPropertiesKey;
this.rendererType = rendererType;
this.markup = markup;
@@ -39,7 +40,7 @@ public final class ThemeConfigCacheKey {
}
@Override
- public boolean equals(Object o) {
+ public boolean equals(final Object o) {
if (this == o) {
return true;
}
@@ -47,7 +48,7 @@ public final class ThemeConfigCacheKey {
return false;
}
- ThemeConfigCacheKey cacheKey = (ThemeConfigCacheKey) o;
+ final ThemeConfigCacheKey cacheKey = (ThemeConfigCacheKey) o;
if (!rendererType.equals(cacheKey.rendererType)) {
return false;
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/BankHead.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/BankHead.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/BankHead.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/BankHead.java Fri Nov 15 17:10:58 2013
@@ -36,7 +36,7 @@ public class BankHead {
private boolean rendered;
- public BankHead(LayoutToken token) {
+ public BankHead(final LayoutToken token) {
this.token = token;
this.rendered = true;
}
@@ -45,7 +45,7 @@ public class BankHead {
return token;
}
- public void setToken(LayoutToken token) {
+ public void setToken(final LayoutToken token) {
this.token = token;
}
@@ -53,7 +53,7 @@ public class BankHead {
return intervalList;
}
- public void setIntervalList(IntervalList intervalList) {
+ public void setIntervalList(final IntervalList intervalList) {
this.intervalList = intervalList;
}
@@ -61,7 +61,7 @@ public class BankHead {
return current;
}
- public void setCurrent(Measure current) {
+ public void setCurrent(final Measure current) {
this.current = current;
}
@@ -69,7 +69,7 @@ public class BankHead {
return rendered;
}
- public void setRendered(boolean rendered) {
+ public void setRendered(final boolean rendered) {
this.rendered = rendered;
}
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/FactorList.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/FactorList.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/FactorList.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/FactorList.java Fri Nov 15 17:10:58 2013
@@ -26,24 +26,24 @@ import java.util.List;
public class FactorList extends ArrayList<Integer> {
- public List<Measure> partition(Measure size) {
+ public List<Measure> partition(final Measure size) {
- List<Measure> result = new ArrayList<Measure>(size());
+ final List<Measure> result = new ArrayList<Measure>(size());
int sum = 0;
- for (Integer integer : this) {
+ for (final Integer integer : this) {
sum += integer;
}
- double[] doubles = new double[size()];
+ final double[] doubles = new double[size()];
int i = 0;
- for (Integer integer : this) {
+ for (final Integer integer : this) {
doubles[i++] = integer * size.getPixel() / (double) sum;
}
MathUtils.adjustRemainders(doubles, 0.0);
- for (double value : doubles) {
+ for (final double value : doubles) {
result.add(Measure.valueOf((int) value));
}
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/Grid.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/Grid.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/Grid.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/Grid.java Fri Nov 15 17:10:58 2013
@@ -53,7 +53,7 @@ public class Grid {
private List<Integer> errorIndexes;
- public Grid(LayoutTokens columns, LayoutTokens rows) {
+ public Grid(final LayoutTokens columns, final LayoutTokens rows) {
assert columns.getSize() > 0;
assert rows.getSize() > 0;
@@ -68,14 +68,14 @@ public class Grid {
for (int i = 0; i < rowCount; i++) {
rowHeads[i] = new BankHead(rows.get(i));
}
- int size = columnCount * rowCount;
+ final int size = columnCount * rowCount;
this.cells = new ArrayList<Cell>(size);
for (int i = 0; i < size; i++) {
this.cells.add(null);
}
}
- public void add(OriginCell cell, int columnSpan, int rowSpan) {
+ public void add(final OriginCell cell, int columnSpan, final int rowSpan) {
assert columnSpan > 0;
assert rowSpan > 0;
@@ -103,7 +103,7 @@ public class Grid {
for (int j = 0; j < rowSpan; j++) {
for (int i = 0; i < columnSpan; i++) {
- Cell actualCell;
+ final Cell actualCell;
if (i == 0 && j == 0) {
actualCell = cell;
} else {
@@ -120,11 +120,11 @@ public class Grid {
findNextFreeCell();
}
- public Cell getCell(int i, int j, Orientation orientation) {
+ public Cell getCell(final int i, final int j, final Orientation orientation) {
return orientation == Orientation.HORIZONTAL ? getCell(i, j) : getCell(j, i);
}
- public Cell getCell(int column, int row) {
+ public Cell getCell(final int column, final int row) {
assert column >= 0 && column < columnCount : "column=" + column + " columnCount=" + columnCount;
assert row >= 0 : "row=" + row;
@@ -135,7 +135,7 @@ public class Grid {
}
}
- public void setCell(int column, int row, Cell cell) {
+ public void setCell(final int column, final int row, final Cell cell) {
if (row >= rowCount) {
enlarge(row - rowCount + 1);
}
@@ -153,11 +153,11 @@ public class Grid {
}
}
- public BankHead[] getBankHeads(Orientation orientation) {
+ public BankHead[] getBankHeads(final Orientation orientation) {
return orientation == Orientation.HORIZONTAL ? columnHeads : rowHeads;
}
- private void enlarge(int newRows) {
+ private void enlarge(final int newRows) {
// process cells
for (int i = 0; i < newRows; i++) {
@@ -167,7 +167,7 @@ public class Grid {
}
// process heads
- BankHead[] newRowHeads = new BankHead[rowCount + newRows];
+ final BankHead[] newRowHeads = new BankHead[rowCount + newRows];
System.arraycopy(rowHeads, 0, newRowHeads, 0, rowHeads.length);
rowHeads = newRowHeads;
// todo: shorter in jdk 1.6: rowHeads = Arrays.copyOf(rowHeads, rowHeads.length + newRows);
@@ -179,11 +179,11 @@ public class Grid {
rowCount += newRows;
}
- public boolean isOverflow(Orientation orientation) {
+ public boolean isOverflow(final Orientation orientation) {
return orientation == Orientation.HORIZONTAL ? columnOverflow : rowOverflow;
}
- public void setOverflow(boolean overflow, Orientation orientation) {
+ public void setOverflow(final boolean overflow, final Orientation orientation) {
if (orientation == Orientation.HORIZONTAL) {
this.columnOverflow = overflow;
} else {
@@ -195,7 +195,7 @@ public class Grid {
return columnOverflow;
}
- public void setColumnOverflow(boolean columnOverflow) {
+ public void setColumnOverflow(final boolean columnOverflow) {
this.columnOverflow = columnOverflow;
}
@@ -203,18 +203,18 @@ public class Grid {
return rowOverflow;
}
- public void setRowOverflow(boolean rowOverflow) {
+ public void setRowOverflow(final boolean rowOverflow) {
this.rowOverflow = rowOverflow;
}
- public void addError(int i, int j) {
+ public void addError(final int i, final int j) {
if (errorIndexes == null) {
errorIndexes = new ArrayList<Integer>();
}
errorIndexes.add(j * columnCount + i);
}
- public boolean hasError(int i, int j) {
+ public boolean hasError(final int i, final int j) {
if (errorIndexes == null) {
return false;
}
@@ -245,7 +245,7 @@ public class Grid {
*/
public String gridAsString() {
- StringBuilder builder = new StringBuilder();
+ final StringBuilder builder = new StringBuilder();
// top of grid
for (int i = 0; i < columnCount; i++) {
@@ -256,8 +256,8 @@ public class Grid {
builder.append("â");
}
} else {
- Cell c = getCell(i - 1, 0);
- Cell d = getCell(i, 0);
+ final Cell c = getCell(i - 1, 0);
+ final Cell d = getCell(i, 0);
if (c == null && d == null) {
builder.append("â¬");
} else {
@@ -294,8 +294,8 @@ public class Grid {
if (j != 0) {
for (int i = 0; i < columnCount; i++) {
if (i == 0) {
- Cell b = getCell(0, j - 1);
- Cell d = getCell(0, j);
+ final Cell b = getCell(0, j - 1);
+ final Cell d = getCell(0, j);
if (b == null && d == null) {
builder.append("â");
} else {
@@ -312,10 +312,10 @@ public class Grid {
}
}
} else {
- Cell a = getCell(i - 1, j - 1);
- Cell b = getCell(i, j - 1);
- Cell c = getCell(i - 1, j);
- Cell d = getCell(i, j);
+ final Cell a = getCell(i - 1, j - 1);
+ final Cell b = getCell(i, j - 1);
+ final Cell c = getCell(i - 1, j);
+ final Cell d = getCell(i, j);
// aâb
// ââ¼â
// câd
@@ -355,16 +355,16 @@ public class Grid {
}
}
}
- Cell a = getCell(i, j - 1);
- Cell c = getCell(i, j);
+ final Cell a = getCell(i, j - 1);
+ final Cell c = getCell(i, j);
if (connected(a, c)) {
builder.append("â");
} else {
builder.append("â");
}
}
- Cell a = getCell(columnCount - 1, j - 1);
- Cell c = getCell(columnCount - 1, j);
+ final Cell a = getCell(columnCount - 1, j - 1);
+ final Cell c = getCell(columnCount - 1, j);
if (a == null && c == null) {
builder.append("â¤");
} else {
@@ -392,8 +392,8 @@ public class Grid {
builder.append("â");
}
} else {
- Cell c = getCell(i - 1, j);
- Cell d = getCell(i, j);
+ final Cell c = getCell(i - 1, j);
+ final Cell d = getCell(i, j);
if (connected(c, d)) {
builder.append("â");
} else {
@@ -409,8 +409,8 @@ public class Grid {
if (j == 0) {
builder.append("â");
} else {
- Cell a = getCell(i, j - 1);
- Cell c = getCell(i, j);
+ final Cell a = getCell(i, j - 1);
+ final Cell c = getCell(i, j);
if (connected(a, c)) {
builder.append("â¬");
} else {
@@ -439,8 +439,8 @@ public class Grid {
builder.append("â");
}
} else {
- Cell a = getCell(i - 1, rowCount - 1);
- Cell b = getCell(i, rowCount - 1);
+ final Cell a = getCell(i - 1, rowCount - 1);
+ final Cell b = getCell(i, rowCount - 1);
if (a == null && b == null) {
builder.append("â´");
} else {
@@ -475,7 +475,7 @@ public class Grid {
@Override
public String toString() {
- StringBuilder builder = new StringBuilder();
+ final StringBuilder builder = new StringBuilder();
builder.append(gridAsString());
builder.append("columnHeads=");
builder.append(Arrays.toString(columnHeads));
@@ -486,7 +486,7 @@ public class Grid {
return builder.toString();
}
- private boolean connected(Cell a, Cell b) {
+ private boolean connected(final Cell a, final Cell b) {
if (a == null && b == null) {
return true;
}
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/Interval.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/Interval.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/Interval.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/Interval.java Fri Nov 15 17:10:58 2013
@@ -38,7 +38,7 @@ public class Interval {
private final Measure current;
- public Interval(LayoutComponent component, Orientation orientation) {
+ public Interval(final LayoutComponent component, final Orientation orientation) {
this(
orientation == Orientation.HORIZONTAL ? component.getMinimumWidth() : component.getMinimumHeight(),
orientation == Orientation.HORIZONTAL ? component.getPreferredWidth() : component.getPreferredHeight(),
@@ -46,7 +46,7 @@ public class Interval {
orientation == Orientation.HORIZONTAL ? component.getCurrentWidth() : component.getCurrentHeight());
}
- public Interval(Measure minimum, Measure preferred, Measure maximum, Measure current) {
+ public Interval(final Measure minimum, final Measure preferred, final Measure maximum, final Measure current) {
if (LOG.isWarnEnabled()) {
if (minimum != null && minimum.greaterThan(preferred)) {
LOG.warn("Minimum '{}' is not smaller or equals preferred '{}'.", minimum, preferred);
@@ -62,7 +62,7 @@ public class Interval {
}
// XXX what about rounding??? may use multiply instead of divide
- public Interval(Interval interval, int divider) {
+ public Interval(final Interval interval, final int divider) {
this.minimum = interval.minimum != null
? interval.minimum.divide(divider) : null; // XXX may add one for rounding up.
this.preferred = interval.preferred != null ? interval.preferred.divide(divider) : null;
@@ -88,7 +88,7 @@ public class Interval {
@Override
public String toString() {
- StringBuilder builder = new StringBuilder();
+ final StringBuilder builder = new StringBuilder();
builder.append("[");
builder.append(minimum);
builder.append("<=");
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/IntervalList.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/IntervalList.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/IntervalList.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/IntervalList.java Fri Nov 15 17:10:58 2013
@@ -34,10 +34,10 @@ public class IntervalList extends ArrayL
private Measure current;
public void evaluate() {
- List<Measure> minimumList = collectMinimum();
- List<Measure> maximumList = collectMaximum();
+ final List<Measure> minimumList = collectMinimum();
+ final List<Measure> maximumList = collectMaximum();
minimum = Measure.max(minimumList);
- Measure maximum = Measure.min(maximumList);
+ final Measure maximum = Measure.min(maximumList);
if (minimum.greaterThan(maximum)) {
if (LOG.isDebugEnabled()) {
LOG.debug("Layout: Found a minimum constraint " + minimum
@@ -45,7 +45,7 @@ public class IntervalList extends ArrayL
}
current = minimum;
} else {
- List<Measure> preferred = findPreferredInInterval(minimum, maximum);
+ final List<Measure> preferred = findPreferredInInterval(minimum, maximum);
if (!preferred.isEmpty()) {
current = Measure.max(preferred);
} else {
@@ -55,8 +55,8 @@ public class IntervalList extends ArrayL
}
private List<Measure> collectMinimum() {
- List<Measure> result = new ArrayList<Measure>();
- for (Interval interval : this) {
+ final List<Measure> result = new ArrayList<Measure>();
+ for (final Interval interval : this) {
if (interval.getMinimum() != null) {
result.add(interval.getMinimum());
}
@@ -68,8 +68,8 @@ public class IntervalList extends ArrayL
}
private List<Measure> collectMaximum() {
- List<Measure> result = new ArrayList<Measure>();
- for (Interval interval : this) {
+ final List<Measure> result = new ArrayList<Measure>();
+ for (final Interval interval : this) {
if (interval.getMaximum() != null) {
result.add(interval.getMaximum());
}
@@ -77,9 +77,9 @@ public class IntervalList extends ArrayL
return result;
}
- private List<Measure> findPreferredInInterval(Measure min, Measure max) {
- List<Measure> result = new ArrayList<Measure>();
- for (Interval interval : this) {
+ private List<Measure> findPreferredInInterval(final Measure min, final Measure max) {
+ final List<Measure> result = new ArrayList<Measure>();
+ for (final Interval interval : this) {
Measure value = interval.getCurrent();
if (value == null) {
value = interval.getPreferred();
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/LayoutContext.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/LayoutContext.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/LayoutContext.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/LayoutContext.java Fri Nov 15 17:10:58 2013
@@ -62,7 +62,7 @@ public class LayoutContext {
private LayoutContainer container;
- public LayoutContext(LayoutContainer container) {
+ public LayoutContext(final LayoutContainer container) {
this.container = container;
}
@@ -75,7 +75,7 @@ public class LayoutContext {
begin = System.nanoTime();
}
- LayoutManager layoutManager = container.getLayoutManager();
+ final LayoutManager layoutManager = container.getLayoutManager();
layoutManager.init();
if (trace) {
log("after init", true);
@@ -119,8 +119,8 @@ public class LayoutContext {
}
}
- private void log(String message, boolean trace) {
- StringBuffer buffer = new StringBuffer(message + "\n");
+ private void log(final String message, final boolean trace) {
+ final StringBuffer buffer = new StringBuffer(message + "\n");
log(buffer, (UIComponent) container, 0);
if (trace) {
LOG.trace(buffer.toString());
@@ -129,8 +129,8 @@ public class LayoutContext {
}
}
- private void log(StringBuffer buffer, UIComponent component, int depth) {
- FacesContext facesContext = FacesContext.getCurrentInstance();
+ private void log(final StringBuffer buffer, final UIComponent component, final int depth) {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
buffer.append(StringUtils.repeat(" ", depth));
buffer.append(component.getClass().getSimpleName());
buffer.append("#");
@@ -143,7 +143,7 @@ public class LayoutContext {
buffer.append(")");
}
if (component instanceof LayoutContainer) {
- LayoutManager layoutManager = ((LayoutContainer) component).getLayoutManager();
+ final LayoutManager layoutManager = ((LayoutContainer) component).getLayoutManager();
if (layoutManager instanceof AbstractUIGridLayout) {
buffer.append("\n");
buffer.append(StringUtils.repeat(" ", depth + 4));
@@ -152,7 +152,7 @@ public class LayoutContext {
}
}
buffer.append("\n");
- for (UIComponent child : component.getChildren()) {
+ for (final UIComponent child : component.getChildren()) {
log(buffer, child, depth + 2);
}
}
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/LayoutUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/LayoutUtils.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/LayoutUtils.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/LayoutUtils.java Fri Nov 15 17:10:58 2013
@@ -44,10 +44,10 @@ public final class LayoutUtils {
// to prevent instantiation
}
- public static boolean checkTokens(String columns) {
- StringTokenizer st = new StringTokenizer(columns, ";");
+ public static boolean checkTokens(final String columns) {
+ final StringTokenizer st = new StringTokenizer(columns, ";");
while (st.hasMoreTokens()) {
- String token = st.nextToken();
+ final String token = st.nextToken();
if (!TOKEN_PATTERN.matcher(token).matches()) {
return false;
}
@@ -55,14 +55,14 @@ public final class LayoutUtils {
return true;
}
- public static List<LayoutComponent> findLayoutChildren(LayoutContainer container) {
- List<LayoutComponent> result = new ArrayList<LayoutComponent>();
+ public static List<LayoutComponent> findLayoutChildren(final LayoutContainer container) {
+ final List<LayoutComponent> result = new ArrayList<LayoutComponent>();
addLayoutChildren((UIComponent) container, result);
return result;
}
- private static void addLayoutChildren(UIComponent component, List<LayoutComponent> result) {
- for (UIComponent child : component.getChildren()) {
+ private static void addLayoutChildren(final UIComponent component, final List<LayoutComponent> result) {
+ for (final UIComponent child : component.getChildren()) {
if (child instanceof LayoutComponent) {
result.add((LayoutComponent) child);
} else {
@@ -73,27 +73,27 @@ public final class LayoutUtils {
}
}
- public static Measure getBorderEnd(Orientation orientation, LayoutBox container) {
+ public static Measure getBorderEnd(final Orientation orientation, final LayoutBox container) {
return orientation == Orientation.HORIZONTAL ? container.getBorderRight() : container.getBorderBottom();
}
- public static Measure getBorderBegin(Orientation orientation, LayoutBox container) {
+ public static Measure getBorderBegin(final Orientation orientation, final LayoutBox container) {
return orientation == Orientation.HORIZONTAL ? container.getBorderLeft() : container.getBorderTop();
}
- public static Measure getPaddingEnd(Orientation orientation, LayoutBox container) {
+ public static Measure getPaddingEnd(final Orientation orientation, final LayoutBox container) {
return orientation == Orientation.HORIZONTAL ? container.getPaddingRight() : container.getPaddingBottom();
}
- public static Measure getPaddingBegin(Orientation orientation, LayoutBox container) {
+ public static Measure getPaddingBegin(final Orientation orientation, final LayoutBox container) {
return orientation == Orientation.HORIZONTAL ? container.getPaddingLeft() : container.getPaddingTop();
}
- public static Measure getCurrentSize(Orientation orientation, LayoutBase component) {
+ public static Measure getCurrentSize(final Orientation orientation, final LayoutBase component) {
return orientation == Orientation.HORIZONTAL ? component.getCurrentWidth() : component.getCurrentHeight();
}
- public static void setCurrentSize(Orientation orientation, LayoutBase component, Measure size) {
+ public static void setCurrentSize(final Orientation orientation, final LayoutBase component, Measure size) {
if (orientation == Orientation.HORIZONTAL) {
final Measure width = component.getWidth();
if (width != null) { // to not override set sizes
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/MathUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/MathUtils.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/MathUtils.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/MathUtils.java Fri Nov 15 17:10:58 2013
@@ -54,7 +54,7 @@ public final class MathUtils {
double max = 0.0;
Integer indexOfMax = null;
for (int i = 0; i < list.length; i++) {
- double remainder = remainder(list[i]);
+ final double remainder = remainder(list[i]);
if (remainder > max + EPSILON) {
max = remainder;
indexOfMax = i;
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/OriginCell.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/OriginCell.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/OriginCell.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/OriginCell.java Fri Nov 15 17:10:58 2013
@@ -28,7 +28,7 @@ public class OriginCell implements Cell
private int columnSpan;
private int rowSpan;
- public OriginCell(LayoutComponent component) {
+ public OriginCell(final LayoutComponent component) {
this.component = component;
}
@@ -48,7 +48,7 @@ public class OriginCell implements Cell
return true;
}
- public int getSpan(Orientation orientation) {
+ public int getSpan(final Orientation orientation) {
return orientation == Orientation.HORIZONTAL ? getColumnSpan() : getRowSpan();
}
@@ -56,7 +56,7 @@ public class OriginCell implements Cell
return columnSpan;
}
- public void setColumnSpan(int columnSpan) {
+ public void setColumnSpan(final int columnSpan) {
this.columnSpan = columnSpan;
}
@@ -64,7 +64,7 @@ public class OriginCell implements Cell
return rowSpan;
}
- public void setRowSpan(int rowSpan) {
+ public void setRowSpan(final int rowSpan) {
this.rowSpan = rowSpan;
}
}
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/SpanCell.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/SpanCell.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/SpanCell.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/SpanCell.java Fri Nov 15 17:10:58 2013
@@ -27,7 +27,7 @@ public class SpanCell implements Cell {
private boolean horizontalFirst;
private boolean verticalFirst;
- public SpanCell(OriginCell origin, boolean horizontalFirst, boolean verticalFirst) {
+ public SpanCell(final OriginCell origin, final boolean horizontalFirst, final boolean verticalFirst) {
this.origin = origin;
this.horizontalFirst = horizontalFirst;
this.verticalFirst = verticalFirst;
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/TobagoBodyTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/TobagoBodyTag.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/TobagoBodyTag.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/TobagoBodyTag.java Fri Nov 15 17:10:58 2013
@@ -40,15 +40,15 @@ public abstract class TobagoBodyTag exte
}
protected String getBodyContentStr() {
- String content = bodyContent.getString();
+ final String content = bodyContent.getString();
bodyContent.clearBody();
return content;
}
protected boolean isBodyContentEmpty() {
if (bodyContent != null) {
- String content = bodyContent.getString();
- String tmp = content.replace('\n', ' ');
+ final String content = bodyContent.getString();
+ final String tmp = content.replace('\n', ' ');
if (tmp.trim().length() > 0) { // if there are only whitespaces: drop bodyContent
return false;
}
@@ -69,7 +69,7 @@ public abstract class TobagoBodyTag exte
bodyContent = null;
}
- public void setBodyContent(BodyContent bodyContent) {
+ public void setBodyContent(final BodyContent bodyContent) {
this.bodyContent = bodyContent;
}
}
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/TobagoELTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/TobagoELTag.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/TobagoELTag.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/TobagoELTag.java Fri Nov 15 17:10:58 2013
@@ -32,8 +32,8 @@ public abstract class TobagoELTag extend
@Override
public int doStartTag() throws JspException {
- int result = super.doStartTag();
- UIComponent component = getComponentInstance();
+ final int result = super.doStartTag();
+ final UIComponent component = getComponentInstance();
if (component instanceof OnComponentCreated
&& component.getAttributes().get(OnComponentCreated.MARKER) == null) {
component.getAttributes().put(OnComponentCreated.MARKER, Boolean.TRUE);
@@ -44,8 +44,8 @@ public abstract class TobagoELTag extend
@Override
public int doEndTag() throws JspException {
- UIComponent component = getComponentInstance();
- int result = super.doEndTag();
+ final UIComponent component = getComponentInstance();
+ final int result = super.doEndTag();
if (component instanceof OnComponentPopulated
&& component.getAttributes().get(OnComponentPopulated.MARKER) == null) {
component.getAttributes().put(OnComponentPopulated.MARKER, Boolean.TRUE);
@@ -54,7 +54,7 @@ public abstract class TobagoELTag extend
return result;
}
- public String[] splitList(String renderers) {
+ public String[] splitList(final String renderers) {
return StringUtils.split(renderers, ", ");
}
@@ -64,7 +64,7 @@ public abstract class TobagoELTag extend
*/
@Deprecated
protected String getBodyContentStr() {
- String content = bodyContent.getString();
+ final String content = bodyContent.getString();
bodyContent.clearBody();
return content;
}
@@ -76,8 +76,8 @@ public abstract class TobagoELTag extend
@Deprecated
protected boolean isBodyContentEmpty() {
if (bodyContent != null) {
- String content = bodyContent.getString();
- String tmp = content.replace('\n', ' ');
+ final String content = bodyContent.getString();
+ final String tmp = content.replace('\n', ' ');
if (tmp.trim().length() > 0) { // if there are only whitespaces: drop bodyContent
return false;
}
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/TobagoTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/TobagoTag.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/TobagoTag.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/TobagoTag.java Fri Nov 15 17:10:58 2013
@@ -29,9 +29,9 @@ import javax.servlet.jsp.JspException;
public abstract class TobagoTag extends UIComponentELTag {
public int doStartTag() throws JspException {
- int result = super.doStartTag();
+ final int result = super.doStartTag();
- UIComponent component = getComponentInstance();
+ final UIComponent component = getComponentInstance();
if (component instanceof OnComponentCreated
&& component.getAttributes().get(OnComponentCreated.MARKER) == null) {
component.getAttributes().put(OnComponentCreated.MARKER, Boolean.TRUE);
@@ -40,7 +40,7 @@ public abstract class TobagoTag extends
return result;
}
- public String[] splitList(String renderers) {
+ public String[] splitList(final String renderers) {
return StringUtils.split(renderers, ", ");
}
}
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/AttributeTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/AttributeTag.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/AttributeTag.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/AttributeTag.java Fri Nov 15 17:10:58 2013
@@ -60,7 +60,7 @@ public abstract class AttributeTag exten
public int doStartTag() throws JspException {
// Locate our parent UIComponentTag
- UIComponentClassicTagBase tag =
+ final UIComponentClassicTagBase tag =
UIComponentELTag.getParentUIComponentClassicTagBase(pageContext);
if (tag == null) {
// TODO Message resource i18n
@@ -71,7 +71,7 @@ public abstract class AttributeTag exten
return (SKIP_BODY);
}
- UIComponent component = tag.getComponentInstance();
+ final UIComponent component = tag.getComponentInstance();
if (component == null) {
// TODO Message resource i18n
throw new JspException("Component Instance is null");
@@ -87,7 +87,7 @@ public abstract class AttributeTag exten
ComponentUtils.setStyleClasses(component, (String) value.getValue(elContext));
} else if (Attributes.RENDERED_PARTIALLY.equals(attributeName)
&& component instanceof SupportsRenderedPartially) {
- String[] components = ComponentUtils.splitList((String) value.getValue(elContext));
+ final String[] components = ComponentUtils.splitList((String) value.getValue(elContext));
((SupportsRenderedPartially) component).setRenderedPartially(components);
} else {
component.getAttributes().put(attributeName, value.getValue(elContext));
@@ -106,7 +106,7 @@ public abstract class AttributeTag exten
* The name of the attribute in the parent component.
*/
@TagAttribute(required = true, name = "name", type = "java.lang.String")
- public void setName(ValueExpression name){
+ public void setName(final ValueExpression name){
this.name = name;
}
@@ -114,7 +114,7 @@ public abstract class AttributeTag exten
* The value of the attribute in the parent component.
*/
@TagAttribute(required = true, name = "value", type = "java.lang.String")
- public void setValue(ValueExpression value){
+ public void setValue(final ValueExpression value){
this.value = value;
}
@@ -135,7 +135,7 @@ public abstract class AttributeTag exten
* "valueIfSet" set the attribute only if the value is set.
*/
@TagAttribute(name = "mode")
- public void setMode(ValueExpression mode) {
+ public void setMode(final ValueExpression mode) {
LOG.error("The mode is only available when using Facelets, not with JSP.");
}
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/CommandTagExtraInfo.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/CommandTagExtraInfo.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/CommandTagExtraInfo.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/CommandTagExtraInfo.java Fri Nov 15 17:10:58 2013
@@ -26,10 +26,10 @@ import javax.servlet.jsp.tagext.Validati
public class CommandTagExtraInfo extends TagExtraInfo {
private static final ValidationMessage[] EMPTY_MESSAGE = new ValidationMessage[0];
- public ValidationMessage[] validate(TagData data) {
- Object action = data.getAttribute("action");
- Object onclick = data.getAttribute("onclick");
- Object link = data.getAttribute("link");
+ public ValidationMessage[] validate(final TagData data) {
+ final Object action = data.getAttribute("action");
+ final Object onclick = data.getAttribute("onclick");
+ final Object link = data.getAttribute("link");
if (link != null && !(action == null && onclick == null)) {
return generateValidationMessages(data);
@@ -37,8 +37,8 @@ public class CommandTagExtraInfo extends
return EMPTY_MESSAGE;
}
- private ValidationMessage[] generateValidationMessages(TagData data) {
- ValidationMessage[] messages = new ValidationMessage[1];
+ private ValidationMessage[] generateValidationMessages(final TagData data) {
+ final ValidationMessage[] messages = new ValidationMessage[1];
messages[0] = new ValidationMessage(data.getId(),
"Only one Attribute of action, onclick and link is allowed");
return messages;
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ConverterTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ConverterTag.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ConverterTag.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ConverterTag.java Fri Nov 15 17:10:58 2013
@@ -62,7 +62,7 @@ public abstract class ConverterTag exten
public int doStartTag() throws JspException {
// Locate our parent UIComponentTag
- UIComponentClassicTagBase tag =
+ final UIComponentClassicTagBase tag =
UIComponentELTag.getParentUIComponentClassicTagBase(pageContext);
if (tag == null) {
// TODO Message resource i18n
@@ -73,7 +73,7 @@ public abstract class ConverterTag exten
return (SKIP_BODY);
}
- UIComponent component = tag.getComponentInstance();
+ final UIComponent component = tag.getComponentInstance();
if (component == null) {
// TODO Message resource i18n
throw new JspException("Component Instance is null");
@@ -82,7 +82,7 @@ public abstract class ConverterTag exten
// TODO Message resource i18n
throw new JspException("Component " + component.getClass().getName() + " is not instanceof ValueHolder");
}
- ValueHolder valueHolder = (ValueHolder) component;
+ final ValueHolder valueHolder = (ValueHolder) component;
Converter converter = null;
@@ -94,14 +94,14 @@ public abstract class ConverterTag exten
}
if (converter == null && converterId != null) {
- String localConverterId = (String) converterId.getValue(elContext);
+ final String localConverterId = (String) converterId.getValue(elContext);
// evaluate any VB expression that we were passed
converter = facesContext.getApplication().createConverter(localConverterId);
}
if (converter != null) {
if (!binding.isLiteralText()) {
- ValueExpression ve = component.getValueExpression(Attributes.CONVERTER);
+ final ValueExpression ve = component.getValueExpression(Attributes.CONVERTER);
if (ve != null) {
ve.setValue(elContext, converter);
}
@@ -124,7 +124,7 @@ public abstract class ConverterTag exten
* The converterId of a registered converter.
*/
@TagAttribute(name = "converterId", type = "java.lang.String")
- public void setConverterId(ValueExpression converterId) {
+ public void setConverterId(final ValueExpression converterId) {
this.converterId = converterId;
}
@@ -132,7 +132,7 @@ public abstract class ConverterTag exten
* The value binding expression to a converter.
*/
@TagAttribute(name = "binding", type = "javax.faces.convert.Converter")
- public void setBinding(ValueExpression binding) {
+ public void setBinding(final ValueExpression binding) {
this.binding = binding;
}
}
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/DataAttributeTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/DataAttributeTag.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/DataAttributeTag.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/DataAttributeTag.java Fri Nov 15 17:10:58 2013
@@ -67,7 +67,7 @@ public abstract class DataAttributeTag e
public int doStartTag() throws JspException {
// Locate our parent UIComponentTag
- UIComponentClassicTagBase tag =
+ final UIComponentClassicTagBase tag =
UIComponentELTag.getParentUIComponentClassicTagBase(pageContext);
if (tag == null) {
// TODO Message resource i18n
@@ -100,7 +100,7 @@ public abstract class DataAttributeTag e
* The name of the attribute in the parent component.
*/
@TagAttribute(required = true, name = "name", type = "java.lang.String")
- public void setName(ValueExpression name) {
+ public void setName(final ValueExpression name) {
this.name = name;
}
@@ -110,7 +110,7 @@ public abstract class DataAttributeTag e
* The value of the attribute in the parent component.
*/
@TagAttribute(required = true, name = "value", type = "java.lang.String")
- public void setValue(ValueExpression value) {
+ public void setValue(final ValueExpression value) {
this.value = value;
}
}
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/GridLayoutConstraintTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/GridLayoutConstraintTag.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/GridLayoutConstraintTag.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/GridLayoutConstraintTag.java Fri Nov 15 17:10:58 2013
@@ -77,7 +77,7 @@ public abstract class GridLayoutConstrai
public int doStartTag() throws JspException {
// Locate our parent UIComponentTag
- UIComponentClassicTagBase tag =
+ final UIComponentClassicTagBase tag =
UIComponentELTag.getParentUIComponentClassicTagBase(pageContext);
if (tag == null) {
// TODO Message resource i18n
@@ -267,7 +267,7 @@ public abstract class GridLayoutConstrai
* The number of horizontal cells this component should use.
*/
@TagAttribute(name = "columnSpan", type = "java.lang.Integer")
- public void setColumnSpan(ValueExpression columnSpan) {
+ public void setColumnSpan(final ValueExpression columnSpan) {
this.columnSpan = columnSpan;
}
@@ -275,7 +275,7 @@ public abstract class GridLayoutConstrai
* The number of vertical cells this component should use.
*/
@TagAttribute(name = "rowSpan", type = "java.lang.Integer")
- public void setRowSpan(ValueExpression rowSpan) {
+ public void setRowSpan(final ValueExpression rowSpan) {
this.rowSpan = rowSpan;
}
@@ -284,7 +284,7 @@ public abstract class GridLayoutConstrai
*/
@TagAttribute(name = "width", type = "org.apache.myfaces.tobago.layout.Measure")
@UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
- public void setWidth(ValueExpression width) {
+ public void setWidth(final ValueExpression width) {
this.width = width;
}
@@ -293,7 +293,7 @@ public abstract class GridLayoutConstrai
*/
@TagAttribute(name = "height", type = "org.apache.myfaces.tobago.layout.Measure")
@UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
- public void setHeight(ValueExpression height) {
+ public void setHeight(final ValueExpression height) {
this.height = height;
}
@@ -302,7 +302,7 @@ public abstract class GridLayoutConstrai
*/
@TagAttribute(name = "minimumWidth", type = "org.apache.myfaces.tobago.layout.Measure")
@UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
- public void setMinimumWidth(ValueExpression minimumWidth) {
+ public void setMinimumWidth(final ValueExpression minimumWidth) {
this.minimumWidth = minimumWidth;
}
@@ -311,7 +311,7 @@ public abstract class GridLayoutConstrai
*/
@TagAttribute(name = "minimumHeight", type = "org.apache.myfaces.tobago.layout.Measure")
@UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
- public void setMinimumHeight(ValueExpression minimumHeight) {
+ public void setMinimumHeight(final ValueExpression minimumHeight) {
this.minimumHeight = minimumHeight;
}
@@ -320,7 +320,7 @@ public abstract class GridLayoutConstrai
*/
@TagAttribute(name = "preferredWidth", type = "org.apache.myfaces.tobago.layout.Measure")
@UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
- public void setPreferredWidth(ValueExpression preferredWidth) {
+ public void setPreferredWidth(final ValueExpression preferredWidth) {
this.preferredWidth = preferredWidth;
}
@@ -329,7 +329,7 @@ public abstract class GridLayoutConstrai
*/
@TagAttribute(name = "preferredHeight", type = "org.apache.myfaces.tobago.layout.Measure")
@UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
- public void setPreferredHeight(ValueExpression preferredHeight) {
+ public void setPreferredHeight(final ValueExpression preferredHeight) {
this.preferredHeight = preferredHeight;
}
@@ -338,7 +338,7 @@ public abstract class GridLayoutConstrai
*/
@TagAttribute(name = "maximumWidth", type = "org.apache.myfaces.tobago.layout.Measure")
@UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
- public void setMaximumWidth(ValueExpression maximumWidth) {
+ public void setMaximumWidth(final ValueExpression maximumWidth) {
this.maximumWidth = maximumWidth;
}
@@ -347,7 +347,7 @@ public abstract class GridLayoutConstrai
*/
@TagAttribute(name = "maximumHeight", type = "org.apache.myfaces.tobago.layout.Measure")
@UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
- public void setMaximumHeight(ValueExpression maximumHeight) {
+ public void setMaximumHeight(final ValueExpression maximumHeight) {
this.maximumHeight = maximumHeight;
}
@@ -356,7 +356,7 @@ public abstract class GridLayoutConstrai
*/
@TagAttribute(name = "marginLeft", type = "org.apache.myfaces.tobago.layout.Measure")
@UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
- public void setMarginLeft(ValueExpression marginLeft) {
+ public void setMarginLeft(final ValueExpression marginLeft) {
this.marginLeft = marginLeft;
}
@@ -365,7 +365,7 @@ public abstract class GridLayoutConstrai
*/
@TagAttribute(name = "marginRight", type = "org.apache.myfaces.tobago.layout.Measure")
@UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
- public void setMarginRight(ValueExpression marginRight) {
+ public void setMarginRight(final ValueExpression marginRight) {
this.marginRight = marginRight;
}
@@ -374,7 +374,7 @@ public abstract class GridLayoutConstrai
*/
@TagAttribute(name = "marginTop", type = "org.apache.myfaces.tobago.layout.Measure")
@UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
- public void setMarginTop(ValueExpression marginTop) {
+ public void setMarginTop(final ValueExpression marginTop) {
this.marginTop = marginTop;
}
@@ -383,7 +383,7 @@ public abstract class GridLayoutConstrai
*/
@TagAttribute(name = "marginBottom", type = "org.apache.myfaces.tobago.layout.Measure")
@UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
- public void setMarginBottom(ValueExpression marginBottom) {
+ public void setMarginBottom(final ValueExpression marginBottom) {
this.marginBottom = marginBottom;
}
@@ -392,7 +392,7 @@ public abstract class GridLayoutConstrai
*/
@TagAttribute(name = "borderLeft", type = "org.apache.myfaces.tobago.layout.Measure")
@UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
- public void setBorderLeft(ValueExpression borderLeft) {
+ public void setBorderLeft(final ValueExpression borderLeft) {
this.borderLeft = borderLeft;
}
@@ -401,7 +401,7 @@ public abstract class GridLayoutConstrai
*/
@TagAttribute(name = "borderRight", type = "org.apache.myfaces.tobago.layout.Measure")
@UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
- public void setBorderRight(ValueExpression borderRight) {
+ public void setBorderRight(final ValueExpression borderRight) {
this.borderRight = borderRight;
}
@@ -410,7 +410,7 @@ public abstract class GridLayoutConstrai
*/
@TagAttribute(name = "borderTop", type = "org.apache.myfaces.tobago.layout.Measure")
@UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
- public void setBorderTop(ValueExpression borderTop) {
+ public void setBorderTop(final ValueExpression borderTop) {
this.borderTop = borderTop;
}
@@ -419,7 +419,7 @@ public abstract class GridLayoutConstrai
*/
@TagAttribute(name = "borderBottom", type = "org.apache.myfaces.tobago.layout.Measure")
@UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
- public void setBorderBottom(ValueExpression borderBottom) {
+ public void setBorderBottom(final ValueExpression borderBottom) {
this.borderBottom = borderBottom;
}
@@ -428,7 +428,7 @@ public abstract class GridLayoutConstrai
*/
@TagAttribute(name = "paddingLeft", type = "org.apache.myfaces.tobago.layout.Measure")
@UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
- public void setPaddingLeft(ValueExpression paddingLeft) {
+ public void setPaddingLeft(final ValueExpression paddingLeft) {
this.paddingLeft = paddingLeft;
}
@@ -437,7 +437,7 @@ public abstract class GridLayoutConstrai
*/
@TagAttribute(name = "paddingRight", type = "org.apache.myfaces.tobago.layout.Measure")
@UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
- public void setPaddingRight(ValueExpression paddingRight) {
+ public void setPaddingRight(final ValueExpression paddingRight) {
this.paddingRight = paddingRight;
}
@@ -446,7 +446,7 @@ public abstract class GridLayoutConstrai
*/
@TagAttribute(name = "paddingTop", type = "org.apache.myfaces.tobago.layout.Measure")
@UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
- public void setPaddingTop(ValueExpression paddingTop) {
+ public void setPaddingTop(final ValueExpression paddingTop) {
this.paddingTop = paddingTop;
}
@@ -455,7 +455,7 @@ public abstract class GridLayoutConstrai
*/
@TagAttribute(name = "paddingBottom", type = "org.apache.myfaces.tobago.layout.Measure")
@UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
- public void setPaddingBottom(ValueExpression paddingBottom) {
+ public void setPaddingBottom(final ValueExpression paddingBottom) {
this.paddingBottom = paddingBottom;
}
}
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/LoadBundleTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/LoadBundleTag.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/LoadBundleTag.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/LoadBundleTag.java Fri Nov 15 17:10:58 2013
@@ -57,10 +57,10 @@ public abstract class LoadBundleTag exte
public int doStartTag() throws JspException {
- FacesContext facesContext = FacesContext.getCurrentInstance();
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
final ELContext elContext = facesContext.getELContext();
- Map toStore = new BundleMapWrapper((String) basename.getValue(elContext));
+ final Map toStore = new BundleMapWrapper((String) basename.getValue(elContext));
// (session scope is needed to support ajax requests)
facesContext.getExternalContext().getSessionMap().put(var, toStore);
@@ -78,7 +78,7 @@ public abstract class LoadBundleTag exte
* Base name of the resource bundle to be loaded.
*/
@TagAttribute(required = true, name = "basename", type = "java.lang.String")
- public void setBasename(ValueExpression basename) {
+ public void setBasename(final ValueExpression basename) {
this.basename = basename;
}
@@ -88,7 +88,7 @@ public abstract class LoadBundleTag exte
*/
@TagAttribute(required = true, name = "var")
@UIComponentTagAttribute(expression = DynamicExpression.PROHIBITED)
- public void setVar(String var){
+ public void setVar(final String var){
this.var = var;
}
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PopupReferenceTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PopupReferenceTag.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PopupReferenceTag.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PopupReferenceTag.java Fri Nov 15 17:10:58 2013
@@ -51,7 +51,7 @@ public abstract class PopupReferenceTag
public int doStartTag() throws JspException {
// Locate our parent UIComponentTag
- UIComponentClassicTagBase tag =
+ final UIComponentClassicTagBase tag =
UIComponentELTag.getParentUIComponentClassicTagBase(pageContext);
if (tag == null) {
// TODO Message resource i18n
@@ -62,7 +62,7 @@ public abstract class PopupReferenceTag
return (SKIP_BODY);
}
- UIComponent component = tag.getComponentInstance();
+ final UIComponent component = tag.getComponentInstance();
if (component == null) {
// TODO Message resource i18n
throw new JspException("Component Instance is null");
@@ -71,7 +71,7 @@ public abstract class PopupReferenceTag
// TODO Message resource i18n
throw new JspException("Component " + component.getClass().getName() + " is not instanceof ActionSource");
}
- ActionSource actionSource = (ActionSource) component;
+ final ActionSource actionSource = (ActionSource) component;
component.setValueExpression(Attributes.FOR, forValue);
@@ -88,7 +88,7 @@ public abstract class PopupReferenceTag
* The id of a Popup.
*/
@TagAttribute(required = true, name = "for", type = "java.lang.String")
- public void setFor(ValueExpression forValue) {
+ public void setFor(final ValueExpression forValue) {
this.forValue = forValue;
}