cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject cayenne git commit: Minor cleanup of char[] and byte[] ExtendedTypes logging
Date Fri, 02 Jun 2017 07:45:35 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master 97396d454 -> 0e09f2241


Minor cleanup of char[] and byte[] ExtendedTypes logging


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/0e09f224
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/0e09f224
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/0e09f224

Branch: refs/heads/master
Commit: 0e09f224126de6e7872f01dca617e557dd80263e
Parents: 97396d4
Author: Nikita Timofeev <stariy95@gmail.com>
Authored: Fri Jun 2 10:37:55 2017 +0300
Committer: Nikita Timofeev <stariy95@gmail.com>
Committed: Fri Jun 2 10:37:55 2017 +0300

----------------------------------------------------------------------
 .../apache/cayenne/access/types/ByteArrayType.java   |  5 +----
 .../cayenne/access/types/ByteOrCharArrayFactory.java | 15 +++------------
 2 files changed, 4 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/0e09f224/cayenne-server/src/main/java/org/apache/cayenne/access/types/ByteArrayType.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/types/ByteArrayType.java
b/cayenne-server/src/main/java/org/apache/cayenne/access/types/ByteArrayType.java
index 21fc5b7..ed77148 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/types/ByteArrayType.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/types/ByteArrayType.java
@@ -45,7 +45,7 @@ public class ByteArrayType implements ExtendedType<byte[]> {
 	protected boolean usingBlobs;
 
     public static void logBytes(StringBuilder buffer, byte[] bytes) {
-        buffer.append("< ");
+        buffer.append("<");
 
         int len = bytes.length;
         boolean trimming = false;
@@ -55,9 +55,6 @@ public class ByteArrayType implements ExtendedType<byte[]> {
         }
 
         for (int i = 0; i < len; i++) {
-            if (i > 0) {
-                buffer.append(",");
-            }
             IDUtil.appendFormattedByte(buffer, bytes[i]);
         }
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/0e09f224/cayenne-server/src/main/java/org/apache/cayenne/access/types/ByteOrCharArrayFactory.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/types/ByteOrCharArrayFactory.java
b/cayenne-server/src/main/java/org/apache/cayenne/access/types/ByteOrCharArrayFactory.java
index 15ae4fb..ea28f1d 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/types/ByteOrCharArrayFactory.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/types/ByteOrCharArrayFactory.java
@@ -119,7 +119,7 @@ class ByteOrCharArrayFactory implements ExtendedTypeFactory {
             }
 
             StringBuilder buffer = new StringBuilder();
-            buffer.append("< ");
+            buffer.append("<");
 
             int len = Array.getLength(value);
             boolean trimming = false;
@@ -129,9 +129,6 @@ class ByteOrCharArrayFactory implements ExtendedTypeFactory {
             }
 
             for (int i = 0; i < len; i++) {
-                if (i > 0) {
-                    buffer.append(",");
-                }
                 buffer.append(Array.get(value, i));
             }
 
@@ -190,7 +187,7 @@ class ByteOrCharArrayFactory implements ExtendedTypeFactory {
             }
 
             StringBuilder buffer = new StringBuilder();
-            buffer.append("< ");
+            buffer.append("<");
 
             int len = Array.getLength(value);
             boolean trimming = false;
@@ -200,9 +197,6 @@ class ByteOrCharArrayFactory implements ExtendedTypeFactory {
             }
 
             for (int i = 0; i < len; i++) {
-                if (i > 0) {
-                    buffer.append(",");
-                }
                 buffer.append(Array.get(value, i));
             }
 
@@ -261,7 +255,7 @@ class ByteOrCharArrayFactory implements ExtendedTypeFactory {
             }
 
             StringBuilder buffer = new StringBuilder();
-            buffer.append("< ");
+            buffer.append("<");
 
             int len = value.length;
             boolean trimming = false;
@@ -271,9 +265,6 @@ class ByteOrCharArrayFactory implements ExtendedTypeFactory {
             }
 
             for (int i = 0; i < len; i++) {
-                if (i > 0) {
-                    buffer.append(",");
-                }
                 IDUtil.appendFormattedByte(buffer, value[i]);
             }
 


Mime
View raw message