changeset 6831:995b32f013f5

8023245: Enhance Beans decoding Reviewed-by: art, skoivu, alanb
author malenkov
date Mon, 02 Sep 2013 16:56:33 +0400
parents 3d00b699d5d2
children ddd59bc77e60
files src/share/classes/com/sun/beans/decoder/DocumentHandler.java
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/beans/decoder/DocumentHandler.java	Thu Aug 22 08:54:14 2013 -0700
+++ b/src/share/classes/com/sun/beans/decoder/DocumentHandler.java	Mon Sep 02 16:56:33 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