memoizeit
Changes
pom.xml 2(+1 -1)
Details
pom.xml 2(+1 -1)
diff --git a/pom.xml b/pom.xml
index 332e50f..23a138a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -52,7 +52,7 @@
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib</classpathPrefix>
- <mainClass>br.ufrgs.inf.prosoft.approachescomparison.adapter.Main</mainClass>
+ <mainClass>br.ufrgs.inf.prosoft.memoizeit.Main</mainClass>
</manifest>
<manifestEntries>
<Class-Path>lib/</Class-Path>
diff --git a/src/main/java/br/ufrgs/inf/prosoft/memoizeit/MemoizeIt.java b/src/main/java/br/ufrgs/inf/prosoft/memoizeit/MemoizeIt.java
index 990730a..e6e3ee3 100644
--- a/src/main/java/br/ufrgs/inf/prosoft/memoizeit/MemoizeIt.java
+++ b/src/main/java/br/ufrgs/inf/prosoft/memoizeit/MemoizeIt.java
@@ -333,11 +333,11 @@ public class MemoizeIt {
// 3.4 suggest cache implementation
private void suggestImplementations() {
LOGGER.log(Level.INFO, "Suggesting caching implementation");
- for (Method method : this.methods) {
+ this.methods.forEach(method -> {
System.out.println(method.getName());
suggestImplementation(method);
System.out.println();
- }
+ });
}
public void removeChangefulMethods() {
diff --git a/src/main/java/br/ufrgs/inf/prosoft/memoizeit/Method.java b/src/main/java/br/ufrgs/inf/prosoft/memoizeit/Method.java
index 5f406b7..0a2dd53 100644
--- a/src/main/java/br/ufrgs/inf/prosoft/memoizeit/Method.java
+++ b/src/main/java/br/ufrgs/inf/prosoft/memoizeit/Method.java
@@ -24,7 +24,7 @@ import java.util.logging.Logger;
*/
public class Method {
- private static final Logger logger = Logger.getLogger(Method.class.getName());
+ private static final Logger LOGGER = Logger.getLogger(Method.class.getName());
private final String name;
private final List<Occurrence> occurrences;
@@ -79,7 +79,7 @@ public class Method {
}
protected void groupByParameter(int depth) {
- logger.log(Level.INFO, "Grouping by parameters {0} occurrences of {1}", new Object[]{this.name, this.occurrences.size()});
+ LOGGER.log(Level.INFO, "Grouping by parameters {0} occurrences of {1}", new Object[]{this.name, this.occurrences.size()});
this.groupByParameter = new HashMap<>();
this.occurrences.stream().parallel().forEach(new Consumer<Occurrence>() {
int i = 0;
@@ -140,9 +140,9 @@ public class Method {
}
protected void removeUnusedFields(Node<String> methodNode) {
- logger.log(Level.INFO, "Removing unused fields of {0} occurrences of {1}", new Object[]{this.occurrences.size(), this.name});
+ LOGGER.log(Level.INFO, "Removing unused fields of {0} occurrences of {1}", new Object[]{this.occurrences.size(), this.name});
if (methodNode == null) {
- logger.log(Level.WARNING, "methodNode null: {0}", this.name);
+ LOGGER.log(Level.WARNING, "methodNode null: {0}", this.name);
return;
}
this.occurrences.stream().parallel()