[ 
https://issues.apache.org/jira/browse/OAK-3869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15094084#comment-15094084
 ] 

Alex Parvulescu edited comment on OAK-3869 at 1/12/16 3:46 PM:
---------------------------------------------------------------

looks good, although you are losing some type safety which is not ideal. 
after this refactoring you could pass in any kind of _RecordWriter_ to 
_writeMapRecord_ and wrap the resulting id into a _MapRecord_. ie. what would 
stop me from passing in a _newNodeStateWriter(ids)_ for example?

I'd like to know more about what the change is actually for, as it stands now, 
it looks purely cosmetic, so a more detailed explanation would be nice :)


was (Author: alex.parvulescu):
looks good, although you are some type safety which is not ideal. 
after this refactoring you could pass in any kind of _RecordWriter_ to 
_writeMapRecord_ and wrap the resulting id into a _MapRecord_. ie. what would 
stop me from passing in a _newNodeStateWriter(ids)_ for example?

> Refactor RecordWriter.write to always return a RecordId
> -------------------------------------------------------
>
>                 Key: OAK-3869
>                 URL: https://issues.apache.org/jira/browse/OAK-3869
>             Project: Jackrabbit Oak
>          Issue Type: Technical task
>          Components: segmentmk
>            Reporter: Michael Dürig
>            Assignee: Michael Dürig
>              Labels: technical_debt
>
> I think it would be cleaner if {{RecordId.write}} would always return a 
> {{RecordId}} instead of depending on its type parametrisation and would like 
> to refactor it to that respect.. 
> This is also a pre-requisite for my work on OAK-3348 and might also be for 
> OAK-3864. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to