ソースを参照

构造方法添加 && content != null

James 4 年 前
コミット
b56221bd49

+ 1 - 1
src/main/java/com/jfinal/template/source/StringSource.java

@@ -51,7 +51,7 @@ public class StringSource implements ISource {
 	}
 	
 	public StringSource(StringBuilder content, boolean cache) {
-		this(content, cache ? HashKit.md5(content.toString()) : null);
+		this(content, cache && content != null ? HashKit.md5(content.toString()) : null);
 	}
 	
 	public StringSource(StringBuilder content, String cacheKey) {