mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-04 08:13:20 +00:00
Adjust checkstyle rules. Make checkstyle fail the build when violations are found. Correct all current checkstyle violations.
This commit is contained in:
1 parent
9fbb085985
commit
cec9a99410
167 files changed
+1242
-969
No files matched your search
@@ -11,12 +11,18 @@ public class HeroFactoryImpl implements HeroFactory {
|
||||
private Warlord warlord;
|
||||
private Beast beast;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public HeroFactoryImpl(Mage mage, Warlord warlord, Beast beast) {
|
||||
this.mage = mage;
|
||||
this.warlord = warlord;
|
||||
this.beast = beast;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create mage
|
||||
*/
|
||||
public Mage createMage() {
|
||||
try {
|
||||
return mage.clone();
|
||||
@@ -25,6 +31,9 @@ public class HeroFactoryImpl implements HeroFactory {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create warlord
|
||||
*/
|
||||
public Warlord createWarlord() {
|
||||
try {
|
||||
return warlord.clone();
|
||||
@@ -33,6 +42,9 @@ public class HeroFactoryImpl implements HeroFactory {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create beast
|
||||
*/
|
||||
public Beast createBeast() {
|
||||
try {
|
||||
return beast.clone();
|
||||
|
||||
Reference in new issue
Block a user