Add app details for UNMANAGED_APP_UNINSTALL #210

Merged
pahansith merged 4 commits from osh.silva/device-mgt-core:unmanaged-install-9211 into master 1 year ago
Collaborator
fixes https://roadmap.entgra.net/issues/10260 ![image](/attachments/e35e4478-3d6a-42b4-b45c-1d88391e33bf)
osh.silva added 1 commit 1 year ago
pahansith requested changes 1 year ago
operation.setInitiatedBy(rs.getString("INITIATED_BY"));
if (MDMAppConstants.AndroidConstants.UNMANAGED_APP_UNINSTALL.equals(operation.getCode())) {
byte[] operationDetails = rs.getBytes("OPERATION_DETAILS");
bais = new ByteArrayInputStream(operationDetails);
Owner

ByteArrayInputStream and ObjectInputStream needs to be closed explicitly or wrapped inside the try with resources block to avoid resource leaking

ByteArrayInputStream and ObjectInputStream needs to be closed explicitly or wrapped inside the try with resources block to avoid resource leaking
osh.silva marked this conversation as resolved
operations.add(operation);
}
} catch (IOException e) {
throw new OperationManagementDAOException("IO Error occurred while retrieving app data of operation ", e);
Owner

log the error

log the error
osh.silva marked this conversation as resolved
} catch (IOException e) {
throw new OperationManagementDAOException("IO Error occurred while retrieving app data of operation ", e);
} catch (ClassNotFoundException e) {
throw new OperationManagementDAOException("Class not found error occurred while retrieving app data of operation ", e);
Owner

log the error

log the error
osh.silva marked this conversation as resolved
operation.setInitiatedBy(rs.getString("INITIATED_BY"));
if (MDMAppConstants.AndroidConstants.UNMANAGED_APP_UNINSTALL.equals(operation.getCode())) {
byte[] operationDetails = rs.getBytes("OPERATION_DETAILS");
bais = new ByteArrayInputStream(operationDetails);
Owner

ByteArrayInputStream and ObjectInputStream needs to be closed explicitly or wrapped inside the try with resources block to avoid resource leaking

ByteArrayInputStream and ObjectInputStream needs to be closed explicitly or wrapped inside the try with resources block to avoid resource leaking
osh.silva marked this conversation as resolved
osh.silva added 2 commits 1 year ago
pahansith added 1 commit 1 year ago
pahansith merged commit 7afe7fca08 into master 1 year ago

Reviewers

pahansith requested changes 1 year ago
The pull request has been merged as 7afe7fca08.
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: community/device-mgt-core#210
Loading…
There is no content yet.