This caused a problem for me because we would write very lean code with low cyclomatic complexity and having these missed branches would screw up our code coverage numbers, causing us to miss our standards. I would just do it the old way, with the finally. I wish I knew about this @CleanUp. For some reason a lot of code i am writing nowadays does not have me messing with streams directly, but when it comes up again I will use this annotation.
Lombok Saved My Ass
21–30 of 60 posts
Re: Lombok Saved My Ass
#22While I can understand why somebody would want to use Lombok, this is actually very misguided. If you want to program in better language, just go and use better language. The most important strength of Java and basically the only reason it is being used is that the code is simple to understand (simplistic!), everything is easily trace-able and debuggable and that you get fantastic tools that know everything about cod…
Edit: The kotlin service was one internal service that I experimented with. Our other 17 production services were standard java spring.
Re: Lombok Saved My Ass
#23I was really hoping this was about the Indonesian island
Re: Lombok Saved My Ass
#24There is a problem with JaCoCo, a Java code coverage utility, and try-with-resources. It looks like the try-with-resources creates byte code branches that are unreachable. In the JaCoCo report the try-with-resources line shows up with 4 or 8 branches (I forget which) and most of them are not reachable. That is to say, no matter what kind of unit tests you create (essentially there are two, a test where the code throw…
This seems like a perverse criticism. Fix your code coverage analysis?
Re: Lombok Saved My Ass
#25OutputStream out = new BarOutputStream(); in.transferTo(out); if (out != null) ... Can someone explain how `out` could possibly be null here?
Re: Lombok Saved My Ass
#26Re: Lombok Saved My Ass
#27While I can understand why somebody would want to use Lombok, this is actually very misguided. If you want to program in better language, just go and use better language. The most important strength of Java and basically the only reason it is being used is that the code is simple to understand (simplistic!), everything is easily trace-able and debuggable and that you get fantastic tools that know everything about cod…
Re: Lombok Saved My Ass
#28I was really hoping this was about the Indonesian island