[netatmo] eventBuffer in SecurityCapability should not be static (#13636)

Also fix few findings by code analysis

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
lolodomo 2022-11-02 08:16:25 +01:00 committed by GitHub
parent b85e9b43df
commit 79bf9724fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ import org.openhab.binding.netatmo.internal.api.data.ModuleType;
*/
@NonNullByDefault
public class NAPushType {
public final static NAPushType UNKNOWN = new NAPushType(ModuleType.UNKNOWN, EventType.UNKNOWN);
public static final NAPushType UNKNOWN = new NAPushType(ModuleType.UNKNOWN, EventType.UNKNOWN);
private final ModuleType moduleType;
private final EventType event;

View File

@ -47,7 +47,7 @@ import org.slf4j.LoggerFactory;
class SecurityCapability extends RestCapability<SecurityApi> {
private final Logger logger = LoggerFactory.getLogger(SecurityCapability.class);
private static final Map<String, HomeEvent> eventBuffer = new HashMap<>();
private final Map<String, HomeEvent> eventBuffer = new HashMap<>();
private @Nullable ZonedDateTime freshestEventTime;
SecurityCapability(CommonInterface handler) {