Improved: Remove useless null check

(OFBIZ-10054)

Additionally the noisy ‘final’ modifiers on local variables have been
removed because local variables should be final by default and mutable
by exception.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859081 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mathieu Lirzin
2019-05-10 14:13:34 +00:00
parent a8f3480de4
commit a0ac6ae331
@@ -396,12 +396,10 @@ public class UtilCodec {
}
// check for js events
final String onEvent = "on" + StringUtils.substringBetween(value, " on", "=");
final boolean seekSegmentTime = value.contains("seekSegmentTime");
if (null != onEvent || seekSegmentTime) {
if (jsEventList.stream().anyMatch(str -> StringUtils.containsIgnoreCase(str, onEvent)) || seekSegmentTime) {
errorMessageList.add("In field [" + valueName + "] js events are not allowed.");
}
String onEvent = "on" + StringUtils.substringBetween(value, " on", "=");
boolean seekSegmentTime = value.contains("seekSegmentTime");
if (jsEventList.stream().anyMatch(str -> StringUtils.containsIgnoreCase(str, onEvent)) || seekSegmentTime) {
errorMessageList.add("In field [" + valueName + "] js events are not allowed.");
}
// TODO: anything else to check for that can be used to get HTML or JavaScript going without these characters?