Skip to content

Commit

Permalink
MOSIP-36579 Fixed sonar hotspot and bug (#1360)
Browse files Browse the repository at this point in the history
* MOSIP-36579 Fixed sonar hotspot and bug

Signed-off-by: kameshsr <[email protected]>

* Corrected java version

Signed-off-by: kameshsr <[email protected]>

* MOSIP-36579 Added null check

Signed-off-by: kameshsr <[email protected]>

* MOSIP-36579 Added null check

Signed-off-by: kameshsr <[email protected]>

---------

Signed-off-by: kameshsr <[email protected]>
  • Loading branch information
kameshsr authored Oct 17, 2024
1 parent a43cfc7 commit 6cb7a85
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This repository contains source code and design documents for MOSIP ID Authentic
Refer to [SQL scripts](db_scripts).

## Build & run (for developers)
The project requires JDK 1.11.
The project requires JDK 1.21.
1. Build and install:
```
$ cd kernel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,11 @@ public <R> R downloadObject(String dataShareUrl, Class<R> clazz, boolean decrypt
RestRequestDTO request = restRequestFactory.buildRequest(RestServicesConstants.DATA_SHARE_GET, null, String.class);
request.setUri(dataShareUrl);
String responseStr = restTemplate.getForObject(dataShareUrl, String.class);
if (responseStr == null) {
throw new IdAuthUncheckedException(IdAuthenticationErrorConstants.UNABLE_TO_PROCESS.getErrorCode(), IdAuthenticationErrorConstants.UNABLE_TO_PROCESS.getErrorMessage());
}
Optional<Entry<String, Object>> errorOpt = RestUtil.getError(responseStr, mapper);

if (errorOpt.isEmpty()) {
R result;
if (decryptionRequired) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ private void subscribeForCredentialIssueanceEvents(String topicPrefix) {
webSubHelper.subscribe(subscriptionRequest);
logger.info(IdAuthCommonConstants.SESSION_ID, "subscribeForCredentialIssueanceEvents", "", "Subscribed to topic: " + topic);
} catch (Exception e) {
e.printStackTrace();
logger.info(IdAuthCommonConstants.SESSION_ID, "subscribeForCredentialIssueanceEvents", e.getClass().toString(), "Error subscribing topic: "+ topic +"\n" + e.getMessage());
throw e;
}
Expand Down

0 comments on commit 6cb7a85

Please sign in to comment.