[transform] Code optimization for Java17: instanceof matching and multiline strings (#15483)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
@@ -64,9 +64,9 @@ public class MapTransformationProfile implements StateProfile {
|
||||
if (paramSource == null) {
|
||||
paramSource = "%s";
|
||||
}
|
||||
if (paramFunction instanceof String && paramSource instanceof String) {
|
||||
function = (String) paramFunction;
|
||||
sourceFormat = (String) paramSource;
|
||||
if (paramFunction instanceof String pFunction && paramSource instanceof String pFormat) {
|
||||
function = pFunction;
|
||||
sourceFormat = pFormat;
|
||||
} else {
|
||||
logger.error("Parameter '{}' and '{}' have to be Strings. Profile will be inactive.", FUNCTION_PARAM,
|
||||
SOURCE_FORMAT_PARAM);
|
||||
|
||||
Reference in New Issue
Block a user