|
|
@@ -17,7 +17,6 @@
|
|
|
package com.jfinal.render;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
-import java.io.OutputStream;
|
|
|
import java.util.Enumeration;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
|
@@ -57,8 +56,9 @@ public class TemplateRender extends Render {
|
|
|
}
|
|
|
|
|
|
try {
|
|
|
- OutputStream os = response.getOutputStream();
|
|
|
- engine.getTemplate(view).render(data, os);
|
|
|
+
|
|
|
+ engine.getTemplate(view).render(data, response.getOutputStream());
|
|
|
+
|
|
|
} catch (RuntimeException e) { // 捕获 ByteWriter.close() 抛出的 RuntimeException
|
|
|
Throwable cause = e.getCause();
|
|
|
if (cause instanceof IOException) { // ClientAbortException、EofException 直接或间接继承自 IOException
|