mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2026-05-28 00:00:03 -04:00
#526 Incorporating review comments
* moved the system-property-evaluation to static-block for more reliability * updated impacted existing tests (which relied on external-resources) to leverage the new API * set the value of system-property controlling external-resource-access to true in the test JVM for the sake of existing tests using SVGImageReader APIs not backed by SVRReadParams (.getWidth/.getHeight and such)
This commit is contained in:
+3
-3
@@ -80,11 +80,11 @@ import java.util.Map;
|
||||
*/
|
||||
public class SVGImageReader extends ImageReaderBase {
|
||||
|
||||
static String ALLOW_EXTERNAL_RESOURCES_SYSTEM_PROP = "com.twelvemonkeys.imageio.plugins.svg.allowexternalresources";
|
||||
final static boolean DEFAULT_ALLOW_EXTERNAL_RESOURCES =
|
||||
"true".equalsIgnoreCase(System.getProperty("com.twelvemonkeys.imageio.plugins.svg.allowexternalresources"));
|
||||
|
||||
private Rasterizer rasterizer;
|
||||
private boolean allowExternalResources =
|
||||
"true".equalsIgnoreCase(System.getProperty(ALLOW_EXTERNAL_RESOURCES_SYSTEM_PROP));
|
||||
private boolean allowExternalResources = DEFAULT_ALLOW_EXTERNAL_RESOURCES;
|
||||
|
||||
/**
|
||||
* Creates an {@code SVGImageReader}.
|
||||
|
||||
+1
-2
@@ -41,8 +41,7 @@ import java.awt.*;
|
||||
public class SVGReadParam extends ImageReadParam {
|
||||
private Paint background;
|
||||
private String baseURI;
|
||||
private boolean allowExternalResources =
|
||||
"true".equals(System.getProperty(SVGImageReader.ALLOW_EXTERNAL_RESOURCES_SYSTEM_PROP));
|
||||
private boolean allowExternalResources = SVGImageReader.DEFAULT_ALLOW_EXTERNAL_RESOURCES;
|
||||
|
||||
public SVGReadParam() {
|
||||
super();
|
||||
|
||||
Reference in New Issue
Block a user