Commit e5525e6c authored by Lukáš Marek's avatar Lukáš Marek

Fixed problem with codemerger for Thread class

Fixed problem with dump output dir
parent 4a14c7c5
......@@ -296,10 +296,10 @@ public class DiSL {
private static class InstrumentedClass {
private ClassNode classNode;
private Set<MethodNode> changedMethods;
private Set<String> changedMethods;
public InstrumentedClass(ClassNode classNode,
Set<MethodNode> changedMethods) {
Set<String> changedMethods) {
super();
this.classNode = classNode;
this.changedMethods = changedMethods;
......@@ -309,7 +309,7 @@ public class DiSL {
return classNode;
}
public Set<MethodNode> getChangedMethods() {
public Set<String> getChangedMethods() {
return changedMethods;
}
}
......@@ -326,7 +326,7 @@ public class DiSL {
boolean classChanged = false;
// track changed methods for code merging
Set<MethodNode> changedMethods = new HashSet<MethodNode>();
Set<String> changedMethods = new HashSet<String>();
// instrument all methods in a class
for (MethodNode methodNode : classNode.methods) {
......@@ -335,7 +335,7 @@ public class DiSL {
// add method to the set of changed methods
if(methodChanged) {
changedMethods.add(methodNode);
changedMethods.add(methodNode.name + methodNode.desc);
classChanged = true;
}
}
......
......@@ -25,7 +25,7 @@ public abstract class CodeMerger {
// NOTE: abstract or native methods should not be included in the
// changedMethods list
public static ClassNode mergeClasses(ClassNode originalCN,
ClassNode instrumentedCN, Set<MethodNode> changedMethods) {
ClassNode instrumentedCN, Set<String> changedMethods) {
// NOTE: that instrumentedCN can contain added fields
// - has to be returned
......@@ -52,7 +52,7 @@ public abstract class CodeMerger {
// class node
// skip unchanged methods
if(! changedMethods.contains(instrMN)) {
if(! changedMethods.contains(instrMN.name + instrMN.desc)) {
continue;
}
......
......@@ -148,7 +148,7 @@ public class Worker extends Thread {
String packageName = className.substring(0, i + 1);
// construct path to the class
String pathWithPkg = path + File.pathSeparator + packageName;
String pathWithPkg = path + File.separator + packageName;
// create directories
new File(pathWithPkg).mkdirs();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment