camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gzurow...@apache.org
Subject [camel] 01/02: [Minor] Use Java-style array declaration
Date Mon, 08 Apr 2019 06:01:34 GMT
This is an automated email from the ASF dual-hosted git repository.

gzurowski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 8baace24e779de3f1e377b9fb9da9c2792bf898f
Author: Gregor Zurowski <gregor@zurowski.org>
AuthorDate: Mon Apr 8 07:56:20 2019 +0200

    [Minor] Use Java-style array declaration
---
 core/camel-util/src/main/java/org/apache/camel/util/StringHelper.java   | 2 +-
 .../src/main/java/org/apache/camel/util/UnsafeUriCharactersEncoder.java | 2 +-
 .../src/main/java/org/apache/camel/util/XmlLineNumberParser.java        | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/core/camel-util/src/main/java/org/apache/camel/util/StringHelper.java b/core/camel-util/src/main/java/org/apache/camel/util/StringHelper.java
index 7add663..ce622ac 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/StringHelper.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/StringHelper.java
@@ -343,7 +343,7 @@ public final class StringHelper {
     }
     
     public static String[] splitOnCharacter(String value, String needle, int count) {
-        String rc[] = new String[count];
+        String[] rc = new String[count];
         rc[0] = value;
         for (int i = 1; i < count; i++) {
             String v = rc[i - 1];
diff --git a/core/camel-util/src/main/java/org/apache/camel/util/UnsafeUriCharactersEncoder.java
b/core/camel-util/src/main/java/org/apache/camel/util/UnsafeUriCharactersEncoder.java
index c778e25..d5030f2 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/UnsafeUriCharactersEncoder.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/UnsafeUriCharactersEncoder.java
@@ -106,7 +106,7 @@ public final class UnsafeUriCharactersEncoder {
         }
 
         // First check whether we actually need to encode
-        char chars[] = s.toCharArray();
+        char[] chars = s.toCharArray();
         for (int i = 0;;) {
             // just deal with the ascii character
             if (chars[i] > 0 && chars[i] < 128) {
diff --git a/core/camel-util/src/main/java/org/apache/camel/util/XmlLineNumberParser.java
b/core/camel-util/src/main/java/org/apache/camel/util/XmlLineNumberParser.java
index d9da3cb..75fd14f 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/XmlLineNumberParser.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/XmlLineNumberParser.java
@@ -197,7 +197,7 @@ public final class XmlLineNumberParser {
             }
 
             @Override
-            public void characters(final char ch[], final int start, final int length) throws
SAXException {
+            public void characters(final char[] ch, final int start, final int length) throws
SAXException {
                 char[] chars = new char[length];
                 System.arraycopy(ch, start, chars, 0, length);
                 String s = new String(chars);


Mime
View raw message