Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOSIP-36579 Fixed sonar hotspot and bug #1360

Merged
merged 4 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -54,10 +54,13 @@ public class DataShareManager {
public <R> R downloadObject(String dataShareUrl, Class<R> clazz, boolean decryptionRequired) throws RestServiceException, IdAuthenticationBusinessException {
RestRequestDTO request = restRequestFactory.buildRequest(RestServicesConstants.DATA_SHARE_GET, null, String.class);
request.setUri(dataShareUrl);
String responseStr = restTemplate.getForObject(dataShareUrl, String.class);
String responseStr = null;
if(restTemplate!=null){
responseStr = restTemplate.getForObject(dataShareUrl, String.class);
}
Optional<Entry<String, Object>> errorOpt = RestUtil.getError(responseStr, mapper);
mahammedtaheer marked this conversation as resolved.
Show resolved Hide resolved

if (errorOpt.isEmpty()) {
if (errorOpt.isEmpty() && responseStr!=null) {
R result;
if (decryptionRequired) {
// Decrypt data
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