#1870 - Whether DtoMeta.findproperty needs to add is prefix

This commit is contained in:
rob bygrave
2019-11-29 20:54:28 +13:00
parent 1fc4082abe
commit 27a4e8951d
4 changed files with 57 additions and 5 deletions
@@ -1,12 +1,12 @@
package io.ebeaninternal.server.dto;
import io.ebean.util.StringHelper;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import static io.ebean.util.StringHelper.replaceString;
/**
* Holds property and constructor meta data for a given DTO bean type.
*
@@ -123,9 +123,11 @@ class DtoMeta {
String upperLabel = label.toUpperCase();
DtoMetaProperty property = propMap.get(upperLabel);
if (property == null && upperLabel.startsWith("IS_")) {
property = propMap.get(upperLabel.substring(3));
}
if (property == null) {
upperLabel = StringHelper.replaceString(upperLabel, "_", "");
property = propMap.get(upperLabel);
property = propMap.get(replaceString(upperLabel, "_", ""));
}
return property;
}