diff --git a/build/classes/th/part_21_Concurrence/chapter_02/_14Exception/HandlerThreadFactory$1.class b/build/classes/th/part_21_Concurrence/chapter_02/_14Exception/HandlerThreadFactory$1.class index a5a0572..e7ac392 100644 Binary files a/build/classes/th/part_21_Concurrence/chapter_02/_14Exception/HandlerThreadFactory$1.class and b/build/classes/th/part_21_Concurrence/chapter_02/_14Exception/HandlerThreadFactory$1.class differ diff --git a/src/applicationConfig.properties b/src/applicationConfig.properties new file mode 100644 index 0000000..db9c179 --- /dev/null +++ b/src/applicationConfig.properties @@ -0,0 +1,15 @@ +#使用http协议访问ftp资源路径 +#http_protocol_ip=http://192.168.1.71/ +#ueditor上传图片过滤器路径配置 +ueditor_filter_path=/car_home_cms/js/ueditor/jsp/controller.jsp + +#ftp_ip=192.168.1.71 +#ftp_port=21 +#ftp_username=gter +#ftp_password=123 + +http_protocol_ip=http://42.202.130.45/ +ftp_ip=42.202.130.45 +ftp_port=21 +ftp_username=ftp +ftp_password=ftp123 diff --git a/src/designPattern/headfirst/chapter_03Decorator/me/Beverage.java b/src/designPattern/headfirst/chapter_03Decorator/me/Beverage.java index 23a180f..5f2ab4c 100644 --- a/src/designPattern/headfirst/chapter_03Decorator/me/Beverage.java +++ b/src/designPattern/headfirst/chapter_03Decorator/me/Beverage.java @@ -14,7 +14,7 @@ public String getDescription() { return description; } - int size=1; + int size=0; public void setSize(int size) { this.size = size; } diff --git a/src/designPattern/headfirst/chapter_03Decorator/me/Mocha.java b/src/designPattern/headfirst/chapter_03Decorator/me/Mocha.java index f5c6b94..e32f668 100644 --- a/src/designPattern/headfirst/chapter_03Decorator/me/Mocha.java +++ b/src/designPattern/headfirst/chapter_03Decorator/me/Mocha.java @@ -16,7 +16,7 @@ public Mocha(Beverage beverage) { @Override public double cost() { double discount = getDiscount(); - return 1 * discount + beverage.cost() * discount; + return (1 + beverage.cost()) * discount; } @Override diff --git a/src/designPattern/headfirst/chapter_03Decorator/me/Soy.java b/src/designPattern/headfirst/chapter_03Decorator/me/Soy.java index 2a03176..13ea452 100644 --- a/src/designPattern/headfirst/chapter_03Decorator/me/Soy.java +++ b/src/designPattern/headfirst/chapter_03Decorator/me/Soy.java @@ -11,7 +11,7 @@ public Soy(Beverage beverage) { @Override public double cost() { double discount = getDiscount(); - return 1 * discount + beverage.cost() * discount; + return (1+ beverage.cost()) * discount; } @Override diff --git a/src/designPattern/headfirst/chapter_03Decorator/me/Whip.java b/src/designPattern/headfirst/chapter_03Decorator/me/Whip.java index f06fcb0..1875472 100644 --- a/src/designPattern/headfirst/chapter_03Decorator/me/Whip.java +++ b/src/designPattern/headfirst/chapter_03Decorator/me/Whip.java @@ -11,7 +11,7 @@ public Whip(Beverage beverage) { @Override public double cost() { double discount = getDiscount(); - return 1.0 * discount + beverage.cost() * discount; + return (1+ beverage.cost()) * discount; } @Override diff --git a/src/designPattern/headfirst/chapter_03Decorator/theAnswer/LowercaseInputStream.java b/src/designPattern/headfirst/chapter_03Decorator/theAnswer/LowercaseInputStream.java new file mode 100644 index 0000000..2c3ae71 --- /dev/null +++ b/src/designPattern/headfirst/chapter_03Decorator/theAnswer/LowercaseInputStream.java @@ -0,0 +1,11 @@ +package designPattern.headfirst.chapter_03Decorator.theAnswer; + +import java.io.FilterInputStream; +import java.io.InputStream; + +public class LowercaseInputStream extends FilterInputStream { + public LowercaseInputStream(InputStream in) { + super(in); + } + +} diff --git a/src/designPattern/headfirst/chapter_03Decorator/theIO/tEST.java b/src/designPattern/headfirst/chapter_03Decorator/theIO/tEST.java new file mode 100644 index 0000000..9086425 --- /dev/null +++ b/src/designPattern/headfirst/chapter_03Decorator/theIO/tEST.java @@ -0,0 +1,5 @@ +package designPattern.headfirst.chapter_03Decorator.theIO; + +public class tEST { + +}