[
https://issues.apache.org/jira/browse/ARTEMIS-2697?focusedWorklogId=418826&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-418826
]
ASF GitHub Bot logged work on ARTEMIS-2697:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 08/Apr/20 19:43
Start Date: 08/Apr/20 19:43
Worklog Time Spent: 10m
Work Description: clebertsuconic commented on issue #3053: ARTEMIS-2697
Avoid using raw types for Persister<T>
URL: https://github.com/apache/activemq-artemis/pull/3053#issuecomment-611155406
@franz1981 can you rebase this please?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 418826)
Remaining Estimate: 0h
Time Spent: 10m
> 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: 10m
> 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)