8023245: Enhance Beans decoding
authormalenkov
Mon, 02 Sep 2013 11:41:21 +0400
changeset 22306 07116006f9a5
parent 22305 a3308d25c711
child 22307 8860c4df071b
8023245: Enhance Beans decoding Reviewed-by: art, skoivu, alanb
jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java
--- a/jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java	Fri Aug 30 09:38:23 2013 +0100
+++ b/jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java	Mon Sep 02 11:41:21 2013 +0400
@@ -29,6 +29,7 @@
 import java.beans.ExceptionListener;
 
 import java.io.IOException;
+import java.io.StringReader;
 
 import java.lang.ref.Reference;
 import java.lang.ref.WeakReference;
@@ -246,6 +247,14 @@
     }
 
     /**
+     * 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.
      */
     @Override