Commit 42acf97
authored
Fix string concatenation loops (SpotBugs SBSC) (#4370)
* Fix SpotBugs SBSC_USE_STRINGBUFFER_CONCATENATION warnings
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.
* Fix SpotBugs SBSC_USE_STRINGBUFFER_CONCATENATION warnings
Refactored code to use StringBuilder in loops to prevent string concatenation performance issues.
Updated .github/scripts/generate-quality-report.py to treat SBSC_USE_STRINGBUFFER_CONCATENATION as a build failure.
* Fix SpotBugs SBSC_USE_STRINGBUFFER_CONCATENATION warnings
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.
* Fix SpotBugs SBSC_USE_STRINGBUFFER_CONCATENATION warnings
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.
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>1 parent db3cea5 commit 42acf97
File tree
20 files changed
+201
-182
lines changed- .github/scripts
- CodenameOne/src/com/codename1
- ads
- facebook
- io
- properties
- testing
- ui
- html
- plaf
- xml
20 files changed
+201
-182
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
773 | 773 | | |
774 | 774 | | |
775 | 775 | | |
776 | | - | |
| 776 | + | |
| 777 | + | |
777 | 778 | | |
778 | 779 | | |
779 | 780 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
| 147 | + | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
Lines changed: 9 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
221 | 222 | | |
222 | 223 | | |
223 | | - | |
| 224 | + | |
224 | 225 | | |
| 226 | + | |
225 | 227 | | |
226 | 228 | | |
227 | 229 | | |
| |||
1221 | 1223 | | |
1222 | 1224 | | |
1223 | 1225 | | |
1224 | | - | |
| 1226 | + | |
1225 | 1227 | | |
1226 | 1228 | | |
1227 | | - | |
| 1229 | + | |
1228 | 1230 | | |
1229 | 1231 | | |
1230 | | - | |
| 1232 | + | |
1231 | 1233 | | |
1232 | | - | |
| 1234 | + | |
1233 | 1235 | | |
1234 | 1236 | | |
1235 | | - | |
| 1237 | + | |
1236 | 1238 | | |
1237 | 1239 | | |
1238 | | - | |
| 1240 | + | |
1239 | 1241 | | |
1240 | 1242 | | |
1241 | 1243 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
| 338 | + | |
338 | 339 | | |
339 | | - | |
| 340 | + | |
340 | 341 | | |
341 | 342 | | |
| 343 | + | |
342 | 344 | | |
343 | 345 | | |
344 | 346 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
388 | | - | |
389 | | - | |
| 388 | + | |
| 389 | + | |
390 | 390 | | |
391 | | - | |
| 391 | + | |
392 | 392 | | |
393 | 393 | | |
394 | | - | |
| 394 | + | |
395 | 395 | | |
396 | | - | |
| 396 | + | |
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | | - | |
| 404 | + | |
405 | 405 | | |
406 | 406 | | |
407 | | - | |
| 407 | + | |
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2492 | 2492 | | |
2493 | 2493 | | |
2494 | 2494 | | |
| 2495 | + | |
2495 | 2496 | | |
2496 | | - | |
| 2497 | + | |
2497 | 2498 | | |
2498 | 2499 | | |
2499 | | - | |
| 2500 | + | |
2500 | 2501 | | |
2501 | 2502 | | |
2502 | 2503 | | |
| |||
2537 | 2538 | | |
2538 | 2539 | | |
2539 | 2540 | | |
2540 | | - | |
| 2541 | + | |
2541 | 2542 | | |
2542 | 2543 | | |
2543 | | - | |
| 2544 | + | |
2544 | 2545 | | |
2545 | 2546 | | |
2546 | | - | |
| 2547 | + | |
2547 | 2548 | | |
2548 | 2549 | | |
2549 | 2550 | | |
| |||
Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
375 | | - | |
376 | | - | |
| 375 | + | |
| 376 | + | |
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | | - | |
| 382 | + | |
383 | 383 | | |
384 | 384 | | |
385 | | - | |
| 385 | + | |
386 | 386 | | |
387 | 387 | | |
388 | | - | |
| 388 | + | |
389 | 389 | | |
390 | | - | |
391 | | - | |
| 390 | + | |
| 391 | + | |
392 | 392 | | |
393 | 393 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | | - | |
| 265 | + | |
266 | 266 | | |
267 | | - | |
| 267 | + | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
| 270 | + | |
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2229 | 2229 | | |
2230 | 2230 | | |
2231 | 2231 | | |
| 2232 | + | |
2232 | 2233 | | |
2233 | | - | |
2234 | | - | |
| 2234 | + | |
| 2235 | + | |
2235 | 2236 | | |
2236 | 2237 | | |
2237 | | - | |
| 2238 | + | |
2238 | 2239 | | |
2239 | 2240 | | |
2240 | 2241 | | |
| |||
2266 | 2267 | | |
2267 | 2268 | | |
2268 | 2269 | | |
| 2270 | + | |
2269 | 2271 | | |
2270 | | - | |
| 2272 | + | |
2271 | 2273 | | |
2272 | | - | |
| 2274 | + | |
2273 | 2275 | | |
2274 | 2276 | | |
2275 | 2277 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3095 | 3095 | | |
3096 | 3096 | | |
3097 | 3097 | | |
3098 | | - | |
| 3098 | + | |
3099 | 3099 | | |
3100 | 3100 | | |
3101 | 3101 | | |
3102 | 3102 | | |
3103 | | - | |
| 3103 | + | |
3104 | 3104 | | |
3105 | 3105 | | |
3106 | | - | |
| 3106 | + | |
3107 | 3107 | | |
3108 | | - | |
3109 | | - | |
| 3108 | + | |
| 3109 | + | |
3110 | 3110 | | |
3111 | 3111 | | |
3112 | 3112 | | |
| |||
0 commit comments