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/05/15 15:23:57 UTC
[21/50] [abbrv] qpid-proton git commit: Added Properties type to the
registry.
Added Properties type to the registry.
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/0951e6a7
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/0951e6a7
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/0951e6a7
Branch: refs/heads/rajith-codec
Commit: 0951e6a7405d64629dfc612d539ca11078a9f18c
Parents: 88942da
Author: Rajith Attapattu <ra...@apache.org>
Authored: Tue May 12 10:55:38 2015 -0400
Committer: Rajith Attapattu <ra...@apache.org>
Committed: Tue May 12 10:55:38 2015 -0400
----------------------------------------------------------------------
.../apache/qpid/proton/codec2/DiscriptorRegistry.java | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0951e6a7/proton-j/src/main/java/org/apache/qpid/proton/codec2/DiscriptorRegistry.java
----------------------------------------------------------------------
diff --git a/proton-j/src/main/java/org/apache/qpid/proton/codec2/DiscriptorRegistry.java b/proton-j/src/main/java/org/apache/qpid/proton/codec2/DiscriptorRegistry.java
index 7c1f0a2..9dd4c98 100644
--- a/proton-j/src/main/java/org/apache/qpid/proton/codec2/DiscriptorRegistry.java
+++ b/proton-j/src/main/java/org/apache/qpid/proton/codec2/DiscriptorRegistry.java
@@ -34,6 +34,7 @@ import org.apache.qpid.proton.message2.Header;
import org.apache.qpid.proton.message2.LifetimePolicy;
import org.apache.qpid.proton.message2.MessageAnnotations;
import org.apache.qpid.proton.message2.Modified;
+import org.apache.qpid.proton.message2.Properties;
import org.apache.qpid.proton.message2.Received;
import org.apache.qpid.proton.message2.Rejected;
import org.apache.qpid.proton.message2.Released;
@@ -92,6 +93,8 @@ public class DiscriptorRegistry
private static void registerMessageTypes()
{
registerType(Header.DESCRIPTOR_LONG, Header.DESCRIPTOR_STRING, Header.FACTORY);
+ registerType(Properties.DESCRIPTOR_LONG, Properties.DESCRIPTOR_STRING,
+ Properties.FACTORY);
registerType(DeliveryAnnotations.DESCRIPTOR_LONG, DeliveryAnnotations.DESCRIPTOR_STRING,
DeliveryAnnotations.FACTORY);
registerType(MessageAnnotations.DESCRIPTOR_LONG, MessageAnnotations.DESCRIPTOR_STRING,
@@ -133,11 +136,11 @@ public class DiscriptorRegistry
{
if (code instanceof Long)
{
- return lookup((Long) code);
+ return lookupLongCode((Long) code);
}
else if (code instanceof String)
{
- return lookup((String) code);
+ return lookupStringCode((String) code);
}
else
{
@@ -145,12 +148,12 @@ public class DiscriptorRegistry
}
}
- static DescribedTypeFactory lookup(long code)
+ static DescribedTypeFactory lookupLongCode(long code)
{
return _typeRegByLongCode.get(code);
}
- static DescribedTypeFactory lookup(String code)
+ static DescribedTypeFactory lookupStringCode(String code)
{
return _typeRegByStrCode.get(code);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org