summaryrefslogtreecommitdiff
path: root/qpid/java/broker-codegen
diff options
context:
space:
mode:
authorKeith Wall <kwall@apache.org>2014-06-05 13:50:59 +0000
committerKeith Wall <kwall@apache.org>2014-06-05 13:50:59 +0000
commit60cb3d99e3661103d20cdd7a9d599c62fe2d4b8f (patch)
treea0956894ed1bdafd275d75d6cf88f5504d1ed761 /qpid/java/broker-codegen
parent21a93f8b157a3b546782a46ddaba6e3fb4c17cdc (diff)
downloadqpid-python-60cb3d99e3661103d20cdd7a9d599c62fe2d4b8f.tar.gz
QPID-5721: [Java Broker] Improve test coverage for default attributes, and attributes whose values are computed from context variables.
Also fixed defect so that a context attributes are resolved first, so that other attribute values may be calculated from context variables set on the same object. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1600657 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker-codegen')
-rw-r--r--qpid/java/broker-codegen/src/main/java/org/apache/qpid/server/model/validation/AttributeAnnotationValidator.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/qpid/java/broker-codegen/src/main/java/org/apache/qpid/server/model/validation/AttributeAnnotationValidator.java b/qpid/java/broker-codegen/src/main/java/org/apache/qpid/server/model/validation/AttributeAnnotationValidator.java
index 1422a52449..a831e1ebd9 100644
--- a/qpid/java/broker-codegen/src/main/java/org/apache/qpid/server/model/validation/AttributeAnnotationValidator.java
+++ b/qpid/java/broker-codegen/src/main/java/org/apache/qpid/server/model/validation/AttributeAnnotationValidator.java
@@ -310,6 +310,10 @@ public class AttributeAnnotationValidator extends AbstractProcessor
if(typeUtils.isSameType(erasedType, getErasure("java.util.Map")))
{
List<? extends TypeMirror> args = ((DeclaredType) type).getTypeArguments();
+ if (args.size() != 2)
+ {
+ throw new IllegalArgumentException("Map types " + type + " must have exactly two type arguments");
+ }
return isValidType(args.get(0)) && (isValidType(args.get(1)) || typeUtils.isSameType(args.get(1), getErasure("java.lang.Object")));
}