-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[proxima-direct-core] #29 remove Serializable interface from readers and writers #401
Conversation
3ac2bef
to
53d0bc9
Compare
53d0bc9
to
de5df49
Compare
a889cb9
to
c0db138
Compare
1136fdf
to
8734c47
Compare
|
||
@SuppressWarnings("unchecked") | ||
@Override | ||
Factory asFactory(RepositoryFactory repositoryFactory); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not big fan of RepositoryFactory
being serialized in all reader factories. Why don't we have Factory#create(Repository)
instead?
I think we should be aiming for following:
- RepositoryFactory is only used in top level classes where there is no other way of retrieving repository (eg. source)
- Lower level factories (readers, ...), should get materialized repository instance, to keep the UDF size low.
I think this may also lead to a cleaner design.
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Will try that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the issue with that approach. There are cases in which you need to deserialize the reader/writer without reference to Repository. One example of that is DirectAttributeFamilyDescriptor
. I can include RepositoryFactory in the descriptor, but that would mean change in serialVersionUID
, because otherwise it would cause NPEs. But we maybe might change it now, because this change is already breaking to serialization. Will try the to go down the path to see if I find any more issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't worry about that, because this is a huge breaking change anyway (that should help to avoid future BCs). 👍
8734c47
to
9ecf3b4
Compare
984d933
to
501a81e
Compare
All fixed and verified on live pipeline. When approved, I'll squash it. |
07c8a47
to
907f60c
Compare
907f60c
to
b11e42d
Compare
b11e42d
to
2e475bd
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs 83.3% Coverage The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. |
…s and use factories instead
2e475bd
to
b04cf18
Compare
This closes O2-Czech-Republic#29 |
No description provided.