Unit testing: confirm that Analyzer can parse some sample XML
[cfb.git] / prod / net / jaekl / cfb / analyze / Analyzer.java
index 9a8d7a64c4ea6f7a4069dfb3b396e1ddd65f382f..5e72fe0499db0b7d2f50c3b67ec09f13eb8b7da8 100644 (file)
@@ -9,6 +9,7 @@ import java.text.MessageFormat;
 import java.util.Locale;
 import java.util.Locale.Category;
 
+import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 
 import net.jaekl.cfb.CfbBundle;
@@ -44,7 +45,7 @@ public class Analyzer {
                        return null;
                }
                
-               result = parseFbOutput(fbOutput);
+               result = parseFbOutput(new InputSource(fbOutput.getAbsolutePath()));
                result.dump(pw);                        
                return result;
        }
@@ -97,7 +98,7 @@ public class Analyzer {
        
        // Parse the output.xml that resulted from a FindBugs run,
        // and store its findings into an Analysis object.
-       Analysis parseFbOutput(File fbOutput) throws XmlParseException 
+       Analysis parseFbOutput(InputSource fbOutput) throws XmlParseException 
        {
                Analysis result = new Analysis();
                try {