modified: ../../core/JavaTXCompiler.java
modified: TypeUnifyTask.java NullWriter eingefuegt
This commit is contained in:
parent
9d93fa63fa
commit
6a6e6b343d
@ -39,7 +39,7 @@ import de.dhbwstuttgart.typeinference.unify.UnifyResultModel;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.FileWriter;
|
||||
//import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
import java.util.*;
|
||||
@ -287,7 +287,11 @@ public class JavaTXCompiler {
|
||||
Set<Set<UnifyPair>> results = new HashSet<>();
|
||||
UnifyResultModel urm = null;
|
||||
try {
|
||||
Writer logFile = new FileWriter(new File(System.getProperty("user.dir")+"/src/test/java/logFiles/"+"log_"+sourceFiles.keySet().iterator().next().getName()));
|
||||
Writer logFile = new Writer() {//new FileWriter(new File(System.getProperty("user.dir")+"/src/test/java/logFiles/"+"log_"+sourceFiles.keySet().iterator().next().getName()));
|
||||
public void close() {}
|
||||
public void flush() {}
|
||||
public void write(char[] cbuf, int off, int len) { }
|
||||
};
|
||||
|
||||
IFiniteClosure finiteClosure = UnifyTypeFactory.generateFC(allClasses,logFile);
|
||||
System.out.println(finiteClosure);
|
||||
@ -423,7 +427,11 @@ public class JavaTXCompiler {
|
||||
final ConstraintSet<Pair> cons = getConstraints();
|
||||
Set<Set<UnifyPair>> results = new HashSet<>();
|
||||
try {
|
||||
Writer logFile = new FileWriter(new File(System.getProperty("user.dir")+"/src/test/java/logFiles/"+"log_"+sourceFiles.keySet().iterator().next().getName()));
|
||||
Writer logFile = new Writer() {//new FileWriter(new File(System.getProperty("user.dir")+"/src/test/java/logFiles/"+"log_"+sourceFiles.keySet().iterator().next().getName()));
|
||||
public void close() {}
|
||||
public void flush() {}
|
||||
public void write(char[] cbuf, int off, int len) { }
|
||||
};
|
||||
|
||||
IFiniteClosure finiteClosure = UnifyTypeFactory.generateFC(allClasses,logFile);
|
||||
System.out.println(finiteClosure);
|
||||
|
@ -42,7 +42,7 @@ import de.dhbwstuttgart.typeinference.unify.model.OrderingUnifyPair;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.Pair;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
//import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
|
||||
@ -160,9 +160,13 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
||||
thNo = totalnoOfThread;
|
||||
writeLog("thNo2 " + thNo);
|
||||
try {
|
||||
this.logFile = new FileWriter(new File(System.getProperty("user.dir")+"/src/test/java/logFiles/"+"Thread_"+thNo));
|
||||
this.logFile = new Writer() {//FileWriter(new File(System.getProperty("user.dir")+"/src/test/java/logFiles/"+"Thread_"+thNo));
|
||||
public void close() {}
|
||||
public void flush() {}
|
||||
public void write(char[] cbuf, int off, int len) { }
|
||||
};
|
||||
}
|
||||
catch (IOException e) {
|
||||
catch (Exception e) {
|
||||
System.err.println("log-File nicht vorhanden");
|
||||
}
|
||||
rules = new RuleSet(logFile);
|
||||
|
Loading…
Reference in New Issue
Block a user