IDEMPIERE-308 Performance: Replace with StringBuilder / fix problems found with StringBuilder(int)
This commit is contained in:
parent
bd96df6367
commit
b8af84eb25
|
@ -540,7 +540,7 @@ public class MArchive extends X_AD_Archive {
|
|||
* @return String
|
||||
*/
|
||||
private String getArchivePathSnippet() {
|
||||
StringBuilder path = new StringBuilder(this.getAD_Client_ID()).append(File.separator).append(this.getAD_Org_ID())
|
||||
StringBuilder path = new StringBuilder().append(this.getAD_Client_ID()).append(File.separator).append(this.getAD_Org_ID())
|
||||
.append(File.separator);
|
||||
if (this.getAD_Process_ID() > 0) {
|
||||
path.append(this.getAD_Process_ID()).append(File.separator);
|
||||
|
|
|
@ -814,7 +814,7 @@ public class MAttachment extends X_AD_Attachment
|
|||
*/
|
||||
private String getAttachmentPathSnippet(){
|
||||
|
||||
StringBuilder msgreturn = new StringBuilder(this.getAD_Client_ID()).append(File.separator)
|
||||
StringBuilder msgreturn = new StringBuilder().append(this.getAD_Client_ID()).append(File.separator)
|
||||
.append(this.getAD_Org_ID()).append(File.separator)
|
||||
.append(this.getAD_Table_ID()).append(File.separator).append(this.getRecord_ID());
|
||||
return msgreturn.toString();
|
||||
|
|
|
@ -196,7 +196,7 @@ public class MChat extends X_CM_Chat
|
|||
if (Description != null && Description.length() > 0)
|
||||
super.setDescription (Description);
|
||||
else{
|
||||
StringBuilder msgsd = new StringBuilder(getAD_Table_ID()).append("#").append(getRecord_ID());
|
||||
StringBuilder msgsd = new StringBuilder().append(getAD_Table_ID()).append("#").append(getRecord_ID());
|
||||
super.setDescription (msgsd.toString());
|
||||
}
|
||||
} // setDescription
|
||||
|
|
|
@ -88,7 +88,7 @@ public class MClientShare extends X_AD_ClientShare
|
|||
{
|
||||
int Client_ID = rs.getInt(1);
|
||||
int table_ID = rs.getInt(2);
|
||||
StringBuilder key = new StringBuilder(Client_ID).append("_").append(table_ID);
|
||||
StringBuilder key = new StringBuilder().append(Client_ID).append("_").append(table_ID);
|
||||
String ShareType = rs.getString(3);
|
||||
if (ShareType.equals(SHARETYPE_ClientAllShared))
|
||||
s_shares.put(key.toString(), Boolean.TRUE);
|
||||
|
@ -116,7 +116,7 @@ public class MClientShare extends X_AD_ClientShare
|
|||
if (s_shares.isEmpty()) // put in something
|
||||
s_shares.put("0_0", Boolean.TRUE);
|
||||
} // load
|
||||
StringBuilder key = new StringBuilder(AD_Client_ID).append("_").append(AD_Table_ID);
|
||||
StringBuilder key = new StringBuilder().append(AD_Client_ID).append("_").append(AD_Table_ID);
|
||||
return s_shares.get(key);
|
||||
} // load
|
||||
|
||||
|
|
|
@ -362,7 +362,7 @@ public class MLookupFactory
|
|||
int WindowNo, int AD_Reference_Value_ID)
|
||||
{
|
||||
// Try cache - assume no language change
|
||||
StringBuilder key = new StringBuilder(Env.getAD_Client_ID(ctx)).append("|").append(String.valueOf(AD_Reference_Value_ID));
|
||||
StringBuilder key = new StringBuilder().append(Env.getAD_Client_ID(ctx)).append("|").append(String.valueOf(AD_Reference_Value_ID));
|
||||
MLookupInfo retValue = (MLookupInfo)s_cacheRefTable.get(key);
|
||||
if (retValue != null)
|
||||
{
|
||||
|
@ -650,7 +650,7 @@ public class MLookupFactory
|
|||
int ZoomWindowPO = 0;
|
||||
|
||||
//try cache
|
||||
StringBuilder cacheKey = new StringBuilder(Env.getAD_Client_ID(ctx)).append("|").append(TableName).append(".").append(KeyColumn);
|
||||
StringBuilder cacheKey = new StringBuilder().append(Env.getAD_Client_ID(ctx)).append("|").append(TableName).append(".").append(KeyColumn);
|
||||
if (s_cacheRefTable.containsKey(cacheKey))
|
||||
return s_cacheRefTable.get(cacheKey).cloneIt();
|
||||
|
||||
|
|
Loading…
Reference in New Issue