Skip to content

Commit dc2f46d

Browse files
committed
Make configuration properties explicit
1 parent 99d2afb commit dc2f46d

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed

gwt-safecss/src/main/java/org/gwtproject/safecss/shared/SafeStylesHostedModeUtils.java

+4
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ public class SafeStylesHostedModeUtils {
3131

3232
private static boolean forceCheck;
3333

34+
static {
35+
setForceCheckValidStyleFromProperty();
36+
}
37+
3438
/**
3539
* Checks if the provided string is a valid style property name.
3640
*

gwt-safecss/src/main/module.gwt.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
<inherits name="org.gwtproject.safehtml.SafeHtml"/>
2323

2424
<define-configuration-property name="org.gwtproject.safecss.ForceCheckValidStyles" is-multi-valued="false"/>
25-
25+
<set-configuration-property name="org.gwtproject.safecss.ForceCheckValidStyles" value="false"/>
2626
<source path="shared"/>
2727
</module>

gwt-safehtml/src/main/java/org/gwtproject/safehtml/shared/SafeHtmlHostedModeUtils.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ private static void checkArgument(boolean completeHtml, String message) {
174174
@GwtIncompatible
175175
@Override
176176
public boolean getForceCheckCompleteHtmlFromProperty() {
177-
return System.getProperty(FORCE_CHECK_COMPLETE_HTML) != null;
177+
return "true".equals(System.getProperty(FORCE_CHECK_COMPLETE_HTML));
178178
}
179179
}
180180
}

gwt-safehtml/src/main/java/org/gwtproject/safehtml/shared/SafeUriHostedModeUtils.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public static void setForceCheckValidUri(boolean check) {
134134
//
135135
// @VisibleForTesting
136136
public static void setForceCheckValidUriFromProperty() {
137-
forceCheckValidUri = impl.getForceCheckValieUriFromProperty();
137+
forceCheckValidUri = impl.getForceCheckValidUriFromProperty();
138138
}
139139

140140
private static class JsImpl {
@@ -143,7 +143,7 @@ public boolean isValidUri(String uri) {
143143
return true;
144144
}
145145

146-
public boolean getForceCheckValieUriFromProperty() {
146+
public boolean getForceCheckValidUriFromProperty() {
147147
return false;
148148
}
149149
}
@@ -169,8 +169,8 @@ public boolean isValidUri(String uri) {
169169

170170
@GwtIncompatible
171171
@Override
172-
public boolean getForceCheckValieUriFromProperty() {
173-
return System.getProperty(FORCE_CHECK_VALID_URI) != null;
172+
public boolean getForceCheckValidUriFromProperty() {
173+
return "true".equals(System.getProperty(FORCE_CHECK_VALID_URI));
174174
}
175175
}
176176
}

gwt-safehtml/src/main/module.gwt.xml

+5
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,9 @@
2222
<!-- sources -->
2323
<source path="client"/>
2424
<source path="shared"/>
25+
26+
<define-configuration-property name="com.google.gwt.safehtml.ForceCheckCompleteHtml" is-multi-valued="false"/>
27+
<set-configuration-property name="com.google.gwt.safehtml.ForceCheckCompleteHtml" value="false"/>
28+
<define-configuration-property name="com.google.gwt.safehtml.ForceCheckValidUri" is-multi-valued="false"/>
29+
<set-configuration-property name="com.google.gwt.safehtml.ForceCheckValidUri" value="false"/>
2530
</module>

0 commit comments

Comments
 (0)