List<PolicyTypeDroolsController> opControllers =
policyTypesMap.values().stream()
.filter(typeController -> typeController instanceof PolicyTypeDroolsController)
- .map(typeController -> (PolicyTypeDroolsController) typeController)
+ .map(PolicyTypeDroolsController.class::cast)
.filter(opController -> opController.getControllers().containsKey(controller.getName()))
.collect(Collectors.toList());
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* Constructor.
*/
- public LifecycleState(@NonNull LifecycleFsm manager) {
+ protected LifecycleState(@NonNull LifecycleFsm manager) {
this.fsm = manager;
}
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* Constructor.
* @param manager Lifecycle Manager.
*/
- public LifecycleStateUnsupported(LifecycleFsm manager) {
+ protected LifecycleStateUnsupported(LifecycleFsm manager) {
super(manager);
}
topic)) {
logger.warn("{}: DECODING-UNSUPPORTED {}:{}:{}", this,
- topic, this.getGroupId(), this.getArtifactId());
+ topic, this.getGroupId(), this.getArtifactId()); // NOSONAR
return true;
}
Collection<FactHandle> factHandles = kieSession.getFactHandles(new ClassObjectFilter(objFact.getClass()));
for (FactHandle factHandle : factHandles) {
if (Objects.equals(objFact, kieSession.getObject(factHandle))) {
- logger.info("Slow delete of {} of type {} from {}", objFact, sessionName);
+ logger.info("Slow delete of {} of type {} from {}",
+ objFact, objFact.getClass().getName(), sessionName);
kieSession.delete(factHandle);
return true;
}
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2018 Samsung Electronics Co., Ltd.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* @param controllerId the controller id
* @throws IllegalArgumentException if invalid data has been passed in
*/
- public ProtocolCoderToolset(EventProtocolParams eventProtocolParams, String controllerId) {
+ protected ProtocolCoderToolset(EventProtocolParams eventProtocolParams, String controllerId) {
if (eventProtocolParams == null || controllerId == null) {
throw new IllegalArgumentException("Invalid input");
* ============LICENSE_START=======================================================
* policy-management
* ================================================================================
- * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* @param rawCustomCoder with format: <class-containing-custom-coder>,<static-coder-field>.
*/
- public CustomCoder(String rawCustomCoder) {
+ protected CustomCoder(String rawCustomCoder) {
if (rawCustomCoder != null && !rawCustomCoder.isEmpty()) {
this.className = rawCustomCoder.substring(0, rawCustomCoder.indexOf(','));
* @param className class name
* @param staticCoderField static coder field
*/
- public CustomCoder(String className, String staticCoderField) {
+ protected CustomCoder(String className, String staticCoderField) {
if (className == null || className.isEmpty()) {
throw new IllegalArgumentException("No classname to create CustomCoder cannot be created");
}
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* Constructs the object.
*/
- public FeatureLockImpl() {
+ protected FeatureLockImpl() {
this.attached = false;
}
* @param callback callback to be invoked once the lock is granted, or subsequently
* lost; must not be {@code null}
*/
- public FeatureLockImpl(LockState state, String resourceId, String ownerKey, int holdSec, LockCallback callback) {
+ protected FeatureLockImpl(LockState state, String resourceId, String ownerKey, int holdSec, LockCallback callback) {
super(state, resourceId, ownerKey, holdSec, callback);
this.attached = true;
}
/**
* Constructs the object.
*/
- public LockManager() {
+ protected LockManager() {
super();
}
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
*/
public String convertToSchema(@NonNull ToscaPolicyType policyType) {
//
- // TODO:
+ // TODO: // NOSONAR
// 1. Convert Tosca Policy Type definition schema to suitable json schema.
// 2. Call registerValidator to register
throw new UnsupportedOperationException("schema generation from policy type is not supported");
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018, 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
protected final Marker marker;
- public LoggerMarkerFilter(Marker marker) {
+ protected LoggerMarkerFilter(Marker marker) {
this.marker = marker;
}