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
Replace StringBuffer usages with StringBuilder (#3668)
See: https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/StringBuilder.html
> This class provides an API compatible with StringBuffer, but with no guarantee of synchronization.
> This class is designed for use as a drop-in replacement for StringBuffer in places where the string buffer was being used by a single thread (as is generally the case).
> Where possible, it is recommended that this class be used in preference to StringBuffer as it will be faster under most implementations.
Signed-off-by: Wouter Born <[email protected]>
Copy file name to clipboardexpand all lines: bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/RuleEngineImpl.java
+9-14
Original file line number
Diff line number
Diff line change
@@ -266,7 +266,7 @@ public RuleEngineImpl(final @Reference ModuleTypeRegistry moduleTypeRegistry,
266
266
this.ruleRegistry = ruleRegistry;
267
267
this.readyService = readyService;
268
268
269
-
listener = newRegistryChangeListener<Rule>() {
269
+
listener = newRegistryChangeListener<>() {
270
270
@Override
271
271
publicvoidadded(Rulerule) {
272
272
RuleEngineImpl.this.addRule(rule);
@@ -337,8 +337,7 @@ public void added(ModuleType moduleType) {
Copy file name to clipboardexpand all lines: bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/RuleRegistryImpl.java
Copy file name to clipboardexpand all lines: bundles/org.openhab.core.test.magic/src/main/java/org/openhab/core/magic/binding/internal/MagicServiceConfig.java
+1-1
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ public class MagicServiceConfig {
46
46
47
47
@Override
48
48
publicStringtoString() {
49
-
StringBufferb = newStringBuffer();
49
+
StringBuilderb = newStringBuilder();
50
50
for (Fieldfield : this.getClass().getDeclaredFields()) {
Copy file name to clipboardexpand all lines: bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/internal/console/FirmwareUpdateConsoleCommandExtension.java
0 commit comments