You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replaced string concatenation in loops with StringBuilder in multiple files to improve performance and satisfy SpotBugs checks.
Updated .github/scripts/generate-quality-report.py to fail on this violation.
Fixed compilation errors in ComponentSelector and InnerActive by calling toString() before indexOf/substring on StringBuilder, as CN1's StringBuilder lacks these methods.
if ((CSSParser.isWhiteSpace(text.charAt(0))) && (curLine.getComponentCount() != 0)) { //leading space is trimmed if it is in the first component of the line
2091
-
wordStr = " "; //leading space
2092
+
wordStr.append(" "); //leading space
2092
2093
}
2093
2094
2094
2095
while (w < words.size()) {
2095
2096
StringnextWord = (String) words.elementAt(w);
2096
2097
Stringspace = "";
2097
-
if ((!wordStr.equals("")) && (!wordStr.equals(" "))) {
2098
+
if ((wordStr.length() > 0) && (!wordStr.toString().equals(" "))) {
2098
2099
space = " ";
2099
2100
}
2100
-
if (font.stringWidth(wordStr + space + nextWord) > spaceW - 2) {
2101
-
comps.addElement(addString(wordStr, align));
2101
+
if (font.stringWidth(wordStr.toString() + space + nextWord) > spaceW - 2) {
0 commit comments