Browse Source

jfinal 3.6

James 7 years ago
parent
commit
38574f6164
1 changed files with 4 additions and 3 deletions
  1. 4 3
      src/main/java/com/jfinal/kit/Prop.java

+ 4 - 3
src/main/java/com/jfinal/kit/Prop.java

@@ -32,9 +32,10 @@ public class Prop {
 	protected Properties properties = null;
 	
 	/**
-	 * protected 构造方法便于子类扩展
+	 * 支持 new Prop().appendIfExists(...)
 	 */
-	protected Prop() {
+	public Prop() {
+		properties = new Properties();
 	}
 	
 	/**
@@ -156,7 +157,7 @@ public class Prop {
 	}
 	
 	public Prop appendIfExists(File file, String encoding) {
-		if (file.exists()) {
+		if (file.isFile()) {
 			append(new Prop(file, encoding));
 		}
 		return this;