summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2006-12-01 20:52:56 +0000
committerRafael H. Schloming <rhs@apache.org>2006-12-01 20:52:56 +0000
commit530193b0e72526f640d720319cb7a4ef1a921506 (patch)
tree2e86adde65dc07be99c0436071664a8c182f394a
parentc607a9d6993e5f496169344842473787ec76624c (diff)
downloadqpid-python-530193b0e72526f640d720319cb7a4ef1a921506.tar.gz
check for unknown types
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@481381 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/gentools/src/org/apache/qpid/gentools/JavaGenerator.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/qpid/gentools/src/org/apache/qpid/gentools/JavaGenerator.java b/qpid/gentools/src/org/apache/qpid/gentools/JavaGenerator.java
index 4c168cd036..bd83e85090 100644
--- a/qpid/gentools/src/org/apache/qpid/gentools/JavaGenerator.java
+++ b/qpid/gentools/src/org/apache/qpid/gentools/JavaGenerator.java
@@ -356,7 +356,11 @@ public class JavaGenerator extends Generator
String domainType = globalDomainMap.getDomainType(domainName, version);
if (domainType == null)
throw new AmqpTypeMappingException("Domain type \"" + domainName + "\" not found in Java typemap.");
- return typeMap.get(domainType).type;
+ DomainInfo info = typeMap.get(domainType);
+ if (info == null) {
+ throw new AmqpTypeMappingException("Unknown type: \"" + domainType + "\"");
+ }
+ return info.type;
}