less printing
This commit is contained in:
parent
62729613d7
commit
1b81d2ffcd
|
@ -13,6 +13,10 @@ import org.junit.Test;
|
|||
|
||||
public class JDTJava15IRTests extends JDTJavaTest {
|
||||
|
||||
static {
|
||||
System.setProperty("wala.jdt.quiet", "true");
|
||||
}
|
||||
|
||||
public JDTJava15IRTests() {
|
||||
super(JDTJavaIRTests.PROJECT);
|
||||
}
|
||||
|
|
|
@ -46,6 +46,10 @@ import com.ibm.wala.ide.tests.util.EclipseTestUtil.ZippedProjectData;
|
|||
|
||||
public class JDTJavaIRTests extends JavaIRTests {
|
||||
|
||||
static {
|
||||
System.setProperty("wala.jdt.quiet", "true");
|
||||
}
|
||||
|
||||
public static final String PROJECT_NAME = "com.ibm.wala.cast.java.test.data";
|
||||
|
||||
public static final String PROJECT_ZIP = "test_project.zip";
|
||||
|
|
|
@ -149,16 +149,18 @@ public class JDTSourceModuleTranslator implements SourceModuleTranslator {
|
|||
e.printStackTrace();
|
||||
}
|
||||
|
||||
IProblem[] problems = ast.getProblems();
|
||||
int length = problems.length;
|
||||
if (length > 0) {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
for (int i = 0; i < length; i++) {
|
||||
buffer.append(problems[i].getMessage());
|
||||
buffer.append('\n');
|
||||
if (! System.getProperty("wala.jdt.quiet").equals("true")) {
|
||||
IProblem[] problems = ast.getProblems();
|
||||
int length = problems.length;
|
||||
if (length > 0) {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
for (int i = 0; i < length; i++) {
|
||||
buffer.append(problems[i].getMessage());
|
||||
buffer.append('\n');
|
||||
}
|
||||
if (length != 0)
|
||||
System.err.println("Unexpected problems in " + source.getElementName() + buffer.toString());
|
||||
}
|
||||
if (length != 0)
|
||||
System.err.println("Unexpected problems in " + source.getElementName() + buffer.toString());
|
||||
}
|
||||
}
|
||||
}, null);
|
||||
|
|
Loading…
Reference in New Issue