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
commit696ce88e716e6f3a76d6ac17fd99dc2450952784 (patch)
tree16c45fef55a9f33d1b58a417d0194ecc7af72a75
parentd7ede78eb5ed21f13443234b1931e9d5e725fd64 (diff)
downloadqpid-python-696ce88e716e6f3a76d6ac17fd99dc2450952784.tar.gz
check for unknown types
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@481381 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--gentools/src/org/apache/qpid/gentools/JavaGenerator.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/gentools/src/org/apache/qpid/gentools/JavaGenerator.java b/gentools/src/org/apache/qpid/gentools/JavaGenerator.java
index 4c168cd036..bd83e85090 100644
--- a/gentools/src/org/apache/qpid/gentools/JavaGenerator.java
+++ b/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;
}