summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}