openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From allee8...@apache.org
Subject svn commit: r1183674 - /openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/SourceCode.java
Date Sat, 15 Oct 2011 17:25:05 GMT
Author: allee8285
Date: Sat Oct 15 17:25:04 2011
New Revision: 1183674

URL: http://svn.apache.org/viewvc?rev=1183674&view=rev
Log:
OPENJPA-2060 Fixed all three reported problems described in JIRA

Modified:
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/SourceCode.java

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/SourceCode.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/SourceCode.java?rev=1183674&r1=1183673&r2=1183674&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/SourceCode.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/SourceCode.java
Sat Oct 15 17:25:04 2011
@@ -628,7 +628,7 @@ public class SourceCode {
 		    String pkg = name.getPackageName();
 		    if (pkg.length() == 0 || pkg.equals(getPackage().name))
 		        return;
-		    out.println("import "+ name.getFullName() + SEMICOLON);
+		    out.println("import "+ name.fullName + SEMICOLON);
 		}
 		
 		public boolean equals(Object other) {
@@ -780,6 +780,11 @@ public class SourceCode {
 	    		arrayMarker = arrayMarker + "[]"; 
 	    		name = getComponentName(name);
 	    	}
+            int start = name.indexOf("<");
+            int stop = name.lastIndexOf(">");
+            if (start != -1 && stop != -1) {
+                name = name.substring(0, start) + name.substring(stop + 1); 
+            }
 	        this.fullName = name;
 	        int dot = fullName.lastIndexOf(DOT);
 	        simpleName = (dot == -1) ? fullName : fullName.substring(dot+1);
@@ -823,7 +828,7 @@ public class SourceCode {
 	     * Compares by fully-qualified name.
 	     */
 	    public int compareTo(ClassName other) {
-	        return fullName.compareTo(other.fullName);
+	        return getFullName().compareTo(other.getFullName());
 	    }
 	    
 	    public boolean isValidTypeName(String s) {



Mime
View raw message