"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pmd-core/src/main/java/net/sourceforge/pmd/util/treeexport/TreeExportCli.java" between
pmd-src-6.37.0.zip and pmd-src-6.38.0.zip

About: PMD is a source code analyzer for Java, JavaScript, XML and others. It finds unused variables, empty catch blocks, unnecessary object creation, and so forth. Sources (Java).

TreeExportCli.java  (pmd-src-6.37.0):TreeExportCli.java  (pmd-src-6.38.0)
skipping to change at line 25 skipping to change at line 25
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Scanner; import java.util.Scanner;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import org.apache.commons.io.input.CloseShieldInputStream; import org.apache.commons.io.input.CloseShieldInputStream;
import org.apache.commons.lang3.StringEscapeUtils; import org.apache.commons.lang3.StringEscapeUtils;
import net.sourceforge.pmd.annotation.Experimental; import net.sourceforge.pmd.annotation.Experimental;
import net.sourceforge.pmd.lang.AbstractParser;
import net.sourceforge.pmd.lang.Language; import net.sourceforge.pmd.lang.Language;
import net.sourceforge.pmd.lang.LanguageRegistry; import net.sourceforge.pmd.lang.LanguageRegistry;
import net.sourceforge.pmd.lang.LanguageVersionHandler; import net.sourceforge.pmd.lang.LanguageVersionHandler;
import net.sourceforge.pmd.lang.Parser; import net.sourceforge.pmd.lang.Parser;
import net.sourceforge.pmd.lang.ast.Node; import net.sourceforge.pmd.lang.ast.Node;
import net.sourceforge.pmd.lang.ast.xpath.Attribute; import net.sourceforge.pmd.lang.ast.xpath.Attribute;
import net.sourceforge.pmd.properties.PropertyDescriptor; import net.sourceforge.pmd.properties.PropertyDescriptor;
import net.sourceforge.pmd.properties.PropertySource; import net.sourceforge.pmd.properties.PropertySource;
import com.beust.jcommander.DynamicParameter; import com.beust.jcommander.DynamicParameter;
skipping to change at line 173 skipping to change at line 174
System.err.println("Reading from stdin..."); System.err.println("Reading from stdin...");
source = new StringReader(readFromSystemIn()); source = new StringReader(readFromSystemIn());
} else { } else {
source = Files.newBufferedReader(new File(file).toPath(), Charset.fo rName(encoding)); source = Files.newBufferedReader(new File(file).toPath(), Charset.fo rName(encoding));
} }
// disable warnings for deprecated attributes // disable warnings for deprecated attributes
Logger.getLogger(Attribute.class.getName()).setLevel(Level.OFF); Logger.getLogger(Attribute.class.getName()).setLevel(Level.OFF);
try (Reader reader = source) { try (Reader reader = source) {
Node root = parser.parse(file, reader); Node root = AbstractParser.doParse(parser, file, reader);
languageHandler.getQualifiedNameResolutionFacade(this.getClass().get ClassLoader()).start(root); languageHandler.getQualifiedNameResolutionFacade(this.getClass().get ClassLoader()).start(root);
renderer.renderSubtree(root, System.out); renderer.renderSubtree(root, System.out);
} }
} }
private String readFromSystemIn() { private String readFromSystemIn() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
try (Scanner scanner = new Scanner(new CloseShieldInputStream(System.in) )) { try (Scanner scanner = new Scanner(new CloseShieldInputStream(System.in) )) {
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)