IDEMPIERE-455 Discover and fix FindBugs problems / Pattern LSYC_LOCAL_SYNCHRONIZED - StringBuffer
This commit is contained in:
parent
eca83846d6
commit
dc07ce8e37
|
@ -1881,7 +1881,7 @@ public final class MRole extends X_AD_Role
|
|||
public String addAccessSQL (String SQL, String TableNameIn,
|
||||
boolean fullyQualified, boolean rw)
|
||||
{
|
||||
StringBuffer retSQL = new StringBuffer();
|
||||
StringBuilder retSQL = new StringBuilder();
|
||||
|
||||
// Cut off last ORDER BY clause
|
||||
String orderBy = "";
|
||||
|
|
|
@ -52,7 +52,7 @@ public class GridTab2PackExporter implements IGridTabExporter {
|
|||
List<PackoutItem> packoutItems = new ArrayList<PackoutItem>();
|
||||
if (packOut.getHandler(tableName) == null) {
|
||||
properties.put(DataElementParameters.AD_TABLE_ID, gridTab.getAD_Table_ID());
|
||||
StringBuffer sql = new StringBuffer("SELECT * FROM ");
|
||||
StringBuilder sql = new StringBuilder("SELECT * FROM ");
|
||||
sql.append(tableName);
|
||||
if (currentRowOnly) {
|
||||
sql.append(" WHERE ").append(gridTab.getTableModel().getWhereClause(gridTab.getCurrentRow()));
|
||||
|
|
|
@ -293,7 +293,7 @@ public abstract class ElementAttributes extends GenericElement implements Attrib
|
|||
*/
|
||||
protected String createStartTag()
|
||||
{
|
||||
StringBuffer out = new StringBuffer();
|
||||
StringBuilder out = new StringBuilder();
|
||||
|
||||
out.append(getStartTagChar());
|
||||
|
||||
|
|
|
@ -643,7 +643,7 @@ public abstract class GenericElement implements Element,Serializable
|
|||
|
||||
protected String createStartTag()
|
||||
{
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getStartTagChar());
|
||||
|
||||
if(getBeginStartModifierDefined())
|
||||
|
@ -663,7 +663,7 @@ public abstract class GenericElement implements Element,Serializable
|
|||
protected String createEndTag()
|
||||
{
|
||||
setEndStartModifier('/');
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getStartTagChar());
|
||||
|
||||
if(getEndStartModifierDefined())
|
||||
|
|
|
@ -544,7 +544,7 @@ public class XhtmlDocument implements Serializable,Cloneable
|
|||
|
||||
{
|
||||
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
if ( getCodeset() != null )
|
||||
|
||||
|
@ -588,7 +588,7 @@ public class XhtmlDocument implements Serializable,Cloneable
|
|||
|
||||
{
|
||||
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
if (doctype != null)
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ public class CharacterFilter extends java.util.Hashtable<String, Object> impleme
|
|||
if ( to_process == null || to_process.length() == 0 )
|
||||
return "";
|
||||
|
||||
StringBuffer bs = new StringBuffer(to_process.length() + 50);
|
||||
StringBuilder bs = new StringBuilder(to_process.length() + 50);
|
||||
StringCharacterIterator sci = new StringCharacterIterator(to_process);
|
||||
String tmp = null;
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ public class StringFilter extends java.util.Hashtable<String, Object> implements
|
|||
public String process(String to_process)
|
||||
{ System.out.println("\nString to Process in StringFilter = "+to_process);
|
||||
String[] value = split(to_process);
|
||||
StringBuffer new_value = new StringBuffer();
|
||||
StringBuilder new_value = new StringBuilder();
|
||||
for(int x = 0; x < value.length; x++)
|
||||
{
|
||||
if(hasAttribute(value[x]))
|
||||
|
@ -113,7 +113,6 @@ public class StringFilter extends java.util.Hashtable<String, Object> implements
|
|||
return array;
|
||||
}
|
||||
|
||||
StringBuffer sb = new StringBuffer(to_split.length()+50);
|
||||
StringCharacterIterator sci = new StringCharacterIterator(to_split);
|
||||
int length = 0;
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ public class WordFilter extends java.util.Hashtable<String, Object> implements F
|
|||
String tmp = "";
|
||||
// the true at the end is the key to making it work
|
||||
StringTokenizer st = new StringTokenizer(to_process, " ", true);
|
||||
StringBuffer newValue = new StringBuffer(to_process.length() + 50);
|
||||
StringBuilder newValue = new StringBuilder(to_process.length() + 50);
|
||||
while ( st.hasMoreTokens() )
|
||||
{
|
||||
tmp = st.nextToken();
|
||||
|
|
|
@ -210,7 +210,7 @@ public class comment extends MultiPartElement implements Printable
|
|||
|
||||
setEndTagChar(' ');
|
||||
|
||||
StringBuffer out = new StringBuffer();
|
||||
StringBuilder out = new StringBuilder();
|
||||
|
||||
out.append(getStartTagChar());
|
||||
|
||||
|
@ -241,7 +241,7 @@ public class comment extends MultiPartElement implements Printable
|
|||
protected String createEndTag()
|
||||
{
|
||||
|
||||
StringBuffer out = new StringBuffer();
|
||||
StringBuilder out = new StringBuilder();
|
||||
|
||||
setStartTagChar(' ');
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ public class XMLDocument
|
|||
public XMLDocument (double version, boolean standalone)
|
||||
{
|
||||
prolog = new Vector<Object> (2);
|
||||
StringBuffer versionStr = new StringBuffer ();
|
||||
StringBuilder versionStr = new StringBuilder ();
|
||||
versionStr.append ("<?xml version=\"");
|
||||
versionStr.append (version);
|
||||
versionStr.append ("\" standalone=\"");
|
||||
|
@ -270,7 +270,7 @@ public class XMLDocument
|
|||
*/
|
||||
public final String toString ()
|
||||
{
|
||||
StringBuffer retVal = new StringBuffer ();
|
||||
StringBuilder retVal = new StringBuilder ();
|
||||
if (codeset != null)
|
||||
{
|
||||
for (int i = 0; i < prolog.size (); i++)
|
||||
|
@ -307,7 +307,7 @@ public class XMLDocument
|
|||
*/
|
||||
public final String toString (String codeset)
|
||||
{
|
||||
StringBuffer retVal = new StringBuffer ();
|
||||
StringBuilder retVal = new StringBuilder ();
|
||||
for (int i = 0; i < prolog.size (); i++)
|
||||
{
|
||||
ConcreteElement e = (ConcreteElement)prolog.elementAt (i);
|
||||
|
|
Loading…
Reference in New Issue