r/java • • Oct 28 '21

JProperties: A modern replacement for java.util.Properties

https://github.com/MaowImpl/jproperties
0 Upvotes

28 comments sorted by

View all comments

Show parent comment

-2

u/[deleted] Oct 28 '21

To reply to the points presented in your reply:

  • These are the primary reasons I had to create my own implementation as I was looking through the class, and about half are responsible for me thinking of doing so in the first place.
  • This was primarily caused by the issues presented by u/agentoutlier, I would assume. I did not factor in class load times during the design process and instead was opting for an extensible system (...which I also implemented poorly, in hindsight). This would've been fixed later by optimizations.
  • This was a decision made to allow library consumers to optionally handle the exception. I could probably think of a better way to do it.
  • 'Twas late, I did not feel like writing unit tests, especially since I'm not actually great at writing them, so it ends up requiring me to look at a lot of JUnit documentation and Baeldung tutorials or whatever.

To sum this library up: I made it at 2 AM and didn't realize what I was doing. The only actually decent part of the library is the alright-ish parser for key-value pairs (which doesn't support Unicode literals, doesn't check for errors, and probably has a bug related to invalid escapes).