Author: scottbw
Date: Fri Nov 11 17:12:43 2011
New Revision: 1200965

URL: http://svn.apache.org/viewvc?rev=1200965&view=rev
Log:
Refactored so all calls to processWidgetPackage() go through the same parse() 
route, so only one set of guard conditions are needed.

Modified:
    
incubator/wookie/trunk/parser/java/src/org/apache/wookie/w3c/W3CWidgetFactory.java

Modified: 
incubator/wookie/trunk/parser/java/src/org/apache/wookie/w3c/W3CWidgetFactory.java
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/parser/java/src/org/apache/wookie/w3c/W3CWidgetFactory.java?rev=1200965&r1=1200964&r2=1200965&view=diff
==============================================================================
--- 
incubator/wookie/trunk/parser/java/src/org/apache/wookie/w3c/W3CWidgetFactory.java
 (original)
+++ 
incubator/wookie/trunk/parser/java/src/org/apache/wookie/w3c/W3CWidgetFactory.java
 Fri Nov 11 17:12:43 2011
@@ -151,8 +151,7 @@ public class W3CWidgetFactory {
         * @throws BadManifestException if there is a problem with the 
config.xml manifest file in the package
         */
        public W3CWidget parse(final File zipFile) throws Exception, 
BadWidgetZipFileException, BadManifestException{
-               if (outputDirectory == null) throw new Exception("No output 
directory has been set; use setOutputDirectory(File) to set the location to 
output widget files");
-               return processWidgetPackage(zipFile, null);
+               return parse(zipFile, null);
        }
        
        /**
@@ -166,6 +165,7 @@ public class W3CWidgetFactory {
         * @throws BadManifestException if there is a problem with the 
config.xml manifest file in the package
         */
        public W3CWidget parse(final File zipFile, String defaultIdentifier) 
throws Exception, BadWidgetZipFileException, BadManifestException{
+         if (outputDirectory == null) throw new Exception("No output directory 
has been set; use setOutputDirectory(File) to set the location to output widget 
files");
                return processWidgetPackage(zipFile, defaultIdentifier);
        }
        


Reply via email to