mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2026-05-01 00:00:02 -04:00
#526 Fixed unnecessary 'overenginnering' in previous commit 🤦
This commit is contained in:
+3
-9
@@ -41,8 +41,8 @@ import java.awt.*;
|
|||||||
public class SVGReadParam extends ImageReadParam {
|
public class SVGReadParam extends ImageReadParam {
|
||||||
private Paint background;
|
private Paint background;
|
||||||
private String baseURI;
|
private String baseURI;
|
||||||
private boolean allowExternalResources = false;
|
private boolean allowExternalResources =
|
||||||
private boolean isAllowExternalResourcesSetExplicitly = false;
|
"true".equals(System.getProperty(SVGImageReader.ALLOW_EXTERNAL_RESOURCES_SYSTEM_PROP));
|
||||||
|
|
||||||
public SVGReadParam() {
|
public SVGReadParam() {
|
||||||
super();
|
super();
|
||||||
@@ -66,16 +66,10 @@ public class SVGReadParam extends ImageReadParam {
|
|||||||
|
|
||||||
public void setAllowExternalResources(boolean allow) {
|
public void setAllowExternalResources(boolean allow) {
|
||||||
allowExternalResources = allow;
|
allowExternalResources = allow;
|
||||||
isAllowExternalResourcesSetExplicitly = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isAllowExternalResources() {
|
public boolean isAllowExternalResources() {
|
||||||
if (isAllowExternalResourcesSetExplicitly) {
|
return allowExternalResources;
|
||||||
return allowExternalResources;
|
|
||||||
} else {
|
|
||||||
// prefer the explicitly set value if invoked, read the system prop as a fallback if it wasn't
|
|
||||||
return "true".equals(System.getProperty(SVGImageReader.ALLOW_EXTERNAL_RESOURCES_SYSTEM_PROP));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user