Skip to content

Commit

Permalink
fix checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Jun 23, 2017
1 parent 2c7c72d commit a9b4b9f
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 15 deletions.
3 changes: 0 additions & 3 deletions src/main/java/spoon/compiler/Environment.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package spoon.compiler;

import org.apache.log4j.Level;
import spoon.diff.Action;
import spoon.processing.FileGenerator;
import spoon.processing.ProblemFixer;
import spoon.processing.ProcessingManager;
Expand All @@ -27,8 +26,6 @@
import spoon.reflect.declaration.CtMethod;
import spoon.reflect.factory.Factory;

import java.util.Deque;

/**
* This interface represents the environment in which Spoon is launched -
* accessible through {@link spoon.reflect.factory.Factory#getEnvironment()}. Its
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/spoon/diff/context/MapContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import java.util.Map;

public class MapContext <K, V> extends Context {
public class MapContext<K, V> extends Context {
private final Map<K, V> map;
private K key;

Expand All @@ -42,4 +42,4 @@ public K getKey() {
public Map<K, V> getMap() {
return map;
}
}
}
1 change: 0 additions & 1 deletion src/main/java/spoon/generating/CloneVisitorGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
import spoon.reflect.visitor.Query;
import spoon.reflect.visitor.filter.OverridingMethodFilter;
import spoon.reflect.visitor.filter.TypeFilter;
import spoon.support.comparator.CtLineElementComparator;
import spoon.support.visitor.clone.CloneBuilder;

public class CloneVisitorGenerator extends AbstractManualProcessor {
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/spoon/reflect/code/CtAbstractInvocation.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
import static spoon.reflect.path.CtRole.ARGUMENT;
import static spoon.reflect.path.CtRole.EXECUTABLE;

import java.util.List;

/**
* This code element defines an abstract invocation on a
* {@link spoon.reflect.declaration.CtExecutable}.
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/spoon/reflect/factory/ChangeFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void onObjectDelete(CtElement currentElement, CtRole role, CtElement oldV
}

public void onListAdd(CtElement currentElement, CtRole role, List field, CtElement newValue) {
AddAction action = new AddAction<>(new ListContext(currentElement, role,field), newValue);
AddAction action = new AddAction<>(new ListContext(currentElement, role, field), newValue);
propagateModelChange(action);
}

Expand Down Expand Up @@ -111,12 +111,12 @@ public void onListDeleteAll(CtElement currentElement, CtRole role, List field, L
}


public <K,V> void onMapAdd(CtElement currentElement, CtRole role, Map<K,V> field, K key, CtElement newValue) {
public <K,V> void onMapAdd(CtElement currentElement, CtRole role, Map<K, V> field, K key, CtElement newValue) {
AddAction action = new AddAction<>(new MapContext<>(currentElement, role, field, key), newValue);
propagateModelChange(action);
}

public <K,V> void onMapDeleteAll(CtElement currentElement, CtRole role, Map<K,V> field, Map<K,V> oldValue) {
public <K,V> void onMapDeleteAll(CtElement currentElement, CtRole role, Map<K, V> field, Map<K, V> oldValue) {
DeleteAllAction action = new DeleteAllAction(new MapContext<>(currentElement, role, field), oldValue);
propagateModelChange(action);
}
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/spoon/support/compiler/jdt/JDTTreeBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
import static spoon.support.compiler.jdt.JDTTreeBuilderQuery.getUnaryOperator;
import static spoon.support.compiler.jdt.JDTTreeBuilderQuery.isLhsAssignment;

import java.util.Collections;

import org.apache.log4j.Logger;
import org.eclipse.jdt.core.compiler.CharOperation;
import org.eclipse.jdt.internal.compiler.ASTVisitor;
Expand Down Expand Up @@ -155,7 +153,6 @@
import spoon.reflect.reference.CtArrayTypeReference;
import spoon.reflect.reference.CtTypeReference;
import spoon.reflect.reference.CtUnboundVariableReference;
import spoon.support.comparator.CtLineElementComparator;

/**
* A visitor for iterating through the parse tree.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public <T extends CtStatementList> T addStatement(CtStatement statement) {
@Override
public void removeStatement(CtStatement statement) {
if (this.statements == CtElementImpl.<CtStatement>emptyList()) {
return ;
return;
}
getFactory().Change().onListDelete(this, STATEMENT, statements, statements.indexOf(statement), statement);
statements.remove(statement);
Expand Down

0 comments on commit a9b4b9f

Please sign in to comment.