提交 18ac610f 编写于 作者: M malenkov

8023245: Enhance Beans decoding

Reviewed-by: art, skoivu, alanb
上级 dc7bb118
...@@ -29,6 +29,7 @@ import com.sun.beans.finder.ClassFinder; ...@@ -29,6 +29,7 @@ import com.sun.beans.finder.ClassFinder;
import java.beans.ExceptionListener; import java.beans.ExceptionListener;
import java.io.IOException; import java.io.IOException;
import java.io.StringReader;
import java.lang.ref.Reference; import java.lang.ref.Reference;
import java.lang.ref.WeakReference; import java.lang.ref.WeakReference;
...@@ -245,6 +246,14 @@ public final class DocumentHandler extends DefaultHandler { ...@@ -245,6 +246,14 @@ public final class DocumentHandler extends DefaultHandler {
this.objects.add(object); this.objects.add(object);
} }
/**
* Disables any external entities.
*/
@Override
public InputSource resolveEntity(String publicId, String systemId) {
return new InputSource(new StringReader(""));
}
/** /**
* Prepares this handler to read objects from XML document. * Prepares this handler to read objects from XML document.
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册