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 [13/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/...

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/validator/ClearValidatorsActionListener.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/validator/ClearValidatorsActionListener.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/validator/ClearValidatorsActionListener.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/validator/ClearValidatorsActionListener.java Fri Nov 15 17:10:58 2013
@@ -39,12 +39,12 @@ public class ClearValidatorsActionListen
     return PhaseId.APPLY_REQUEST_VALUES;
   }
 
-  public void processAction(ActionEvent actionEvent) throws AbortProcessingException {
+  public void processAction(final ActionEvent actionEvent) throws AbortProcessingException {
     if (LOG.isDebugEnabled()) {
       LOG.debug("actionEvent = '" + actionEvent + "'");
     }
-    UIComponent source = actionEvent.getComponent();
-    String clearValidatorsFieldIds
+    final UIComponent source = actionEvent.getComponent();
+    final String clearValidatorsFieldIds
         = (String) ComponentUtils.findParameter(source, "clearValidatorsFieldIds");
 
     if (LOG.isDebugEnabled()) {
@@ -53,10 +53,10 @@ public class ClearValidatorsActionListen
 
     // FIXME: finding mechanism??? JSF ???
 
-    for (StringTokenizer tokenizer
+    for (final StringTokenizer tokenizer
         = new StringTokenizer(clearValidatorsFieldIds, ",");
          tokenizer.hasMoreTokens();) {
-      String clearValidatorsFieldId = tokenizer.nextToken();
+      final String clearValidatorsFieldId = tokenizer.nextToken();
 
       UIComponent component = source.findComponent(clearValidatorsFieldId);
       if (LOG.isDebugEnabled()) {
@@ -67,7 +67,7 @@ public class ClearValidatorsActionListen
         if (LOG.isDebugEnabled()) {
           LOG.debug("Component not found locally, asking the tree.");
         }
-        FacesContext facesContext = FacesContext.getCurrentInstance();
+        final FacesContext facesContext = FacesContext.getCurrentInstance();
         component = facesContext.getViewRoot().findComponent(clearValidatorsFieldId);
       }
 

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/validator/FileItemValidator.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/validator/FileItemValidator.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/validator/FileItemValidator.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/validator/FileItemValidator.java Fri Nov 15 17:10:58 2013
@@ -51,11 +51,12 @@ public class FileItemValidator implement
   public FileItemValidator() {
   }
 
-  public void validate(FacesContext facesContext, UIComponent component, Object value) throws ValidatorException {
+  public void validate(final FacesContext facesContext, final UIComponent component, final Object value)
+      throws ValidatorException {
     if (value != null && component instanceof AbstractUIFile) {
-      FileItem file = (FileItem) value;
+      final FileItem file = (FileItem) value;
       if (maxSize != null && file.getSize() > maxSize) {
-        FacesMessage facesMessage = MessageUtils.getMessage(
+        final FacesMessage facesMessage = MessageUtils.getMessage(
             facesContext, facesContext.getViewRoot().getLocale(), FacesMessage.SEVERITY_ERROR,
             SIZE_LIMIT_MESSAGE_ID, maxSize, component.getId());
         throw new ValidatorException(facesMessage);
@@ -63,20 +64,20 @@ public class FileItemValidator implement
       // Check only a valid file
       if (file.getSize() > 0 && contentType != null && contentType.length > 0) {
         boolean found = false;
-        for (String contentTypeStr : contentType) {
+        for (final String contentTypeStr : contentType) {
           if (ContentType.valueOf(contentTypeStr).match(ContentType.valueOf(file.getContentType()))) {
             found = true;
             break;
           }
         }
         if (!found) {
-          String message;
+          final String message;
           if (contentType.length == 1) {
             message = contentType[0];
           } else {
             message = Arrays.toString(contentType);
           }
-          FacesMessage facesMessage = MessageUtils.getMessage(
+          final FacesMessage facesMessage = MessageUtils.getMessage(
               facesContext, facesContext.getViewRoot().getLocale(), FacesMessage.SEVERITY_ERROR,
               CONTENT_TYPE_MESSAGE_ID, message, component.getId());
           throw new ValidatorException(facesMessage);
@@ -89,7 +90,7 @@ public class FileItemValidator implement
     return maxSize;
   }
 
-  public void setMaxSize(int maxSize) {
+  public void setMaxSize(final int maxSize) {
     if (maxSize > 0) {
       this.maxSize = maxSize;
     }
@@ -99,19 +100,19 @@ public class FileItemValidator implement
     return contentType;
   }
 
-  public void setContentType(String[] contentType) {
+  public void setContentType(final String[] contentType) {
     this.contentType = contentType;
   }
 
-  public Object saveState(FacesContext context) {
-    Object[] values = new Object[2];
+  public Object saveState(final FacesContext context) {
+    final Object[] values = new Object[2];
     values[0] = maxSize;
     values[1] = contentType;
     return values;
   }
 
-  public void restoreState(FacesContext context, Object state) {
-    Object[] values = (Object[]) state;
+  public void restoreState(final FacesContext context, final Object state) {
+    final Object[] values = (Object[]) state;
     maxSize = (Integer) values[0];
     contentType = (String[]) values[1];
   }
@@ -120,7 +121,7 @@ public class FileItemValidator implement
     return transientValue;
   }
 
-  public void setTransient(boolean newTransientValue) {
+  public void setTransient(final boolean newTransientValue) {
     this.transientValue = newTransientValue;
   }
 }

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/validator/SubmittedValueLengthValidator.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/validator/SubmittedValueLengthValidator.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/validator/SubmittedValueLengthValidator.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/validator/SubmittedValueLengthValidator.java Fri Nov 15 17:10:58 2013
@@ -44,11 +44,11 @@ public class SubmittedValueLengthValidat
   public SubmittedValueLengthValidator() {
   }
 
-  public SubmittedValueLengthValidator(int maximum) {
+  public SubmittedValueLengthValidator(final int maximum) {
     setMaximum(maximum);
   }
 
-  public SubmittedValueLengthValidator(int maximum, int minimum) {
+  public SubmittedValueLengthValidator(final int maximum, final int minimum) {
     setMaximum(maximum);
     setMinimum(minimum);
   }
@@ -57,7 +57,7 @@ public class SubmittedValueLengthValidat
     return minimum != null ? minimum : 0;
   }
 
-  public void setMinimum(int minimum) {
+  public void setMinimum(final int minimum) {
     if (minimum > 0) {
       this.minimum = minimum;
     }
@@ -67,44 +67,45 @@ public class SubmittedValueLengthValidat
     return maximum != null ? maximum : 0;
   }
 
-  public void setMaximum(int maximum) {
+  public void setMaximum(final int maximum) {
     if (maximum > 0) {
       this.maximum = maximum;
     }
   }
 
-  public void validate(FacesContext facesContext, UIComponent uiComponent, Object value) throws ValidatorException {
+  public void validate(final FacesContext facesContext, final UIComponent uiComponent, final Object value)
+      throws ValidatorException {
     if (value != null && uiComponent instanceof EditableValueHolder) {
-      String submittedValue = ((EditableValueHolder) uiComponent).getSubmittedValue().toString();
+      final String submittedValue = ((EditableValueHolder) uiComponent).getSubmittedValue().toString();
       if (maximum != null && submittedValue.length() > maximum) {
-        Object[] args = {maximum, uiComponent.getId()};
-        FacesMessage facesMessage = MessageUtils.getMessage(facesContext,
+        final Object[] args = {maximum, uiComponent.getId()};
+        final FacesMessage facesMessage = MessageUtils.getMessage(facesContext,
             facesContext.getViewRoot().getLocale(), FacesMessage.SEVERITY_ERROR, MAXIMUM_MESSAGE_ID, args);
         throw new ValidatorException(facesMessage);
       }
       if (minimum != null && submittedValue.length() < minimum) {
-        Object[] args = {minimum, uiComponent.getId()};
-        FacesMessage facesMessage = MessageUtils.getMessage(facesContext,
+        final Object[] args = {minimum, uiComponent.getId()};
+        final FacesMessage facesMessage = MessageUtils.getMessage(facesContext,
             facesContext.getViewRoot().getLocale(), FacesMessage.SEVERITY_ERROR, MINIMUM_MESSAGE_ID, args);
         throw new ValidatorException(facesMessage);
       }
     }
   }
 
-  public Object saveState(FacesContext context) {
-    Object[] values = new Object[2];
+  public Object saveState(final FacesContext context) {
+    final Object[] values = new Object[2];
     values[0] = maximum;
     values[1] = minimum;
     return values;
   }
 
-  public void restoreState(FacesContext context, Object state) {
-    Object[] values = (Object[]) state;
+  public void restoreState(final FacesContext context, final Object state) {
+    final Object[] values = (Object[]) state;
     maximum = (Integer) values[0];
     minimum = (Integer) values[1];
   }
 
-  public boolean equals(Object o) {
+  public boolean equals(final Object o) {
     if (this == o) {
       return true;
     }
@@ -115,7 +116,7 @@ public class SubmittedValueLengthValidat
       return false;
     }
 
-    SubmittedValueLengthValidator validator = (SubmittedValueLengthValidator) o;
+    final SubmittedValueLengthValidator validator = (SubmittedValueLengthValidator) o;
 
     if (maximum != null ? !maximum.equals(validator.maximum) : validator.maximum != null) {
       return false;

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/LogoutActionListener.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/LogoutActionListener.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/LogoutActionListener.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/LogoutActionListener.java Fri Nov 15 17:10:58 2013
@@ -37,10 +37,10 @@ public class LogoutActionListener implem
 
   private static final Logger LOG = LoggerFactory.getLogger(LogoutActionListener.class);
 
-  public void processAction(ActionEvent event) throws AbortProcessingException {
-    FacesContext facesContext = FacesContext.getCurrentInstance();
-    ExternalContext externalContext = facesContext.getExternalContext();
-    Object session = externalContext.getSession(false);
+  public void processAction(final ActionEvent event) throws AbortProcessingException {
+    final FacesContext facesContext = FacesContext.getCurrentInstance();
+    final ExternalContext externalContext = facesContext.getExternalContext();
+    final Object session = externalContext.getSession(false);
     if (session != null) {
       if (session instanceof HttpSession) {
         ((HttpSession) session).invalidate();
@@ -49,10 +49,10 @@ public class LogoutActionListener implem
         ((PortletSession) session).invalidate();
       }
     }
-    String forward = externalContext.getRequestContextPath() + "/";
+    final String forward = externalContext.getRequestContextPath() + "/";
     try {
       externalContext.redirect(forward);
-    } catch (IOException e) {
+    } catch (final IOException e) {
       LOG.error("", e);
       // TODO: may do error handling
       throw new FacesException("Can't redirect to '" + forward + "'");

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/Secret.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/Secret.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/Secret.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/Secret.java Fri Nov 15 17:10:58 2013
@@ -49,7 +49,7 @@ public final class Secret implements Ser
     try {
       Base64.encodeBase64URLSafeString(new byte[0]);
       return true;
-    } catch (Error e) {
+    } catch (final Error e) {
       return false;
     }
   }
@@ -57,18 +57,18 @@ public final class Secret implements Ser
   private String secret;
 
   private Secret() {
-    byte[] bytes = new byte[SECRET_LENGTH];
+    final byte[] bytes = new byte[SECRET_LENGTH];
     RANDOM.nextBytes(bytes);
     secret = COMMONS_CODEC_AVAILABLE ? encodeBase64(bytes) : encodeHex(bytes);
   }
 
-  private String encodeBase64(byte[] bytes) {
+  private String encodeBase64(final byte[] bytes) {
     return Base64.encodeBase64URLSafeString(bytes);
   }
 
-  private String encodeHex(byte[] bytes) {
-    StringBuilder builder = new StringBuilder(SECRET_LENGTH * 2);
-    for (byte b : bytes) {
+  private String encodeHex(final byte[] bytes) {
+    final StringBuilder builder = new StringBuilder(SECRET_LENGTH * 2);
+    for (final byte b : bytes) {
       builder.append(String.format("%02x", b));
     }
     return builder.toString();
@@ -118,7 +118,7 @@ public final class Secret implements Ser
    * Create a secret attribute in the session.
    * Should usually be called in a {@link javax.servlet.http.HttpSessionListener}.
    */
-  public static void create(HttpSession session) {
+  public static void create(final HttpSession session) {
     session.setAttribute(Secret.KEY, new Secret());
   }
 }

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/SecretSessionListener.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/SecretSessionListener.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/SecretSessionListener.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/SecretSessionListener.java Fri Nov 15 17:10:58 2013
@@ -26,13 +26,13 @@ import javax.servlet.http.HttpSessionLis
 
 public class SecretSessionListener implements HttpSessionListener {
 
-  public void sessionCreated(HttpSessionEvent sessionEvent) {
+  public void sessionCreated(final HttpSessionEvent sessionEvent) {
     // a session creation may happen outside from JSF 
     if (TobagoConfig.getInstance(sessionEvent.getSession().getServletContext()).isCreateSessionSecret()) {
       Secret.create(sessionEvent.getSession());
     }
   }
 
-  public void sessionDestroyed(HttpSessionEvent se) {
+  public void sessionDestroyed(final HttpSessionEvent se) {
   }
 }

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoMultipartFormdataFilter.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoMultipartFormdataFilter.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoMultipartFormdataFilter.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoMultipartFormdataFilter.java Fri Nov 15 17:10:58 2013
@@ -73,10 +73,10 @@ public class TobagoMultipartFormdataFilt
   private String repositoryPath = System.getProperty("java.io.tmpdir");
   private long maxSize = TobagoMultipartFormdataRequest.ONE_MB;
 
-  public void init(FilterConfig filterConfig) throws ServletException {
-    String repositoryPath = filterConfig.getInitParameter("uploadRepositoryPath");
+  public void init(final FilterConfig filterConfig) throws ServletException {
+    final String repositoryPath = filterConfig.getInitParameter("uploadRepositoryPath");
     if (repositoryPath != null) {
-      File file = new File(repositoryPath);
+      final File file = new File(repositoryPath);
       if (!file.exists()) {
         LOG.error("Given repository Path for " + getClass().getName() + " " + repositoryPath + " doesn't exists");
       } else if (!file.isDirectory()) {
@@ -95,14 +95,14 @@ public class TobagoMultipartFormdataFilt
 
   }
 
-  public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
+  public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain)
       throws IOException, ServletException {
-    ServletRequest wrapper;
+    final ServletRequest wrapper;
     if (request instanceof HttpServletRequest) {
       if (request instanceof TobagoMultipartFormdataRequest) {
         wrapper = request;
       } else {
-        String contentType = request.getContentType();
+        final String contentType = request.getContentType();
         if (contentType != null
             && contentType.toLowerCase(Locale.ENGLISH).startsWith("multipart/form-data")) {
           if (LOG.isDebugEnabled()) {

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriter.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriter.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriter.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriter.java Fri Nov 15 17:10:58 2013
@@ -46,7 +46,7 @@ public abstract class TobagoResponseWrit
    * @deprecated Use {@link #startElement(String, UIComponent) startElement(name, null)} instead.
    */
   @Deprecated
-  public void startElement(String name) throws IOException {
+  public void startElement(final String name) throws IOException {
     startElement(name, null);
   }
 
@@ -87,7 +87,7 @@ public abstract class TobagoResponseWrit
   /**
    * Writes a boolean attribute. The value will not escaped.
    */
-  public void writeAttribute(String name, boolean on) throws IOException {
+  public void writeAttribute(final String name, final boolean on) throws IOException {
     if (on) {
       writeAttribute(name, name, false);
     }
@@ -96,28 +96,28 @@ public abstract class TobagoResponseWrit
   /**
    * Writes a integer attribute. The value will not escaped.
    */
-  public void writeAttribute(String name, int number) throws IOException {
+  public void writeAttribute(final String name, final int number) throws IOException {
     writeAttribute(name, Integer.toString(number), false);
   }
 
   /**
    * Writes a propery as attribute. The value will be escaped.
    */
-  public void writeAttributeFromComponent(String name, String property) throws IOException {
+  public void writeAttributeFromComponent(final String name, final String property) throws IOException {
     writeAttribute(name, null, property);
   }
 
   /**
    * Write the id attribute. The value will not escaped.
    */
-  public void writeIdAttribute(String id) throws IOException {
+  public void writeIdAttribute(final String id) throws IOException {
     writeAttribute(HtmlAttributes.ID, id, false);
   }
 
   /**
    * Write the name attribute. The value will not escaped.
    */
-  public void writeNameAttribute(String name) throws IOException {
+  public void writeNameAttribute(final String name) throws IOException {
     writeAttribute(HtmlAttributes.NAME, name, false);
   }
 
@@ -126,7 +126,7 @@ public abstract class TobagoResponseWrit
    * @deprecated since Tobago 1.5.0
    */
   @Deprecated
-  public void writeClassAttribute(String cssClass) throws IOException {
+  public void writeClassAttribute(final String cssClass) throws IOException {
     writeAttribute(HtmlAttributes.CLASS, cssClass, false);
   }
 
@@ -134,7 +134,7 @@ public abstract class TobagoResponseWrit
    * Write the class attribute. The value will not escaped.
    * @param classes The abstract representation of the css class string, normally created by the renderer.
    */
-  public void writeClassAttribute(Classes classes) throws IOException {
+  public void writeClassAttribute(final Classes classes) throws IOException {
     writeAttribute(HtmlAttributes.CLASS, classes.getStringValue(), false);
   }
 
@@ -151,7 +151,7 @@ public abstract class TobagoResponseWrit
   /**
    * Write the style attribute. The value will not escaped.
    */
-  public void writeStyleAttribute(Style style) throws IOException {
+  public void writeStyleAttribute(final Style style) throws IOException {
     if (style != null) {
       final String json = style.encodeJson();
       if (json.length() > 2) { // empty "{}" needs not to be written
@@ -166,7 +166,7 @@ public abstract class TobagoResponseWrit
    * @deprecated since 1.5.0, use writeStyleAttribute(Style) instead.
    */
   @Deprecated
-  public void writeStyleAttribute(String style) throws IOException {
+  public void writeStyleAttribute(final String style) throws IOException {
     writeAttribute(HtmlAttributes.STYLE, style, false);
   }
 
@@ -174,7 +174,7 @@ public abstract class TobagoResponseWrit
    * @deprecated Should not be used, because it conflicts with CSP.
    */
   @Deprecated
-  public void writeJavascript(String script) throws IOException {
+  public void writeJavascript(final String script) throws IOException {
     startJavascript();
     write(script);
     endJavascript();
@@ -203,14 +203,14 @@ public abstract class TobagoResponseWrit
   /**
    * Write text content. The text will be escaped.
    */
-  public void writeText(String text) throws IOException {
+  public void writeText(final String text) throws IOException {
     writeText(text, null);
   }
 
   /**
    * Writes a property as text. The text will be escaped.
    */
-  public void writeTextFromComponent(String property) throws IOException {
+  public void writeTextFromComponent(final String property) throws IOException {
     writeText(null, property);
   }
 
@@ -224,7 +224,7 @@ public abstract class TobagoResponseWrit
       characterEncoding = "UTF-8";
     }
 
-    StringBuilder builder = new StringBuilder(contentType);
+    final StringBuilder builder = new StringBuilder(contentType);
     builder.append("; charset=");
     builder.append(characterEncoding);
     return builder.toString();

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoServletContextListener.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoServletContextListener.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoServletContextListener.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoServletContextListener.java Fri Nov 15 17:10:58 2013
@@ -34,13 +34,13 @@ public class TobagoServletContextListene
 
   private static final Logger LOG = LoggerFactory.getLogger(TobagoServletContextListener.class);
 
-  public void contextInitialized(ServletContextEvent event) {
+  public void contextInitialized(final ServletContextEvent event) {
 
     if (LOG.isInfoEnabled()) {
       LOG.info("*** contextInitialized ***");
     }
 
-    ServletContext servletContext = event.getServletContext();
+    final ServletContext servletContext = event.getServletContext();
 
     if (servletContext.getAttribute(TobagoConfig.TOBAGO_CONFIG) != null) {
       LOG.warn("Tobago has been already initialized. Do nothing.");
@@ -52,7 +52,7 @@ public class TobagoServletContextListene
       final TobagoConfig tobagoConfig = TobagoConfig.getInstance(servletContext);
       LOG.info("TobagoConfig: " + tobagoConfig);
       final ContentSecurityPolicy.Mode mode = tobagoConfig.getContentSecurityPolicy().getMode();
-      StringBuilder builder = new StringBuilder();
+      final StringBuilder builder = new StringBuilder();
       builder.append("\n*************************************************************************************");
       builder.append("\nNote: CSP is ");
       builder.append(mode);
@@ -68,13 +68,13 @@ public class TobagoServletContextListene
     }
   }
 
-  public void contextDestroyed(ServletContextEvent event) {
+  public void contextDestroyed(final ServletContextEvent event) {
     if (LOG.isInfoEnabled()) {
       LOG.info("*** contextDestroyed ***\n--- snip ---------"
           + "--------------------------------------------------------------");
     }
 
-    ServletContext servletContext = event.getServletContext();
+    final ServletContext servletContext = event.getServletContext();
 
     servletContext.removeAttribute(TobagoConfig.TOBAGO_CONFIG);
 

Modified: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/ComponentTypesUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/ComponentTypesUnitTest.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/ComponentTypesUnitTest.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/ComponentTypesUnitTest.java Fri Nov 15 17:10:58 2013
@@ -30,8 +30,8 @@ public class ComponentTypesUnitTest {
   @Test
   public void testNames() throws IllegalAccessException {
 
-    for (Field field : ComponentTypes.class.getFields()) {
-      String value = (String) field.get(null);
+    for (final Field field : ComponentTypes.class.getFields()) {
+      final String value = (String) field.get(null);
       Assert.assertTrue("value='" + value + "'", value.matches("org\\.apache\\.myfaces\\.tobago\\.[A-Z][a-zA-Z]*"));
       Assert.assertEquals("org.apache.myfaces.tobago." + StringUtils.constantToCamelCase(field.getName()), value);
     }

Modified: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/MethodOverwritingOfGeneratedUIComponentsUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/MethodOverwritingOfGeneratedUIComponentsUnitTest.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/MethodOverwritingOfGeneratedUIComponentsUnitTest.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/MethodOverwritingOfGeneratedUIComponentsUnitTest.java Fri Nov 15 17:10:58 2013
@@ -62,9 +62,9 @@ public class MethodOverwritingOfGenerate
   @Test
   public void test() {
 
-    for (Class<? extends UIComponent> uiComponent : uiComponents) {
+    for (final Class<? extends UIComponent> uiComponent : uiComponents) {
       final Method[] methods = uiComponent.getMethods();
-      for (Method method : methods) {
+      for (final Method method : methods) {
 
         if (!method.getDeclaringClass().equals(uiComponent)) {
           // check only the method, that have an implementation in the generated class
@@ -82,10 +82,10 @@ public class MethodOverwritingOfGenerate
         for (Class<?> superClass = uiComponent.getSuperclass();
              superClass != null;
              superClass = superClass.getSuperclass()) {
-          Method superMethod;
+          final Method superMethod;
           try {
             superMethod = superClass.getMethod(method.getName(), method.getParameterTypes());
-          } catch (NoSuchMethodException e) {
+          } catch (final NoSuchMethodException e) {
             // only looking for super methods
             continue;
           }
@@ -114,11 +114,11 @@ public class MethodOverwritingOfGenerate
       directories.add(new File(resource.getFile()));
     }
     final ArrayList<Class<? extends UIComponent>> result = new ArrayList<Class<? extends UIComponent>>();
-    for (File directory : directories) {
+    for (final File directory : directories) {
       final File[] files = directory.listFiles();
       if (files != null) {
-        for (File file : files) {
-          String name = file.getName();
+        for (final File file : files) {
+          final String name = file.getName();
           if (!StringUtils.endsWith(name, ".class")) {
             continue;
           }
@@ -141,15 +141,15 @@ public class MethodOverwritingOfGenerate
 
     private List<String> list = new ArrayList<String>();
 
-    public void add(String method, Class<? extends UIComponent> component) {
+    public void add(final String method, final Class<? extends UIComponent> component) {
       list.add(concatenate(method, component));
     }
 
-    public boolean contains(String method, Class<? extends UIComponent> component) {
+    public boolean contains(final String method, final Class<? extends UIComponent> component) {
       return list.contains(concatenate(method, component));
     }
 
-    private String concatenate(String method, Class<? extends UIComponent> component) {
+    private String concatenate(final String method, final Class<? extends UIComponent> component) {
       return method + '@' + component.getName();
     }
 

Modified: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/RendererTypesUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/RendererTypesUnitTest.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/RendererTypesUnitTest.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/RendererTypesUnitTest.java Fri Nov 15 17:10:58 2013
@@ -30,8 +30,8 @@ public class RendererTypesUnitTest {
   @Test
   public void testNames() throws IllegalAccessException {
 
-    for (Field field : RendererTypes.class.getFields()) {
-      String value = (String) field.get(null);
+    for (final Field field : RendererTypes.class.getFields()) {
+      final String value = (String) field.get(null);
       Assert.assertTrue("value='" + value + "'", value.matches("[A-Z][a-zA-Z]*"));
       Assert.assertEquals(StringUtils.constantToCamelCase(field.getName()), value);
     }

Modified: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/SorterUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/SorterUnitTest.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/SorterUnitTest.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/SorterUnitTest.java Fri Nov 15 17:10:58 2013
@@ -31,19 +31,19 @@ public class SorterUnitTest extends Abst
 
     @Test
     public void testSorter() {
-        UISheet sheet = new UISheet();
-        UIColumn column = new UIColumn();
+        final UISheet sheet = new UISheet();
+        final UIColumn column = new UIColumn();
         sheet.getChildren().add(column);
         
-        Sorter sorter = new Sorter();
-        SortActionEvent sortActionEvent = new SortActionEvent(sheet, column);
+        final Sorter sorter = new Sorter();
+        final SortActionEvent sortActionEvent = new SortActionEvent(sheet, column);
         sorter.perform(sortActionEvent);
 
-        List list = new ArrayList();
+        final List list = new ArrayList();
         sheet.setValue(list);
         sorter.perform(sortActionEvent);
 
-        UILink link = new UILink();
+        final UILink link = new UILink();
         column.getChildren().add(link);
 
         sorter.perform(sortActionEvent);

Modified: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/UIMessagesUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/UIMessagesUnitTest.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/UIMessagesUnitTest.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/UIMessagesUnitTest.java Fri Nov 15 17:10:58 2013
@@ -33,7 +33,7 @@ public class UIMessagesUnitTest extends 
   @Before
   public void setUp() throws Exception {
     super.setUp();
-    FacesContext facesContext = getFacesContext();
+    final FacesContext facesContext = getFacesContext();
     facesContext.addMessage("id0", new FacesMessage(FacesMessage.SEVERITY_INFO, "test", "a test"));
     facesContext.addMessage("id0", new FacesMessage(FacesMessage.SEVERITY_WARN, "test", "a test"));
     facesContext.addMessage("id1", new FacesMessage(FacesMessage.SEVERITY_ERROR, "test", "a test"));
@@ -44,8 +44,8 @@ public class UIMessagesUnitTest extends 
   @Test
   public void testCreateMessageListAll() {
 
-    UIMessages component = new UIMessages();
-    List<UIMessages.Item> messages = component.createMessageList(getFacesContext());
+    final UIMessages component = new UIMessages();
+    final List<UIMessages.Item> messages = component.createMessageList(getFacesContext());
 
     Assert.assertEquals(5, messages.size());
   }
@@ -53,9 +53,9 @@ public class UIMessagesUnitTest extends 
   @Test
   public void testCreateMessageListGlobalOnly() {
 
-    UIMessages component = new UIMessages();
+    final UIMessages component = new UIMessages();
     component.setGlobalOnly(true);
-    List<UIMessages.Item> messages = component.createMessageList(getFacesContext());
+    final List<UIMessages.Item> messages = component.createMessageList(getFacesContext());
 
     Assert.assertEquals(1, messages.size());
   }
@@ -63,9 +63,9 @@ public class UIMessagesUnitTest extends 
   @Test
   public void testCreateMessageListForId0() {
 
-    UIMessages component = new UIMessages();
+    final UIMessages component = new UIMessages();
     component.setFor("id0");
-    List<UIMessages.Item> messages = component.createMessageList(getFacesContext());
+    final List<UIMessages.Item> messages = component.createMessageList(getFacesContext());
 
     Assert.assertEquals(2, messages.size());
   }
@@ -73,9 +73,9 @@ public class UIMessagesUnitTest extends 
   @Test
   public void testCreateMessageListInfoToWarn() {
 
-    UIMessages component = new UIMessages();
+    final UIMessages component = new UIMessages();
     component.setMaxSeverity(FacesMessage.SEVERITY_WARN);
-    List<UIMessages.Item> messages = component.createMessageList(getFacesContext());
+    final List<UIMessages.Item> messages = component.createMessageList(getFacesContext());
 
     Assert.assertEquals(2, messages.size());
   }
@@ -83,10 +83,10 @@ public class UIMessagesUnitTest extends 
   @Test
   public void testCreateMessageListWarnToError() {
 
-    UIMessages component = new UIMessages();
+    final UIMessages component = new UIMessages();
     component.setMinSeverity(FacesMessage.SEVERITY_WARN);
     component.setMaxSeverity(FacesMessage.SEVERITY_ERROR);
-    List<UIMessages.Item> messages = component.createMessageList(getFacesContext());
+    final List<UIMessages.Item> messages = component.createMessageList(getFacesContext());
 
     Assert.assertEquals(2, messages.size());
   }
@@ -94,9 +94,9 @@ public class UIMessagesUnitTest extends 
   @Test
   public void testCreateMessageListErrorToFatal() {
 
-    UIMessages component = new UIMessages();
+    final UIMessages component = new UIMessages();
     component.setMinSeverity(FacesMessage.SEVERITY_ERROR);
-    List<UIMessages.Item> messages = component.createMessageList(getFacesContext());
+    final List<UIMessages.Item> messages = component.createMessageList(getFacesContext());
 
     Assert.assertEquals(3, messages.size());
   }
@@ -104,7 +104,7 @@ public class UIMessagesUnitTest extends 
   @Test
   public void testCreateMessageListMaxNumber() {
 
-    UIMessages component = new UIMessages();
+    final UIMessages component = new UIMessages();
 
     component.setMaxNumber(3);
     List<UIMessages.Item> messages = component.createMessageList(getFacesContext());
@@ -118,13 +118,13 @@ public class UIMessagesUnitTest extends 
   @Test
   public void testCreateMessageListOrderBySeverity() {
 
-    UIMessages component = new UIMessages();
+    final UIMessages component = new UIMessages();
     component.setOrderBy(UIMessages.OrderBy.SEVERITY);
-    List<UIMessages.Item> messages = component.createMessageList(getFacesContext());
+    final List<UIMessages.Item> messages = component.createMessageList(getFacesContext());
 
     int mustShrink = FacesMessage.SEVERITY_FATAL.getOrdinal();
-    for (UIMessages.Item message : messages) {
-      int newValue = message.getFacesMessage().getSeverity().getOrdinal();
+    for (final UIMessages.Item message : messages) {
+      final int newValue = message.getFacesMessage().getSeverity().getOrdinal();
       Assert.assertTrue(mustShrink >= newValue);
       mustShrink = newValue;
     }

Modified: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/UISheetUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/UISheetUnitTest.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/UISheetUnitTest.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/UISheetUnitTest.java Fri Nov 15 17:10:58 2013
@@ -176,7 +176,7 @@ public class UISheetUnitTest extends Abs
     try {
       data.getRowData();
       Assert.fail();
-    } catch (IllegalArgumentException e) {
+    } catch (final IllegalArgumentException e) {
       // okay: row is unavailable
     }
   }
@@ -266,7 +266,7 @@ public class UISheetUnitTest extends Abs
     try {
       unknown.getFirstRowIndexOfLastPage();
       Assert.fail("first row index of last page");
-    } catch (IllegalArgumentException e) {
+    } catch (final IllegalArgumentException e) {
       // okay: last page can't determined
     }
 
@@ -275,7 +275,7 @@ public class UISheetUnitTest extends Abs
     try {
       unknown.getFirstRowIndexOfLastPage();
       Assert.fail("first row index of last page");
-    } catch (IllegalArgumentException e) {
+    } catch (final IllegalArgumentException e) {
       // okay: last page can't determined
     }
   }
@@ -305,7 +305,7 @@ public class UISheetUnitTest extends Abs
     try {
       unknown.getLastRowIndexOfCurrentPage();
       Assert.fail("last row index of current page");
-    } catch (IllegalArgumentException e) {
+    } catch (final IllegalArgumentException e) {
       // okay: last row index of current page can't determined
     }
 
@@ -315,7 +315,7 @@ public class UISheetUnitTest extends Abs
     try {
       unknown.getLastRowIndexOfCurrentPage();
       Assert.fail("last row index of current page");
-    } catch (IllegalArgumentException e) {
+    } catch (final IllegalArgumentException e) {
       // okay: last row index of current page can't determined
     }
 
@@ -324,7 +324,7 @@ public class UISheetUnitTest extends Abs
     try {
       unknown.getLastRowIndexOfCurrentPage();
       Assert.fail("last row index of current page");
-    } catch (IllegalArgumentException e) {
+    } catch (final IllegalArgumentException e) {
       // okay: last row index of current page can't determined
     }
   }
@@ -364,7 +364,7 @@ public class UISheetUnitTest extends Abs
     try {
       unknown.getPages();
       Assert.fail("pages");
-    } catch (IllegalArgumentException e) {
+    } catch (final IllegalArgumentException e) {
       // okay: pages can't determined
     }
   }
@@ -390,7 +390,7 @@ public class UISheetUnitTest extends Abs
 
   private static class DataModelWithUnknownRows extends ListDataModel {
 
-    public DataModelWithUnknownRows(List list) {
+    public DataModelWithUnknownRows(final List list) {
       super(list);
     }
 

Modified: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/context/MarkupUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/context/MarkupUnitTest.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/context/MarkupUnitTest.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/context/MarkupUnitTest.java Fri Nov 15 17:10:58 2013
@@ -75,17 +75,17 @@ public class MarkupUnitTest {
   public void testMarkup() {
     Assert.assertNull(Markup.valueOf((Markup) null));
     
-    Markup accent = Markup.valueOf("accent");
+    final Markup accent = Markup.valueOf("accent");
     Assert.assertSame(accent, Markup.valueOf(accent));
   }
 
   @Test
   public void testAdd() {
-    Markup a = Markup.valueOf("a");
-    Markup b = Markup.valueOf("b");
-    Markup c = Markup.valueOf("c");
-    Markup ab = Markup.valueOf("a,b");
-    Markup abc = Markup.valueOf("a,b,c");
+    final Markup a = Markup.valueOf("a");
+    final Markup b = Markup.valueOf("b");
+    final Markup c = Markup.valueOf("c");
+    final Markup ab = Markup.valueOf("a,b");
+    final Markup abc = Markup.valueOf("a,b,c");
     Assert.assertEquals(a, Markup.NULL.add(a));
     Assert.assertEquals(ab, a.add(b));
     Assert.assertEquals(abc, ab.add(c));
@@ -97,12 +97,12 @@ public class MarkupUnitTest {
 
   @Test
   public void testRemove() {
-    Markup a = Markup.valueOf("a");
-    Markup b = Markup.valueOf("b");
-    Markup c = Markup.valueOf("c");
-    Markup ab = Markup.valueOf("a,b");
-    Markup bc = Markup.valueOf("b,c");
-    Markup abc = Markup.valueOf("a,b,c");
+    final Markup a = Markup.valueOf("a");
+    final Markup b = Markup.valueOf("b");
+    final Markup c = Markup.valueOf("c");
+    final Markup ab = Markup.valueOf("a,b");
+    final Markup bc = Markup.valueOf("b,c");
+    final Markup abc = Markup.valueOf("a,b,c");
     Assert.assertEquals(Markup.NULL, Markup.NULL.remove(a));
     Assert.assertEquals(a, a.remove(b));
     Assert.assertEquals(Markup.NULL, a.remove(a));
@@ -117,8 +117,8 @@ public class MarkupUnitTest {
 
   @Test
   public void testContains() {
-    Markup a = Markup.valueOf("a");
-    Markup ab = Markup.valueOf("a,b");
+    final Markup a = Markup.valueOf("a");
+    final Markup ab = Markup.valueOf("a,b");
     Assert.assertFalse(Markup.NULL.contains("a"));
     Assert.assertTrue(a.contains("a"));
     Assert.assertFalse(a.contains("b"));

Modified: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/context/UserAgentUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/context/UserAgentUnitTest.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/context/UserAgentUnitTest.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/context/UserAgentUnitTest.java Fri Nov 15 17:10:58 2013
@@ -34,7 +34,7 @@ public class UserAgentUnitTest {
   private UserAgent agent;
   private String headerString;
 
-  public UserAgentUnitTest(String title, UserAgent agent, String headerString) {
+  public UserAgentUnitTest(final String title, final UserAgent agent, final String headerString) {
     this.agent = agent;
     this.headerString = headerString;
   }

Modified: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/convert/DurationConverterUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/convert/DurationConverterUnitTest.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/convert/DurationConverterUnitTest.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/convert/DurationConverterUnitTest.java Fri Nov 15 17:10:58 2013
@@ -59,12 +59,12 @@ public class DurationConverterUnitTest {
     parse("year", 1L, "8765:45:36");
   }
 
-  private void format(String unit, Long aLong, String string) {
-    UIIn input = new UIIn();
-    String info = "Formatting numbers:"
+  private void format(final String unit, final Long aLong, final String string) {
+    final UIIn input = new UIIn();
+    final String info = "Formatting numbers:"
         + " unit='" + unit + "'"
         + " long='" + aLong + "'";
-    String result;
+    final String result;
     if (unit != null) {
       input.getAttributes().put(Attributes.UNIT, unit);
     }
@@ -72,12 +72,12 @@ public class DurationConverterUnitTest {
     Assert.assertEquals(info, string, result);
   }
 
-  private void parse(String unit, Long aLong, String string) {
-    UIIn input = new UIIn();
-    String info = "Parsing numbers:"
+  private void parse(final String unit, final Long aLong, final String string) {
+    final UIIn input = new UIIn();
+    final String info = "Parsing numbers:"
         + " unit='" + unit + "'"
         + " string='" + string + "'";
-    Long result;
+    final Long result;
     if (unit != null) {
       input.getAttributes().put(Attributes.UNIT, unit);
     }

Modified: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/TobagoConfigMergingUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/TobagoConfigMergingUnitTest.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/TobagoConfigMergingUnitTest.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/TobagoConfigMergingUnitTest.java Fri Nov 15 17:10:58 2013
@@ -100,12 +100,12 @@ public class TobagoConfigMergingUnitTest
     Assert.assertEquals(2, config.getContentSecurityPolicy().getDirectiveList().size());
   }
 
-  private TobagoConfigImpl loadAndMerge(String... names)
+  private TobagoConfigImpl loadAndMerge(final String... names)
       throws IOException, SAXException, ParserConfigurationException, URISyntaxException {
 
     final List<TobagoConfigFragment> list = new ArrayList<TobagoConfigFragment>();
 
-    for (String name : names) {
+    for (final String name : names) {
       final URL url = getClass().getClassLoader().getResource(name);
       final TobagoConfigParser parser = new TobagoConfigParser();
       list.add(parser.parse(url));

Modified: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/TobagoConfigParserUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/TobagoConfigParserUnitTest.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/TobagoConfigParserUnitTest.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/TobagoConfigParserUnitTest.java Fri Nov 15 17:10:58 2013
@@ -46,7 +46,7 @@ public class TobagoConfigParserUnitTest 
     generalTest("tobago-config-untidy-2.0.xml");
   }
 
-  private void generalTest(String name)
+  private void generalTest(final String name)
       throws IOException, SAXException, ParserConfigurationException, URISyntaxException {
     final URL url = getClass().getClassLoader().getResource(name);
     final TobagoConfigParser parser = new TobagoConfigParser();
@@ -117,7 +117,7 @@ public class TobagoConfigParserUnitTest 
     try {
       parser.parse(url);
       Assert.fail("No SAXParseException thrown!");
-    } catch (SAXException e) {
+    } catch (final SAXException e) {
       // okay
     }
   }
@@ -137,7 +137,7 @@ public class TobagoConfigParserUnitTest 
     try {
       parser.parse(url);
       Assert.fail("No SAXParseException thrown!");
-    } catch (SAXException e) {
+    } catch (final SAXException e) {
       // okay
     }
   }
@@ -149,7 +149,7 @@ public class TobagoConfigParserUnitTest 
     try {
       parser.parse(url);
       Assert.fail("No SAXParseException thrown!");
-    } catch (SAXException e) {
+    } catch (final SAXException e) {
       // okay
     }
   }
@@ -161,7 +161,7 @@ public class TobagoConfigParserUnitTest 
     try {
       parser.parse(url);
       Assert.fail("No SAXParseException thrown!");
-    } catch (SAXException e) {
+    } catch (final SAXException e) {
       // okay
     }
   }
@@ -170,23 +170,23 @@ public class TobagoConfigParserUnitTest 
   public void testUniqueness() throws IllegalAccessException {
     final Field[] all = TobagoConfigParser.class.getFields();
     final List<Field> fields = new ArrayList<Field>();
-    for (Field field : all) {
+    for (final Field field : all) {
       if (field.getType().equals(Integer.TYPE)) {
         fields.add(field);
       }
     }
     // uniqueness
-    TobagoConfigParser dummy = new TobagoConfigParser();
-    Set<Integer> hashCodes = new HashSet<Integer>();
-    for (Field field : fields) {
+    final TobagoConfigParser dummy = new TobagoConfigParser();
+    final Set<Integer> hashCodes = new HashSet<Integer>();
+    for (final Field field : fields) {
       hashCodes.add(field.getInt(dummy));
     }
     Assert.assertEquals("All used hash codes must be unique", fields.size(), hashCodes.size());
 
     // check hash code values
-    for (Field field : fields) {
-      int hash = field.getInt(dummy);
-      String name = field.getName().toLowerCase().replace('_', '-');
+    for (final Field field : fields) {
+      final int hash = field.getInt(dummy);
+      final String name = field.getName().toLowerCase().replace('_', '-');
       Assert.assertEquals("Are the constants correct?", name.hashCode(), hash);
     }
   }

Modified: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/TobagoConfigSorterUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/TobagoConfigSorterUnitTest.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/TobagoConfigSorterUnitTest.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/TobagoConfigSorterUnitTest.java Fri Nov 15 17:10:58 2013
@@ -32,34 +32,34 @@ public class TobagoConfigSorterUnitTest 
 
     // config + names
 
-    TobagoConfigFragment a = new TobagoConfigFragment();
+    final TobagoConfigFragment a = new TobagoConfigFragment();
     a.setName("a");
 
-    TobagoConfigFragment b = new TobagoConfigFragment();
+    final TobagoConfigFragment b = new TobagoConfigFragment();
     b.setName("b");
 
-    TobagoConfigFragment c = new TobagoConfigFragment();
+    final TobagoConfigFragment c = new TobagoConfigFragment();
     c.setName("c");
 
-    TobagoConfigFragment d = new TobagoConfigFragment();
+    final TobagoConfigFragment d = new TobagoConfigFragment();
     d.setName("d");
 
-    TobagoConfigFragment e = new TobagoConfigFragment();
+    final TobagoConfigFragment e = new TobagoConfigFragment();
     e.setName("e");
 
-    TobagoConfigFragment f = new TobagoConfigFragment();
+    final TobagoConfigFragment f = new TobagoConfigFragment();
     f.setName("f");
 
-    TobagoConfigFragment m = new TobagoConfigFragment();
+    final TobagoConfigFragment m = new TobagoConfigFragment();
     m.setName("m");
 
-    TobagoConfigFragment n = new TobagoConfigFragment();
+    final TobagoConfigFragment n = new TobagoConfigFragment();
     n.setName("n");
 
     // unnamed
-    TobagoConfigFragment u1 = new TobagoConfigFragment();
-    TobagoConfigFragment u2 = new TobagoConfigFragment();
-    TobagoConfigFragment u3 = new TobagoConfigFragment();
+    final TobagoConfigFragment u1 = new TobagoConfigFragment();
+    final TobagoConfigFragment u2 = new TobagoConfigFragment();
+    final TobagoConfigFragment u3 = new TobagoConfigFragment();
 
     // before
     a.getBefore().add("b");
@@ -81,7 +81,7 @@ public class TobagoConfigSorterUnitTest 
 
     n.getAfter().add("m");
 
-    List<TobagoConfigFragment> list = new ArrayList<TobagoConfigFragment>();
+    final List<TobagoConfigFragment> list = new ArrayList<TobagoConfigFragment>();
     list.add(a);
     list.add(b);
     list.add(c);
@@ -94,7 +94,7 @@ public class TobagoConfigSorterUnitTest 
     list.add(m);
     list.add(n);
 
-    TobagoConfigSorter sorter = new TobagoConfigSorter(list);
+    final TobagoConfigSorter sorter = new TobagoConfigSorter(list);
     sorter.createRelevantPairs();
 
     Assert.assertEquals(9, sorter.getPairs().size()); // all but these with "z" and "y"
@@ -127,21 +127,21 @@ public class TobagoConfigSorterUnitTest 
 
     // config + names
 
-    TobagoConfigFragment a = new TobagoConfigFragment();
+    final TobagoConfigFragment a = new TobagoConfigFragment();
     a.setName("a");
 
-    TobagoConfigFragment b = new TobagoConfigFragment();
+    final TobagoConfigFragment b = new TobagoConfigFragment();
     b.setName("b");
 
     // before
     a.getBefore().add("b");
     b.getBefore().add("a");
 
-    List<TobagoConfigFragment> list = new ArrayList<TobagoConfigFragment>();
+    final List<TobagoConfigFragment> list = new ArrayList<TobagoConfigFragment>();
     list.add(a);
     list.add(b);
 
-    TobagoConfigSorter sorter = new TobagoConfigSorter(list);
+    final TobagoConfigSorter sorter = new TobagoConfigSorter(list);
     sorter.createRelevantPairs();
 
     Assert.assertEquals(2, sorter.getPairs().size()); // all but these with "z" and "y"
@@ -153,7 +153,7 @@ public class TobagoConfigSorterUnitTest 
       sorter.ensureAntiSymmetric();
 
       Assert.fail("Cycle was not found");
-    } catch (RuntimeException e) {
+    } catch (final RuntimeException e) {
       // must find the cycle
     }
   }
@@ -163,10 +163,10 @@ public class TobagoConfigSorterUnitTest 
 
     // config + names
 
-    TobagoConfigFragment a = new TobagoConfigFragment();
+    final TobagoConfigFragment a = new TobagoConfigFragment();
     a.setName("a");
 
-    TobagoConfigFragment b = new TobagoConfigFragment();
+    final TobagoConfigFragment b = new TobagoConfigFragment();
     b.setName("b");
 
     // before
@@ -174,11 +174,11 @@ public class TobagoConfigSorterUnitTest 
     // after
     a.getAfter().add("b");
 
-    List<TobagoConfigFragment> list = new ArrayList<TobagoConfigFragment>();
+    final List<TobagoConfigFragment> list = new ArrayList<TobagoConfigFragment>();
     list.add(a);
     list.add(b);
 
-    TobagoConfigSorter sorter = new TobagoConfigSorter(list);
+    final TobagoConfigSorter sorter = new TobagoConfigSorter(list);
     sorter.createRelevantPairs();
 
     Assert.assertEquals(2, sorter.getPairs().size()); // all but these with "z" and "y"
@@ -190,7 +190,7 @@ public class TobagoConfigSorterUnitTest 
       sorter.ensureAntiSymmetric();
 
       Assert.fail("Cycle was not found");
-    } catch (RuntimeException e) {
+    } catch (final RuntimeException e) {
       // must find the cycle
     }
   }

Modified: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/context/ResponseWriterDividerUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/context/ResponseWriterDividerUnitTest.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/context/ResponseWriterDividerUnitTest.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/context/ResponseWriterDividerUnitTest.java Fri Nov 15 17:10:58 2013
@@ -35,14 +35,14 @@ public class ResponseWriterDividerUnitTe
   @Test
   public void test() throws IOException {
 
-    StringWriter stringWriter = new StringWriter();
+    final StringWriter stringWriter = new StringWriter();
     getFacesContext().setResponseWriter(new XmlResponseWriter(stringWriter, "text/xml", "ISO-8859-1"));
 
-    DefaultMutableTreeNode root = new DefaultMutableTreeNode("Root");
-    DefaultMutableTreeNode colors = new DefaultMutableTreeNode("Colors");
-    DefaultMutableTreeNode numbers = new DefaultMutableTreeNode("Numbers");
-    DefaultMutableTreeNode integers = new DefaultMutableTreeNode("Integers");
-    DefaultMutableTreeNode doubles = new DefaultMutableTreeNode("Doubles");
+    final DefaultMutableTreeNode root = new DefaultMutableTreeNode("Root");
+    final DefaultMutableTreeNode colors = new DefaultMutableTreeNode("Colors");
+    final DefaultMutableTreeNode numbers = new DefaultMutableTreeNode("Numbers");
+    final DefaultMutableTreeNode integers = new DefaultMutableTreeNode("Integers");
+    final DefaultMutableTreeNode doubles = new DefaultMutableTreeNode("Doubles");
     root.add(colors);
     root.add(numbers);
     numbers.add(integers);
@@ -54,10 +54,10 @@ public class ResponseWriterDividerUnitTe
 
     render(getFacesContext(), root);
 
-    ResponseWriterDivider divider = ResponseWriterDivider.getInstance(getFacesContext(), "unit test");
+    final ResponseWriterDivider divider = ResponseWriterDivider.getInstance(getFacesContext(), "unit test");
     divider.writeOutAndCleanUp(getFacesContext());
 
-    String expected 
+    final String expected
         = "(Root)\n"
         + "Colors\n"
         + "Numbers\n"
@@ -78,10 +78,10 @@ public class ResponseWriterDividerUnitTe
     Assert.assertEquals(expected, stringWriter.toString());
   }
 
-  private void render(FacesContext facesContext, DefaultMutableTreeNode node) throws IOException {
-    ResponseWriterDivider divider = ResponseWriterDivider.getInstance(facesContext, "unit test");
+  private void render(final FacesContext facesContext, final DefaultMutableTreeNode node) throws IOException {
+    final ResponseWriterDivider divider = ResponseWriterDivider.getInstance(facesContext, "unit test");
 
-    String label = (String) node.getUserObject();
+    final String label = (String) node.getUserObject();
 
     // label
     if (!node.isRoot()) {
@@ -93,7 +93,7 @@ public class ResponseWriterDividerUnitTe
       divider.activateBranch(facesContext);
       facesContext.getResponseWriter().write("(" + label + ")\n");
       for (int i = 0; i < node.getChildCount(); i++) {
-        TreeNode sub = node.getChildAt(i);
+        final TreeNode sub = node.getChildAt(i);
         render(facesContext, (DefaultMutableTreeNode) sub);
       }
       facesContext.getResponseWriter().write("(/" + label + ")\n");

Modified: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/context/ThemeParserUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/context/ThemeParserUnitTest.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/context/ThemeParserUnitTest.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/context/ThemeParserUnitTest.java Fri Nov 15 17:10:58 2013
@@ -37,21 +37,21 @@ public class ThemeParserUnitTest {
 
   @Test
   public void test() throws IOException, SAXException, ParserConfigurationException, URISyntaxException {
-    TobagoConfigImpl config = new TobagoConfigImpl();
-    ThemeBuilder themeBuilder = new ThemeBuilder(config);
-    ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+    final TobagoConfigImpl config = new TobagoConfigImpl();
+    final ThemeBuilder themeBuilder = new ThemeBuilder(config);
+    final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
     Enumeration<URL> urls = classLoader.getResources("theme-config.xml");
 
-    TobagoConfigParser parser = new TobagoConfigParser();
+    final TobagoConfigParser parser = new TobagoConfigParser();
     ThemeImpl theme = null;
     if  (urls.hasMoreElements()) {
-      URL themeUrl = urls.nextElement();
+      final URL themeUrl = urls.nextElement();
       theme = parser.parse(themeUrl).getThemeDefinitions().get(0);
       Assert.assertEquals("test", theme.getName());
       Assert.assertNotNull(theme.getResources());
       Assert.assertNotNull(theme.getProductionResources());
-      ThemeResources resources = theme.getResources();
-      ThemeResources productionResources = theme.getProductionResources();
+      final ThemeResources resources = theme.getResources();
+      final ThemeResources productionResources = theme.getProductionResources();
 
       Assert.assertEquals(2, resources.getScriptList().size());
       Assert.assertEquals("script/tobago.js", resources.getScriptList().get(0).getName());
@@ -67,7 +67,7 @@ public class ThemeParserUnitTest {
 
     ThemeImpl theme2 = null;
     if (urls.hasMoreElements()) {
-      URL themeUrl = urls.nextElement();
+      final URL themeUrl = urls.nextElement();
       theme2 = parser.parse(themeUrl).getThemeDefinitions().get(0);
       Assert.assertEquals("test2", theme2.getName());
       Assert.assertNotNull(theme2.getResources());
@@ -82,7 +82,7 @@ public class ThemeParserUnitTest {
 
     ThemeImpl theme3 = null;
     if (urls.hasMoreElements()) {
-      URL themeUrl = urls.nextElement();
+      final URL themeUrl = urls.nextElement();
       theme3 = parser.parse(themeUrl).getThemeDefinitions().get(0);
       Assert.assertEquals("test3", theme3.getName());
       Assert.assertEquals(0, theme3.getResources().getScriptList().size());
@@ -96,7 +96,7 @@ public class ThemeParserUnitTest {
 
     ThemeImpl theme4 = null;
     if (urls.hasMoreElements()) {
-      URL themeUrl = urls.nextElement();
+      final URL themeUrl = urls.nextElement();
       theme4 = parser.parse(themeUrl).getThemeDefinitions().get(0);
       Assert.assertEquals("test4", theme4.getName());
       Assert.assertEquals(0, theme4.getResources().getScriptList().size());

Modified: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/layout/MathUtilsUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/layout/MathUtilsUnitTest.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/layout/MathUtilsUnitTest.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/layout/MathUtilsUnitTest.java Fri Nov 15 17:10:58 2013
@@ -26,14 +26,14 @@ public class MathUtilsUnitTest {
 
   @Test
   public void testAdjust() {
-    double[] d = {6.3, 7.9, 8.7, 9.2, 10.3, 11.6};
+    final double[] d = {6.3, 7.9, 8.7, 9.2, 10.3, 11.6};
     MathUtils.adjustRemainders(d, 0.0);
     Assert.assertArrayEquals("mixed", new double[]{6, 8, 9, 9, 10, 12}, d, MathUtils.EPSILON);
   }
 
   @Test
   public void testAdjust999() {
-    double[] d = {9.9, 9.9, 9.9, 9.9, 9.9, 9.9, 9.9, 9.9, 9.9, 9.9};
+    final double[] d = {9.9, 9.9, 9.9, 9.9, 9.9, 9.9, 9.9, 9.9, 9.9, 9.9};
     MathUtils.adjustRemainders(d, 0.0);
     Assert.assertArrayEquals(
         "9.9, ...", new double[]{9, 10, 10, 10, 10, 10, 10, 10, 10, 10}, d, MathUtils.EPSILON);
@@ -41,7 +41,7 @@ public class MathUtilsUnitTest {
 
   @Test
   public void testAdjust111() {
-    double[] d = {1.1, 1.1, 1.1, 1.1, 1.1, 1.1, 1.1, 1.1, 1.1, 1.1};
+    final double[] d = {1.1, 1.1, 1.1, 1.1, 1.1, 1.1, 1.1, 1.1, 1.1, 1.1};
     MathUtils.adjustRemainders(d, 0.0);
     Assert.assertArrayEquals(
         "1.1, ...", new double[]{1, 2, 1, 1, 1, 1, 1, 1, 1, 1}, d, MathUtils.EPSILON);
@@ -49,7 +49,7 @@ public class MathUtilsUnitTest {
 
   @Test
   public void testAdjust133() {
-    double[] d = {1, 1, 1, 1.333333333, 1.333333333, 1.333333333, 1, 1, 1};
+    final double[] d = {1, 1, 1, 1.333333333, 1.333333333, 1.333333333, 1, 1, 1};
     MathUtils.adjustRemainders(d, 0.0);
     Assert.assertArrayEquals(
         "1, ..., 1.333...", new double[]{1, 1, 1, 1, 2, 1, 1, 1, 1}, d, MathUtils.EPSILON);
@@ -57,7 +57,7 @@ public class MathUtilsUnitTest {
 
   @Test
   public void testInitialBias() {
-    double[] d = {5.5};
+    final double[] d = {5.5};
     MathUtils.adjustRemainders(d, 0.5);
     Assert.assertArrayEquals("initial bias", new double[]{5}, d, MathUtils.EPSILON);
   }

Modified: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/faces/AbstractTobagoTestBase.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/faces/AbstractTobagoTestBase.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/faces/AbstractTobagoTestBase.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/faces/AbstractTobagoTestBase.java Fri Nov 15 17:10:58 2013
@@ -70,10 +70,10 @@ public abstract class AbstractTobagoTest
 
     // Tobago specific extensions
 
-    TobagoConfigImpl tobagoConfig = new TobagoConfigImpl();
-    Theme theme = new MockTheme("default", "Default Mock Theme", Collections.<Theme>emptyList());
-    Theme one = new MockTheme("one", "Mock Theme One", Arrays.asList(theme));
-    Map<String, Theme> availableThemes = new HashMap<String, Theme>();
+    final TobagoConfigImpl tobagoConfig = new TobagoConfigImpl();
+    final Theme theme = new MockTheme("default", "Default Mock Theme", Collections.<Theme>emptyList());
+    final Theme one = new MockTheme("one", "Mock Theme One", Arrays.asList(theme));
+    final Map<String, Theme> availableThemes = new HashMap<String, Theme>();
     availableThemes.put(theme.getName(), theme);
     availableThemes.put(one.getName(), one);
     tobagoConfig.setAvailableThemes(availableThemes);
@@ -99,7 +99,7 @@ public abstract class AbstractTobagoTest
 
     try {
       ResourceManagerFactory.init(servletContext, tobagoConfig);
-    } catch (AssertionError e) {
+    } catch (final AssertionError e) {
       // ignored in the moment. TODO
       LOG.error("Todo: remove this hack", e);
     }
@@ -109,7 +109,7 @@ public abstract class AbstractTobagoTest
   public void tearDown() throws Exception {
     try {
       ResourceManagerFactory.release(servletContext);
-    } catch (AssertionError e) {
+    } catch (final AssertionError e) {
       // ignored in the moment. TODO
       LOG.error("Todo: remove this hack", e);
     }

Modified: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/faces/MockRenderersConfig.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/faces/MockRenderersConfig.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/faces/MockRenderersConfig.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/faces/MockRenderersConfig.java Fri Nov 15 17:10:58 2013
@@ -29,7 +29,7 @@ public class MockRenderersConfig impleme
   /**
    * To keep it simple, we allow every value shorter than 10 characters.
    */
-  public boolean isMarkupSupported(String rendererName, String markup) {
+  public boolean isMarkupSupported(final String rendererName, final String markup) {
     return markup.length() < 10;
   }
 

Modified: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/faces/MockTheme.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/faces/MockTheme.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/faces/MockTheme.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/faces/MockTheme.java Fri Nov 15 17:10:58 2013
@@ -38,7 +38,7 @@ public class MockTheme implements Theme 
 
   private String version;
 
-  public MockTheme(String name, String displayName, List<Theme> fallbackThemeList) {
+  public MockTheme(final String name, final String displayName, final List<Theme> fallbackThemeList) {
     this.name = name;
     this.displayName = displayName;
     this.fallbackThemeList = fallbackThemeList;
@@ -64,11 +64,11 @@ public class MockTheme implements Theme 
     return config;
   }
 
-  public String[] getScriptResources(boolean production) {
+  public String[] getScriptResources(final boolean production) {
     return new String[0];
   }
 
-  public String[] getStyleResources(boolean production) {
+  public String[] getStyleResources(final boolean production) {
     return new String[0];
   }
 
@@ -76,7 +76,7 @@ public class MockTheme implements Theme 
     return versioned;
   }
 
-  public void setVersioned(boolean versioned) {
+  public void setVersioned(final boolean versioned) {
     this.versioned = versioned;
   }
 
@@ -84,7 +84,7 @@ public class MockTheme implements Theme 
     return version;
   }
 
-  public void setVersion(String version) {
+  public void setVersion(final String version) {
     this.version = version;
   }
 }

Modified: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/servlet/MockHttpServletRequest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/servlet/MockHttpServletRequest.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/servlet/MockHttpServletRequest.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/servlet/MockHttpServletRequest.java Fri Nov 15 17:10:58 2013
@@ -49,7 +49,7 @@ public class MockHttpServletRequest impl
   public MockHttpServletRequest() {
   }
 
-  public MockHttpServletRequest(byte[] body) {
+  public MockHttpServletRequest(final byte[] body) {
     this.body = body;
   }
 
@@ -66,18 +66,18 @@ public class MockHttpServletRequest impl
     return new Cookie[0];
   }
 
-  public long getDateHeader(String s) {
+  public long getDateHeader(final String s) {
     return 0;
   }
 
-  public String getHeader(String reference) {
+  public String getHeader(final String reference) {
     if (reference.equals("Content-type")) {
       return "multipart/form-data; boundary=xxx";
     }
     return null;
   }
 
-  public Enumeration getHeaders(String s) {
+  public Enumeration getHeaders(final String s) {
     return null;
   }
 
@@ -85,7 +85,7 @@ public class MockHttpServletRequest impl
     return null;
   }
 
-  public int getIntHeader(String s) {
+  public int getIntHeader(final String s) {
     return 0;
   }
 
@@ -93,7 +93,7 @@ public class MockHttpServletRequest impl
     return method;
   }
 
-  public void setMethod(String method) {
+  public void setMethod(final String method) {
     this.method = method;
   }
 
@@ -117,7 +117,7 @@ public class MockHttpServletRequest impl
     return null;
   }
 
-  public boolean isUserInRole(String s) {
+  public boolean isUserInRole(final String s) {
     return false;
   }
 
@@ -141,7 +141,7 @@ public class MockHttpServletRequest impl
     return null;
   }
 
-  public HttpSession getSession(boolean flag) {
+  public HttpSession getSession(final boolean flag) {
     if (flag && httpSession == null) {
       httpSession = new MockHttpSession();
     }
@@ -170,7 +170,7 @@ public class MockHttpServletRequest impl
 
 // ---------------------------- interface ServletRequest
 
-  public Object getAttribute(String name) {
+  public Object getAttribute(final String name) {
     return attributes.get(name);
   }
 
@@ -182,7 +182,7 @@ public class MockHttpServletRequest impl
     return null;
   }
 
-  public void setCharacterEncoding(java.lang.String env) {
+  public void setCharacterEncoding(final java.lang.String env) {
   }
 
   public int getContentLength() {
@@ -197,8 +197,8 @@ public class MockHttpServletRequest impl
     return new MockServletInputStream(body);
   }
 
-  public String getParameter(String name) {
-    String[] values = (String[]) parameters.get(name);
+  public String getParameter(final String name) {
+    final String[] values = (String[]) parameters.get(name);
     if (values != null) {
       return (values[0]);
     } else {
@@ -238,11 +238,11 @@ public class MockHttpServletRequest impl
     return null;
   }
 
-  public void setAttribute(String name, Object o) {
+  public void setAttribute(final String name, final Object o) {
     attributes.put(name, o);
   }
 
-  public void removeAttribute(String name) {
+  public void removeAttribute(final String name) {
     attributes.remove(name);
   }
 
@@ -258,12 +258,12 @@ public class MockHttpServletRequest impl
     return false;
   }
 
-  public RequestDispatcher getRequestDispatcher(String s) {
+  public RequestDispatcher getRequestDispatcher(final String s) {
     return null;
   }
 
   /** @deprecated */
-  public String getRealPath(String s) {
+  public String getRealPath(final String s) {
     return null;
   }
 
@@ -285,23 +285,23 @@ public class MockHttpServletRequest impl
 
 // ----------------------------------------------------------- business methods
 
-  public void addParameter(String name, String[] values) {
+  public void addParameter(final String name, final String[] values) {
     parameters.put(name, values);
   }
 
 // ---------------------------------------------------------- canonical methods
 
   public String toString() {
-    StringBuilder buffer = new StringBuilder();
-    Enumeration enumeration = getParameterNames();
+    final StringBuilder buffer = new StringBuilder();
+    final Enumeration enumeration = getParameterNames();
     while (enumeration.hasMoreElements()) {
-      String key = (String) enumeration.nextElement();
-      String[] values = getParameterValues(key);
+      final String key = (String) enumeration.nextElement();
+      final String[] values = getParameterValues(key);
       buffer.append("parameter:");
       buffer.append(key);
       buffer.append("=[");
       for (int i = 0; i < values.length; i++) {
-        String value = values[i];
+        final String value = values[i];
         buffer.append(value);
         if (i < values.length - 1) {
           buffer.append(",");
@@ -316,7 +316,7 @@ public class MockHttpServletRequest impl
     return (new IteratorEnumeration(parameters.keySet().iterator()));
   }
 
-  public String[] getParameterValues(String name) {
+  public String[] getParameterValues(final String name) {
     return (String[]) parameters.get(name);
   }
 }

Modified: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/servlet/MockHttpServletResponse.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/servlet/MockHttpServletResponse.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/servlet/MockHttpServletResponse.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/servlet/MockHttpServletResponse.java Fri Nov 15 17:10:58 2013
@@ -28,37 +28,37 @@ import java.util.Locale;
 
 public class MockHttpServletResponse implements HttpServletResponse {
 
-  public void addCookie(Cookie cookie) {
+  public void addCookie(final Cookie cookie) {
   }
 
-  public void addDateHeader(String s, long l) {
+  public void addDateHeader(final String s, final long l) {
   }
 
-  public void addHeader(String s, String s1) {
+  public void addHeader(final String s, final String s1) {
   }
 
-  public void addIntHeader(String s, int i) {
+  public void addIntHeader(final String s, final int i) {
   }
 
-  public boolean containsHeader(String s) {
+  public boolean containsHeader(final String s) {
     return false;
   }
 
-  public String encodeRedirectURL(String s) {
+  public String encodeRedirectURL(final String s) {
     return null;
   }
 
   /** @deprecated */
-  public String encodeRedirectUrl(String s) {
+  public String encodeRedirectUrl(final String s) {
     return null;
   }
 
-  public String encodeURL(String s) {
+  public String encodeURL(final String s) {
     return s;
   }
 
   /** @deprecated */
-  public String encodeUrl(String s) {
+  public String encodeUrl(final String s) {
     return s;
   }
 
@@ -95,47 +95,47 @@ public class MockHttpServletResponse imp
   public void resetBuffer() {
   }
 
-  public void sendError(int i) throws IOException {
+  public void sendError(final int i) throws IOException {
   }
 
-  public void sendError(int i, String s) throws IOException {
+  public void sendError(final int i, final String s) throws IOException {
   }
 
-  public void sendRedirect(String s) throws IOException {
+  public void sendRedirect(final String s) throws IOException {
   }
 
-  public void setBufferSize(int i) {
+  public void setBufferSize(final int i) {
   }
 
-  public void setContentLength(int i) {
+  public void setContentLength(final int i) {
   }
 
-  public void setContentType(String s) {
+  public void setContentType(final String s) {
   }
 
-  public void setDateHeader(String s, long l) {
+  public void setDateHeader(final String s, final long l) {
   }
 
-  public void setHeader(String s, String s1) {
+  public void setHeader(final String s, final String s1) {
   }
 
-  public void setIntHeader(String s, int i) {
+  public void setIntHeader(final String s, final int i) {
   }
 
-  public void setLocale(Locale locale) {
+  public void setLocale(final Locale locale) {
   }
 
   /** @deprecated */
-  public void setStatus(int i) {
+  public void setStatus(final int i) {
   }
 
-  public void setStatus(int i, String s) {
+  public void setStatus(final int i, final String s) {
   }
 
   public String getContentType() {
     return null;
   }
 
-  public void setCharacterEncoding(String reference) {
+  public void setCharacterEncoding(final String reference) {
   }
 }

Modified: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/servlet/MockHttpSession.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/servlet/MockHttpSession.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/servlet/MockHttpSession.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/servlet/MockHttpSession.java Fri Nov 15 17:10:58 2013
@@ -33,7 +33,7 @@ public class MockHttpSession implements 
 
   private Map attributes = new HashMap();
 
-  public Object getAttribute(String s) {
+  public Object getAttribute(final String s) {
     return attributes.get(s);
   }
 
@@ -62,7 +62,7 @@ public class MockHttpSession implements 
     return null;
   }
 
-  public Object getValue(String s) {
+  public Object getValue(final String s) {
     return null;
   }
 
@@ -77,21 +77,21 @@ public class MockHttpSession implements 
     return false;
   }
 
-  public void putValue(String s, Object o) {
+  public void putValue(final String s, final Object o) {
   }
 
-  public void removeAttribute(String s) {
+  public void removeAttribute(final String s) {
     attributes.remove(s);
   }
 
-  public void removeValue(String s) {
+  public void removeValue(final String s) {
   }
 
-  public void setAttribute(String s, Object o) {
+  public void setAttribute(final String s, final Object o) {
     attributes.put(s, o);
   }
 
-  public void setMaxInactiveInterval(int i) {
+  public void setMaxInactiveInterval(final int i) {
   }
 
   public ServletContext getServletContext() {

Modified: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/servlet/MockJspWriter.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/servlet/MockJspWriter.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/servlet/MockJspWriter.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/servlet/MockJspWriter.java Fri Nov 15 17:10:58 2013
@@ -27,7 +27,7 @@ public class MockJspWriter extends JspWr
 
   private PrintWriter out;
 
-  public MockJspWriter(PrintWriter out) {
+  public MockJspWriter(final PrintWriter out) {
     super(100, true);
     this.out = out;
   }
@@ -36,39 +36,39 @@ public class MockJspWriter extends JspWr
     return out.checkError();
   }
 
-  public void print(boolean b) {
+  public void print(final boolean b) {
     out.print(b);
   }
 
-  public void print(char c) {
+  public void print(final char c) {
     out.print(c);
   }
 
-  public void print(int i) {
+  public void print(final int i) {
     out.print(i);
   }
 
-  public void print(long l) {
+  public void print(final long l) {
     out.print(l);
   }
 
-  public void print(float f) {
+  public void print(final float f) {
     out.print(f);
   }
 
-  public void print(double d) {
+  public void print(final double d) {
     out.print(d);
   }
 
-  public void print(char[] s) {
+  public void print(final char[] s) {
     out.print(s);
   }
 
-  public void print(String s) {
+  public void print(final String s) {
     out.print(s);
   }
 
-  public void print(Object obj) {
+  public void print(final Object obj) {
     out.print(obj);
   }
 
@@ -76,59 +76,59 @@ public class MockJspWriter extends JspWr
     out.println();
   }
 
-  public void println(boolean x) {
+  public void println(final boolean x) {
     out.println(x);
   }
 
-  public void println(char x) {
+  public void println(final char x) {
     out.println(x);
   }
 
-  public void println(int x) {
+  public void println(final int x) {
     out.println(x);
   }
 
-  public void println(long x) {
+  public void println(final long x) {
     out.println(x);
   }
 
-  public void println(float x) {
+  public void println(final float x) {
     out.println(x);
   }
 
-  public void println(double x) {
+  public void println(final double x) {
     out.println(x);
   }
 
-  public void println(char[] x) {
+  public void println(final char[] x) {
     out.println(x);
   }
 
-  public void println(String x) {
+  public void println(final String x) {
     out.println(x);
   }
 
-  public void println(Object x) {
+  public void println(final Object x) {
     out.println(x);
   }
 
-  public void write(int c) throws IOException {
+  public void write(final int c) throws IOException {
     out.write(c);
   }
 
-  public void write(char[] cbuf) throws IOException {
+  public void write(final char[] cbuf) throws IOException {
     out.write(cbuf);
   }
 
-  public void write(String str) throws IOException {
+  public void write(final String str) throws IOException {
     out.write(str);
   }
 
-  public void write(char[] cbuf, int off, int len) throws IOException {
+  public void write(final char[] cbuf, final int off, final int len) throws IOException {
     out.write(cbuf, off, len);
   }
 
-  public void write(String str, int off, int len) throws IOException {
+  public void write(final String str, final int off, final int len) throws IOException {
     out.write(str, off, len);
   }