[jboss-svn-commits] JBL Code SVN: r21357 - labs/jbossrules/trunk/drools-templates/src/main/java/org/drools/template/model.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Aug 5 03:21:31 EDT 2008


Author: michael.neale at jboss.com
Date: 2008-08-05 03:21:31 -0400 (Tue, 05 Aug 2008)
New Revision: 21357

Modified:
   labs/jbossrules/trunk/drools-templates/src/main/java/org/drools/template/model/Package.java
Log:
JBRULES-1702 Can't believe I forgot this one

Modified: labs/jbossrules/trunk/drools-templates/src/main/java/org/drools/template/model/Package.java
===================================================================
--- labs/jbossrules/trunk/drools-templates/src/main/java/org/drools/template/model/Package.java	2008-08-05 07:18:46 UTC (rev 21356)
+++ labs/jbossrules/trunk/drools-templates/src/main/java/org/drools/template/model/Package.java	2008-08-05 07:21:31 UTC (rev 21357)
@@ -2,13 +2,13 @@
 
 /*
  * Copyright 2005 JBoss Inc
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,7 +21,7 @@
 
 /**
  * @author <a href="mailto:michael.neale at gmail.com"> Michael Neale </a>
- * 
+ *
  * This is the top of the parse tree. Represents a package of rules once it has
  * been parsed from the spreadsheet. Also is the launching point for dumping out
  * the DRL.
@@ -81,8 +81,10 @@
     }
 
     public void renderDRL(final DRLOutput out) {
-        out.writeLine( "package " + this._name.replace( ' ',
-                                                   '_' ) + ";" );
+    	if (_name != null) {
+	        out.writeLine( "package " + this._name.replace( ' ',
+	                                                   '_' ) + ";" );
+    	}
         out.writeLine( "#generated from Decision Table" );
         renderDRL( this._imports,
                    out );




More information about the jboss-svn-commits mailing list