You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apex.apache.org by vr...@apache.org on 2017/01/30 16:53:28 UTC
[1/2] apex-core git commit: APEXCORE-610 Avoid multiple calls to
getBytes.
Repository: apex-core
Updated Branches:
refs/heads/master 6f0dffaf9 -> 1e9896bb4
APEXCORE-610 Avoid multiple calls to getBytes.
Project: http://git-wip-us.apache.org/repos/asf/apex-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/apex-core/commit/44bc4b7a
Tree: http://git-wip-us.apache.org/repos/asf/apex-core/tree/44bc4b7a
Diff: http://git-wip-us.apache.org/repos/asf/apex-core/diff/44bc4b7a
Branch: refs/heads/master
Commit: 44bc4b7a58298e228e749b58288e30187736ae86
Parents: 7ea7f60
Author: Tushar R. Gosavi <tu...@apache.org>
Authored: Tue Jan 17 14:08:13 2017 +0530
Committer: Tushar R. Gosavi <tu...@apache.org>
Committed: Tue Jan 17 14:08:13 2017 +0530
----------------------------------------------------------------------
.../main/java/com/datatorrent/bufferserver/packet/Tuple.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/apex-core/blob/44bc4b7a/bufferserver/src/main/java/com/datatorrent/bufferserver/packet/Tuple.java
----------------------------------------------------------------------
diff --git a/bufferserver/src/main/java/com/datatorrent/bufferserver/packet/Tuple.java b/bufferserver/src/main/java/com/datatorrent/bufferserver/packet/Tuple.java
index a75c7f1..de3cae8 100644
--- a/bufferserver/src/main/java/com/datatorrent/bufferserver/packet/Tuple.java
+++ b/bufferserver/src/main/java/com/datatorrent/bufferserver/packet/Tuple.java
@@ -95,9 +95,10 @@ public abstract class Tuple
public static int writeString(String identifier, byte[] array, int offset)
{
- offset = VarInt.write(identifier.getBytes().length, array, offset);
- System.arraycopy(identifier.getBytes(), 0, array, offset, identifier.getBytes().length);
- return offset + identifier.getBytes().length;
+ byte[] identifierBytes = identifier.getBytes();
+ offset = VarInt.write(identifierBytes.length, array, offset);
+ System.arraycopy(identifierBytes, 0, array, offset, identifierBytes.length);
+ return offset + identifierBytes.length;
}
protected int readVarInt()
[2/2] apex-core git commit: Merge branch 'APEXCORE-610' of
http://github.com/tushargosavi/apex-core into APEXCORE-610
Posted by vr...@apache.org.
Merge branch 'APEXCORE-610' of http://github.com/tushargosavi/apex-core into APEXCORE-610
Project: http://git-wip-us.apache.org/repos/asf/apex-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/apex-core/commit/1e9896bb
Tree: http://git-wip-us.apache.org/repos/asf/apex-core/tree/1e9896bb
Diff: http://git-wip-us.apache.org/repos/asf/apex-core/diff/1e9896bb
Branch: refs/heads/master
Commit: 1e9896bb4bf3d1b4e2ad3772415e5f414a95cc9d
Parents: 6f0dffa 44bc4b7
Author: Vlad Rozov <v....@datatorrent.com>
Authored: Mon Jan 30 08:50:28 2017 -0800
Committer: Vlad Rozov <v....@datatorrent.com>
Committed: Mon Jan 30 08:50:28 2017 -0800
----------------------------------------------------------------------
.../main/java/com/datatorrent/bufferserver/packet/Tuple.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------