You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ra...@apache.org on 2015/08/14 21:08:08 UTC

[35/50] [abbrv] qpid-proton git commit: Added the correct methods to encode the properties map.

Added the correct methods to encode the properties map.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/f9b6bcf2
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/f9b6bcf2
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/f9b6bcf2

Branch: refs/heads/rajith-codec
Commit: f9b6bcf2396acd4308b1317324a4d1ebb359d18c
Parents: 5e20485
Author: Rajith Attapattu <ra...@apache.org>
Authored: Wed May 13 12:12:45 2015 -0400
Committer: Rajith Attapattu <ra...@apache.org>
Committed: Thu Jul 9 09:15:57 2015 -0400

----------------------------------------------------------------------
 .../java/org/apache/qpid/proton/transport/Begin.java    | 12 ++++++------
 .../java/org/apache/qpid/proton/transport/Open.java     |  9 +++++----
 2 files changed, 11 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f9b6bcf2/proton-j/src/main/java/org/apache/qpid/proton/transport/Begin.java
----------------------------------------------------------------------
diff --git a/proton-j/src/main/java/org/apache/qpid/proton/transport/Begin.java b/proton-j/src/main/java/org/apache/qpid/proton/transport/Begin.java
index 469651e..5d106da 100644
--- a/proton-j/src/main/java/org/apache/qpid/proton/transport/Begin.java
+++ b/proton-j/src/main/java/org/apache/qpid/proton/transport/Begin.java
@@ -39,7 +39,7 @@ public final class Begin implements Encodable
 
     public final static Factory FACTORY = new Factory();
 
-    private int _remoteChannel;
+    private int _remoteChannel = -1;
 
     private int _nextOutgoingId;
 
@@ -53,7 +53,7 @@ public final class Begin implements Encodable
 
     private String[] _desiredCapabilities;
 
-    private Map<Object, Object> _properties;
+    private Map<String, Object> _properties;
 
     public int getRemoteChannel()
     {
@@ -125,12 +125,12 @@ public final class Begin implements Encodable
         _desiredCapabilities = desiredCapabilities;
     }
 
-    public Map<Object, Object> getProperties()
+    public Map<String, Object> getProperties()
     {
         return _properties;
     }
 
-    public void setProperties(Map<Object, Object> properties)
+    public void setProperties(Map<String, Object> properties)
     {
         _properties = properties;
     }
@@ -148,7 +148,7 @@ public final class Begin implements Encodable
         encoder.putUint(_handleMax);
         CodecHelper.encodeSymbolArray(encoder, _offeredCapabilities);
         CodecHelper.encodeSymbolArray(encoder, _desiredCapabilities);
-        CodecHelper.encodeMap(encoder, _properties);
+        CodecHelper.encodeMapWithKeyAsSymbol(encoder, _properties);
         encoder.end();
     }
 
@@ -164,7 +164,7 @@ public final class Begin implements Encodable
             {
 
             case 0:
-                begin.setProperties((Map<Object, Object>) l.get(7));
+                begin.setProperties((Map<String, Object>) l.get(7));
             case 1:
                 Object val1 = l.get(6);
                 if (val1 == null || val1.getClass().isArray())

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f9b6bcf2/proton-j/src/main/java/org/apache/qpid/proton/transport/Open.java
----------------------------------------------------------------------
diff --git a/proton-j/src/main/java/org/apache/qpid/proton/transport/Open.java b/proton-j/src/main/java/org/apache/qpid/proton/transport/Open.java
index d870dea..9f7fd6d 100644
--- a/proton-j/src/main/java/org/apache/qpid/proton/transport/Open.java
+++ b/proton-j/src/main/java/org/apache/qpid/proton/transport/Open.java
@@ -57,7 +57,7 @@ public final class Open implements Encodable
 
     private String[] _desiredCapabilities;
 
-    private Map<Object, Object> _properties;
+    private Map<String, Object> _properties;
 
     public String getContainerId()
     {
@@ -154,12 +154,12 @@ public final class Open implements Encodable
         _desiredCapabilities = desiredCapabilities;
     }
 
-    public Map<Object, Object> getProperties()
+    public Map<String, Object> getProperties()
     {
         return _properties;
     }
 
-    public void setProperties(Map<Object, Object> properties)
+    public void setProperties(Map<String, Object> properties)
     {
         _properties = properties;
     }
@@ -179,6 +179,7 @@ public final class Open implements Encodable
         CodecHelper.encodeSymbolArray(encoder, _incomingLocales);
         CodecHelper.encodeSymbolArray(encoder, _offeredCapabilities);
         CodecHelper.encodeSymbolArray(encoder, _desiredCapabilities);
+        CodecHelper.encodeMapWithKeyAsSymbol(encoder, _properties);
         encoder.end();
     }
 
@@ -194,7 +195,7 @@ public final class Open implements Encodable
             switch (10 - l.size())
             {
             case 0:
-                open.setProperties((Map<Object, Object>) l.get(9));
+                open.setProperties((Map<String, Object>) l.get(9));
             case 1:
                 Object val1 = l.get(8);
                 if (val1 == null || val1.getClass().isArray())


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org