diff --git a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/SourceCode.java b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/SourceCode.java index 95a1d10b8..9a6a71a44 100644 --- a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/SourceCode.java +++ b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/SourceCode.java @@ -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 {