[
https://issues.apache.org/jira/browse/ARTEMIS-2697?focusedWorklogId=647222&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-647222
]
ASF GitHub Bot logged work on ARTEMIS-2697:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 07/Sep/21 07:47
Start Date: 07/Sep/21 07:47
Worklog Time Spent: 10m
Work Description: franz1981 closed pull request #3053:
URL: https://github.com/apache/activemq-artemis/pull/3053
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 647222)
Time Spent: 0.5h (was: 20m)
> Avoid using raw types for Persister<T>
> --------------------------------------
>
> Key: ARTEMIS-2697
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2697
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Affects Versions: 2.11.0
> Reporter: Francesco Nigro
> Priority: Minor
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Persister<T> has been introduced by [ARTEMIS-1009 Pure Message
> Encoding|https://issues.apache.org/jira/browse/ARTEMIS-1009], but during the
> refactoring process some bits are being left around to properly use Java
> Generics to help spotting wrong assignments at compile time eg
> {code:java}
> public interface Journal extends ActiveMQComponent {
> // ...
> void appendAddRecord(long id,
> byte recordType,
> Persister persister,
> Object record,
> boolean sync,
> IOCompletion completionCallback) throws Exception;
> {code}
> And by consequence, a caller on {{AbstractJournalStorageManager}}:
> {code:java}
> if (message.isLargeMessage() && message instanceof LargeServerMessageImpl) {
> messageJournal.appendAddRecord(message.getMessageID(),
> JournalRecordIds.ADD_LARGE_MESSAGE, LargeMessagePersister.getInstance(),
> message, false, getContext(false));
> {code}
> Where {{LargeMessagePersister.getInstance()}} is a
> {{Persister<LargeServerMessage>}} and {{message}} is a {{Message}} and such
> method call should not compile at all (but it does)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)