Re: Log4j JSON layout template Uris enum

2020-11-19 Thread Volkan Yazıcı
Replaced all "enum" singletons with "[static] final class"es in both master and release-2.x. On Wed, Nov 18, 2020 at 2:04 PM Gary Gregory wrote: > Hi Volkan, > > I think the strength of the feelings in my argument was more of a > reflection on my frustration of my lack of involvement in this new

Re: Log4j JSON layout template Uris enum

2020-11-18 Thread Gary Gregory
Hi Volkan, I think the strength of the feelings in my argument was more of a reflection on my frustration of my lack of involvement in this new valuable module. There are many FOSS projects I care about and only so many hours in a day. I am glad that you are open to my views, regardless of the out

Re: Log4j JSON layout template Uris enum

2020-11-18 Thread Volkan Yazıcı
Thanks for your sincere feedback Gary, really appreciated. Given none of us is really strongly opinionated about this, except Gary, I am okay to follow his suggestion. This brings up the following question: Shall I replace all enum singletons (in JTL module) with "final classes with a private ctor

Re: Log4j JSON layout template Uris enum

2020-11-17 Thread Gary Gregory
[Please take this constructively despite my string words] Arg. As much as I love Effective Java and admire Joshua Bloch, this one feels like a brain fart, and Block even concedes this pattern "may feel a bit unnatural", no kidding. This is an ENUM, but it does NOT enumerate ANYTHING. It is only us

Re: Log4j JSON layout template Uris enum

2020-11-17 Thread Carter Kozak
I'm a big fan fan of enum singletons. This case looks like an enum with no values for utility methods to avoid a private ctor, I haven't used enums this way myself. I think the trade-off is between avoiding having to write a private constructor to prevent extension, and the downside of enum stat

Re: Log4j JSON layout template Uris enum

2020-11-17 Thread Volkan Yazıcı
I use enums for singletons, which is the recommended way to create singletons in Effective Java by Joshua Bloch. Given I have used it in some other places as well and heard no complaints so far, I did not convert them to a final class with a private ctor. Should I? On Tue, Nov 17, 2020 at 9:25 PM

Fwd: Log4j JSON layout template Uris enum

2020-11-17 Thread Gary Gregory
Hi all, Why is this an enum and not a class? Gary