Adjust checkstyle rules. Make checkstyle fail the build when violations are found. Correct all current checkstyle violations.

This commit is contained in:
Ilkka Seppala
2015-12-25 23:49:28 +02:00
parent 9fbb085985
commit cec9a99410
167 changed files with 1242 additions and 969 deletions

View File

@ -13,6 +13,9 @@ public class ImmutableStew {
data = new StewData(numPotatoes, numCarrots, numMeat, numPeppers);
}
/**
* Mix the stew
*/
public void mix() {
System.out.println(String.format(
"Mixing the immutable stew we find: %d potatoes, %d carrots, %d meat and %d peppers",

View File

@ -12,6 +12,9 @@ public class Stew {
private int numMeat;
private int numPeppers;
/**
* Constructor
*/
public Stew(int numPotatoes, int numCarrots, int numMeat, int numPeppers) {
this.numPotatoes = numPotatoes;
this.numCarrots = numCarrots;
@ -19,12 +22,18 @@ public class Stew {
this.numPeppers = numPeppers;
}
/**
* Mix the stew
*/
public void mix() {
System.out.println(String.format(
"Mixing the stew we find: %d potatoes, %d carrots, %d meat and %d peppers", numPotatoes,
numCarrots, numMeat, numPeppers));
}
/**
* Taste the stew
*/
public void taste() {
System.out.println("Tasting the stew");
if (numPotatoes > 0) {

View File

@ -12,6 +12,9 @@ public class StewData {
private int numMeat;
private int numPeppers;
/**
* Constructor
*/
public StewData(int numPotatoes, int numCarrots, int numMeat, int numPeppers) {
this.numPotatoes = numPotatoes;
this.numCarrots = numCarrots;