#1624: Order of Exceptions in generated classes is non-deterministic
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JDocComment.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JDocComment.java
index 7f02732..72cd83c 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JDocComment.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JDocComment.java
@@ -10,8 +10,11 @@
package com.sun.codemodel;
+import com.sun.codemodel.util.ClassNameComparator;
+
import java.util.HashMap;
import java.util.Map;
+import java.util.TreeMap;
/**
* JavaDoc comment.
@@ -28,13 +31,13 @@
private static final long serialVersionUID = 1L;
/** list of @param tags */
- private final transient Map<String,JCommentPart> atParams = new HashMap<>();
+ private final transient Map<String,JCommentPart> atParams = new TreeMap<>();
/** list of xdoclets */
- private final transient Map<String,Map<String,String>> atXdoclets = new HashMap<>();
+ private final transient Map<String,Map<String,String>> atXdoclets = new TreeMap<>();
/** list of @throws tags */
- private final transient Map<JClass,JCommentPart> atThrows = new HashMap<>();
+ private final transient Map<JClass,JCommentPart> atThrows = new TreeMap<>(ClassNameComparator.theInstance);
/**
* The @return tag part.