Adjust checkstyle rules. Make checkstyle fail the build when violations are found. Correct all current checkstyle violations.
This commit is contained in:
@ -19,6 +19,9 @@ import java.io.IOException;
|
||||
*/
|
||||
public class App {
|
||||
|
||||
/**
|
||||
* Program entry point
|
||||
*/
|
||||
public static void main(String[] args) throws IOException, ClassNotFoundException {
|
||||
// Write V1
|
||||
RainbowFish fishV1 = new RainbowFish("Zed", 10, 11, 12);
|
||||
|
@ -16,6 +16,9 @@ public class RainbowFish implements Serializable {
|
||||
private int lengthMeters;
|
||||
private int weightTons;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public RainbowFish(String name, int age, int lengthMeters, int weightTons) {
|
||||
this.name = name;
|
||||
this.age = age;
|
||||
|
@ -20,10 +20,6 @@ public class RainbowFishSerializer {
|
||||
|
||||
/**
|
||||
* Write V1 RainbowFish to file
|
||||
*
|
||||
* @param rainbowFish
|
||||
* @param filename
|
||||
* @throws IOException
|
||||
*/
|
||||
public static void writeV1(RainbowFish rainbowFish, String filename) throws IOException {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
@ -40,10 +36,6 @@ public class RainbowFishSerializer {
|
||||
|
||||
/**
|
||||
* Write V2 RainbowFish to file
|
||||
*
|
||||
* @param rainbowFish
|
||||
* @param filename
|
||||
* @throws IOException
|
||||
*/
|
||||
public static void writeV2(RainbowFishV2 rainbowFish, String filename) throws IOException {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
@ -63,11 +55,6 @@ public class RainbowFishSerializer {
|
||||
|
||||
/**
|
||||
* Read V1 RainbowFish from file
|
||||
*
|
||||
* @param filename
|
||||
* @return
|
||||
* @throws IOException
|
||||
* @throws ClassNotFoundException
|
||||
*/
|
||||
public static RainbowFish readV1(String filename) throws IOException, ClassNotFoundException {
|
||||
Map<String, String> map = null;
|
||||
|
@ -17,6 +17,9 @@ public class RainbowFishV2 extends RainbowFish {
|
||||
super(name, age, lengthMeters, weightTons);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public RainbowFishV2(String name, int age, int lengthMeters, int weightTons, boolean sleeping,
|
||||
boolean hungry, boolean angry) {
|
||||
this(name, age, lengthMeters, weightTons);
|
||||
|
Reference in New Issue
Block a user