Added lexical ordering for tags


git-svn-id: https://svn.apache.org/repos/asf/struts/maven/trunk/struts-annotations@493849 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/struts/annotations/taglib/apt/TagAnnotationProcessor.java b/src/main/java/org/apache/struts/annotations/taglib/apt/TagAnnotationProcessor.java
index e650e60..b412a01 100644
--- a/src/main/java/org/apache/struts/annotations/taglib/apt/TagAnnotationProcessor.java
+++ b/src/main/java/org/apache/struts/annotations/taglib/apt/TagAnnotationProcessor.java
@@ -28,6 +28,7 @@
 import java.io.PrintWriter;
 import java.util.Collection;
 import java.util.HashMap;
+import java.util.TreeMap;
 import java.util.Map;
 
 import javax.xml.parsers.DocumentBuilder;
@@ -65,7 +66,7 @@
     private AnnotationProcessorEnvironment environment;
     private AnnotationTypeDeclaration tagDeclaration;
     private AnnotationTypeDeclaration tagAttributeDeclaration;
-    private Map<String, Tag> tags = new HashMap<String, Tag>();
+    private Map<String, Tag> tags = new TreeMap<String, Tag>();
 
     public TagAnnotationProcessor(AnnotationProcessorEnvironment env) {
         environment = env;
@@ -90,7 +91,7 @@
             // type
             TypeDeclaration typeDeclaration = (TypeDeclaration) declaration;
             String typeName = typeDeclaration.getQualifiedName();
-            HashMap<String, Object> values = getValues(typeDeclaration,
+            Map<String, Object> values = getValues(typeDeclaration,
                     tagDeclaration);
             // create Tag and apply values found
             Tag tag = new Tag();
@@ -109,7 +110,7 @@
             MethodDeclaration methodDeclaration = (MethodDeclaration) declaration;
             String typeName = methodDeclaration.getDeclaringType()
                     .getQualifiedName();
-            HashMap<String, Object> values = getValues(methodDeclaration,
+            Map<String, Object> values = getValues(methodDeclaration,
                     tagAttributeDeclaration);
             // create Attribute and apply values found
             TagAttribute attribute = new TagAttribute();
@@ -346,9 +347,9 @@
      *            The type of the annotation
      * @return name->value map of annotation values
      */
-    private HashMap<String, Object> getValues(Declaration declaration,
+    private Map<String, Object> getValues(Declaration declaration,
             AnnotationTypeDeclaration type) {
-        HashMap<String, Object> values = new HashMap<String, Object>();
+        Map<String, Object> values = new TreeMap<String, Object>();
         Collection<AnnotationMirror> annotations = declaration
                 .getAnnotationMirrors();
         // iterate over the mirrors.