Commit 74961873 by yuwei

Merge remote-tracking branch 'origin/master'

parents 0706f24a 7ecbec5b
......@@ -5,7 +5,7 @@ import cn.datax.learning.design.patterns.creational.factory.*;
public class ColorFactory extends AbstractFactory {
@Override
Color getColor(String color) {
public Color getColor(String color) {
if (color == null){
return null;
}
......@@ -20,7 +20,7 @@ public class ColorFactory extends AbstractFactory {
}
@Override
Shape getShape(String shapeType) {
public Shape getShape(String shapeType) {
return null;
}
}
......@@ -5,12 +5,12 @@ import cn.datax.learning.design.patterns.creational.factory.*;
public class ShapeFactory extends AbstractFactory {
@Override
Color getColor(String color) {
public Color getColor(String color) {
return null;
}
@Override
Shape getShape(String shapeType) {
public Shape getShape(String shapeType) {
if (shapeType == null) {
return null;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment