mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Tidy use of StringHelper replace() in BeanProperty, BaseTableDdl
This commit is contained in:
@@ -56,8 +56,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import static io.ebean.util.StringHelper.replace;
|
||||
|
||||
/**
|
||||
* Description of a property of a bean. Includes its deployment information such
|
||||
* as database column mapping information.
|
||||
@@ -357,12 +355,12 @@ public class BeanProperty implements ElPropertyValue, Property, STreeProperty {
|
||||
|
||||
private String tableAliasIntern(BeanDescriptor<?> descriptor, String s, boolean dbEncrypted, String dbColumn) {
|
||||
if (descriptor != null) {
|
||||
s = replace(s, "${ta}.", "${}");
|
||||
s = replace(s, "${ta}", "${}");
|
||||
s = s.replace("${ta}.", "${}");
|
||||
s = s.replace("${ta}", "${}");
|
||||
if (dbEncrypted) {
|
||||
s = dbEncryptFunction.getDecryptSql(s);
|
||||
String namedParam = ":encryptkey_" + descriptor.getBaseTable() + "___" + dbColumn;
|
||||
s = replace(s, "?", namedParam);
|
||||
s = s.replace("?", namedParam);
|
||||
}
|
||||
}
|
||||
return InternString.intern(s);
|
||||
|
||||
+1
-1
@@ -150,7 +150,7 @@ public class BaseTableDdl implements TableDdl {
|
||||
buffer.append("-- NOTE: table has @History - special migration may be necessary").newLine();
|
||||
}
|
||||
for (String ddlScript : before) {
|
||||
buffer.appendStatement(translate(ddlScript, tableName, columnName, this.defaultValue));
|
||||
buffer.appendStatement(translate(ddlScript, tableName, columnName, defaultValue));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user