-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
Added a ByteSizeConverter #169
Conversation
@lviggiano I know about the lack of documentation for both this and DurationConverter. I will try to find some time to document these features this week. |
After merging this, the only thing missing from what I was requesting in #155 is the actual ability to register converters as "default converters". That is, being able to add DurationConverter as a converter that would be used for config interface methods that return java.time.Duration by default instead of having to annotate these methods with the ConverterClass annotation explicitly (and the same then for other converters such as the ByteSizeConverter and thereby the ByteSize return type). I'm not quite sure how to tackle that... but then again, I haven't really given it much thought. Any pointers would be appreciated and I can try to cook something up and create a PR. |
darn it... It seems that I'm using Java8 methods in the ByteSize classes... I'll move the code to the owner-java8 module. |
…rter as well as the ByteSize mechanism.
I've added some documentation. Not quite sure if it's up to standards, all comments are welcomed. |
…h existing unit test for ByteSizeConverter.
I'll check it and merge this asap. Thanks |
Hi. I am merging right now. I moved the ByteSize classes into owner-extras, since they are not java8 related. I left the Duration classes into owner-java8, but I think I should create a new module (owner-java8-extras), since the owner-java8 was supposed to contain just the owner core functionalities that are enabled by the use of java 8. The DurationConverter is not a core feature, but a utility. For now I keep it there in owner-java8 module and i'll decide later. Regards |
I just discovered that also ByteSize does uses java8 APIs. So I think I'll move your changes into a owner-java8-extras module before merging to master, next days, before merging to master. Thanks. L. |
I merged it. Take in mind that now you need to declare owner-java8-extras dependency (which also depends on owner-java8) to use the DurationConverter and the ByteSizeConverter. Thanks again. |
Sure thing... btw, do you have any ETA on an official release where this will be included? |
The minimum to release is to document all the chsnges made since last
|
I added documentation for the duration and byte size stuff: Is this not sufficient? Can you give me some hints on what you think is missing? edit or are you talking about other features that have been added? Is there a list somewhere or do I need to do a diff in git from some release tag? |
Would you say that this is an accurate view of the differences since the last release: ...and if so, what does it look like still needs documentation? |
I'll write a note with things that needs to be documented. It's long time
|
any news on ETA of the next release? |
I'd really like to see a new version published. Is there anything I can do to help make that happen @lviggiano? |
Hi. I am not working for health reasons for long time on this project. I'm sorry about that. If you (or someone else) have a proven confidence about how to release jars on maven central, I would agree to someone else having the rights to publish the new jars. For the moment I am trying to get my hands back on coding. But I cannot make promises. Luigi. |
Sorry to hear about your health problems. I admit that I have not released jars to maven central before so I probably would have a rough time figuring that process out. We've been discussing this here at work and how we would hate to see this project stagnate. We do worry though that there is no other member of this project that merges pull requests. We have discussed forking the project so that we can get changes merged into "our version" but of course we really would like to avoid that. We might end up forking but keeping that version private to us but of course still making pull requests to OWNER with any changes that we make, in the hope that these changes will eventually find their way into a new release. It goes without saying that we hold no grudge towards you and absolutely understand your situation. We sincerely thank you for your effort in creating this project and the work you've done here. We hope that you will get better and that takes precedence over all else. |
Here is a suggestion for a ByteSizeConverter for what was requested in #155.
I've added this to the owner-extras module as this is not a part of core functionality.
The code should be Java5 compatible and includes a unit test.
I also did a little refactoring by introducing a ConverterUtil class to avoid duplicating code in the DurationConverter and ByteSizeConverter classes. I added that to the owner core module so that both owner-extras and owner-java8 modules would have access to it. That code is Java5 compliant so that should be fine.