openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From curti...@apache.org
Subject svn commit: r1337325 - /openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/SourceCode.java
Date Fri, 11 May 2012 18:41:35 GMT
Author: curtisr7
Date: Fri May 11 18:41:34 2012
New Revision: 1337325

URL: http://svn.apache.org/viewvc?rev=1337325&view=rev
Log:
OPENJPA-2187: Generate correct source for a file that is in the default package.

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=1337325&r1=1337324&r2=1337325&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
Fri May 11 18:41:34 2012
@@ -842,9 +842,10 @@ public class SourceCode {
 			name = p;
 		}
 		
-		public void write(PrintWriter out, int tab) {
-			out.println("package " + name + SEMICOLON);
-		}
+        public void write(PrintWriter out, int tab) {
+            if (name != null && !name.isEmpty())
+                out.println("package " + name + SEMICOLON);
+        }
 	}
 	
 	class Comment {



Mime
View raw message