[
https://issues.apache.org/jira/browse/AMQ-9656?focusedWorklogId=955428&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-955428
]
ASF GitHub Bot logged work on AMQ-9656:
---------------------------------------
Author: ASF GitHub Bot
Created on: 04/Feb/25 17:10
Start Date: 04/Feb/25 17:10
Worklog Time Spent: 10m
Work Description: cshannon commented on code in PR #1386:
URL: https://github.com/apache/activemq/pull/1386#discussion_r1941573565
##########
activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MultiKahaDBTransactionStore.java:
##########
@@ -427,15 +427,16 @@ private void recoverPendingLocalTransactions() throws
IOException {
}
public JournalCommand<?> load(Location location) throws IOException {
- DataByteArrayInputStream is = new
DataByteArrayInputStream(journal.read(location));
- byte readByte = is.readByte();
- KahaEntryType type = KahaEntryType.valueOf(readByte);
- if (type == null) {
- throw new IOException("Could not load journal record. Invalid
location: " + location);
- }
- JournalCommand<?> message = (JournalCommand<?>) type.createMessage();
- message.mergeFramed(is);
- return message;
+ try(DataByteArrayInputStream is = new
DataByteArrayInputStream(journal.read(location))) {
Review Comment:
Looking at it more carefully i don't think it matters either way. The source
value returned is a ByteSequence which just wraps a byte array and that is
passed to DataByteArrayInputStream. So in this case there's nothing to actually
close, it will just be a no-op.
Issue Time Tracking
-------------------
Worklog Id: (was: 955428)
Time Spent: 40m (was: 0.5h)
> Cleanup kahadb compiler warnings
> --------------------------------
>
> Key: AMQ-9656
> URL: https://issues.apache.org/jira/browse/AMQ-9656
> Project: ActiveMQ Classic
> Issue Type: Task
> Reporter: Matt Pavlovich
> Assignee: Matt Pavlovich
> Priority: Minor
> Fix For: 6.2.0, 5.19.0
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact