mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-04 20:15:28 -04:00
#526 Fixed unnecessary 'overenginnering' in previous commit 🤦
This commit is contained in:
parent
872523b0f0
commit
5315caf830
@ -41,8 +41,8 @@ import java.awt.*;
|
||||
public class SVGReadParam extends ImageReadParam {
|
||||
private Paint background;
|
||||
private String baseURI;
|
||||
private boolean allowExternalResources = false;
|
||||
private boolean isAllowExternalResourcesSetExplicitly = false;
|
||||
private boolean allowExternalResources =
|
||||
"true".equals(System.getProperty(SVGImageReader.ALLOW_EXTERNAL_RESOURCES_SYSTEM_PROP));
|
||||
|
||||
public SVGReadParam() {
|
||||
super();
|
||||
@ -66,16 +66,10 @@ public class SVGReadParam extends ImageReadParam {
|
||||
|
||||
public void setAllowExternalResources(boolean allow) {
|
||||
allowExternalResources = allow;
|
||||
isAllowExternalResourcesSetExplicitly = true;
|
||||
}
|
||||
|
||||
public boolean isAllowExternalResources() {
|
||||
if (isAllowExternalResourcesSetExplicitly) {
|
||||
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));
|
||||
}
|
||||
return allowExternalResources;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user