Adjust checkstyle rules. Make checkstyle fail the build when violations are found. Correct all current checkstyle violations.
This commit is contained in:
		| @@ -30,6 +30,9 @@ public abstract class Target { | ||||
|   @Override | ||||
|   public abstract String toString(); | ||||
|  | ||||
|   /** | ||||
|    * Print status | ||||
|    */ | ||||
|   public void printStatus() { | ||||
|     System.out.println(String.format("%s, [size=%s] [visibility=%s]", this, getSize(), | ||||
|         getVisibility())); | ||||
|   | ||||
| @@ -15,12 +15,18 @@ public class Wizard { | ||||
|  | ||||
|   public Wizard() {} | ||||
|  | ||||
|   /** | ||||
|    * Cast spell | ||||
|    */ | ||||
|   public void castSpell(Command command, Target target) { | ||||
|     System.out.println(this + " casts " + command + " at " + target); | ||||
|     command.execute(target); | ||||
|     undoStack.offerLast(command); | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|    * Undo last spell | ||||
|    */ | ||||
|   public void undoLastSpell() { | ||||
|     if (!undoStack.isEmpty()) { | ||||
|       Command previousSpell = undoStack.pollLast(); | ||||
| @@ -30,6 +36,9 @@ public class Wizard { | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|    * Redo last spell | ||||
|    */ | ||||
|   public void redoLastSpell() { | ||||
|     if (!redoStack.isEmpty()) { | ||||
|       Command previousSpell = redoStack.pollLast(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user