myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hno...@apache.org
Subject [myfaces-tobago] branch master updated: fix checkstyle
Date Thu, 19 Apr 2018 10:21:35 GMT
This is an automated email from the ASF dual-hosted git repository.

hnoeth pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git


The following commit(s) were added to refs/heads/master by this push:
     new 0496bd0  fix checkstyle
0496bd0 is described below

commit 0496bd022536e0fb84093229e0d6324f8f1e7712
Author: Henning Noeth <hnoeth@apache.org>
AuthorDate: Thu Apr 19 12:21:26 2018 +0200

    fix checkstyle
---
 .../org/apache/myfaces/tobago/context/Markup.java  | 26 +++++++++++-----------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java
index 0f05db0..efd612e 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java
@@ -235,18 +235,18 @@ public final class Markup implements Serializable, Iterable<String>
{
     this.value = value != null ? filterSpecialChars(value) : null;
   }
 
-  private String[] filterSpecialChars(final String[] values) {
-    for (int i = 0; i < values.length; i++) {
-      values[i] = filterSpecialChars(values[i]);
+  private String[] filterSpecialChars(final String[] strings) {
+    for (int i = 0; i < strings.length; i++) {
+      strings[i] = filterSpecialChars(strings[i]);
     }
-    return values;
+    return strings;
   }
 
-  private String filterSpecialChars(String value) {
-    StringBuilder stringBuilder = new StringBuilder(value.length());
+  private String filterSpecialChars(String string) {
+    StringBuilder stringBuilder = new StringBuilder(string.length());
     boolean forbiddenCharFound = false;
-    for (int i = 0; i < value.length(); i++) {
-      final char c = value.charAt(i);
+    for (int i = 0; i < string.length(); i++) {
+      final char c = string.charAt(i);
       if (('0' <= c && c <= '9') || ('A' <= c && c <= 'Z') ||
('a' <= c && c <= 'z')) {
         stringBuilder.append(c);
       } else {
@@ -254,12 +254,12 @@ public final class Markup implements Serializable, Iterable<String>
{
       }
     }
     if (forbiddenCharFound) {
-      final String newValue = stringBuilder.toString();
-      LOG.warn("Only numeric and alphabetic characters are allowed for markups: '{}' converted
to '{}'.", value,
-          newValue);
-      return newValue;
+      final String newString = stringBuilder.toString();
+      LOG.warn("Only numeric and alphabetic characters are allowed for markups: '{}' converted
to '{}'.", string,
+          newString);
+      return newString;
     } else {
-      return value;
+      return string;
     }
   }
 

-- 
To stop receiving notification emails like this one, please contact
hnoeth@apache.org.

Mime
View raw message