One sonar security and 4 maintainability issues are fixed.
Issue-ID: NONRTRIC-1057
Change-Id: Ifbd7b4463a5e005fd5e481e24d7c6bee5c9cd740
Signed-off-by: aravind.est <aravindhan.a@est.tech>
/*-
* ============LICENSE_START======================================================================
* Copyright (C) 2023 Nordix Foundation. All rights reserved.
- * Copyright (C) 2023-2024 OpenInfra Foundation Europe. All rights reserved.
+ * Copyright (C) 2023-2025 OpenInfra Foundation Europe. 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.
}
@BeforeEach
- public void init() {
+ void init() {
mockServer = MockRestServiceServer.createServer(restTemplate);
}
/*-
* ============LICENSE_START======================================================================
* Copyright (C) 2023 Nordix Foundation. All rights reserved.
- * Copyright (C) 2023-2024 OpenInfra Foundation Europe. All rights reserved.
+ * Copyright (C) 2023-2025 OpenInfra Foundation Europe. 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.
rappCacheService.putRapp(rapp);
return ResponseEntity.accepted().build();
} else {
- logger.info("Invalid Rapp package for {}", rappId);
+ if (rappId == null) {
+ logger.info("Invalid Rapp package with null rAppId");
+ } else {
+ logger.info("Invalid Rapp package for {}", rappId);
+ }
throw new RappHandlerException(HttpStatus.BAD_REQUEST, "Invalid rApp package.");
}
}
/*
* ============LICENSE_START======================================================================
- * Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.
+ * Copyright (C) 2024-2025 OpenInfra Foundation Europe. 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.
private final String validRappFile = "valid-rapp-package.csar";
@BeforeEach
- public void init() {
+ void init() {
mockServer = MockRestServiceServer.createServer(restTemplate);
}
/*-
* ============LICENSE_START======================================================================
* Copyright (C) 2023 Nordix Foundation. All rights reserved.
- * Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.
+ * Copyright (C) 2024-2025 OpenInfra Foundation Europe. 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.
}
@BeforeEach
- public void init() {
+ void init() {
mockServer = MockRestServiceServer.createServer(restTemplate);
}
/*-
* ============LICENSE_START======================================================================
* Copyright (C) 2023 Nordix Foundation. All rights reserved.
- * Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.
+ * Copyright (C) 2024-2025 OpenInfra Foundation Europe. 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.
}
@BeforeEach
- public void init() {
+ void init() {
mockServer = MockRestServiceServer.createServer(restTemplate);
}