Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
donuts236724y@halfflat yes we get melee a hack they I think used reflection too get all the getters and setters and just called them but why?
I don't even get this rule, unused methods should be removed...
Who the fuck goes: "so I need to implement this new function, let me check got history to see if someone else implemented something like this before but had to remove it because code quality complained..." -
donuts236724y@nitwhiz I basically wrote a functional test to get that 60%. There code generates a report from another report a so I just wrote a test that reads in the first report...
And that should theoretically be near 100% coverage since the program was designed using it... -
In this day and age, there's really little reason to not use Lombok to generate all that boilerplate.
-
donuts236724y@AlmondSauce well what if some fields need custom getters or shouldn't have a getter/setter?
-
@donuts ...then surely you just annotate the fields where you want standard getters/setters? And if you're using GSON, wouldn't they need to be standard anyway?
-
donuts236724y@AlmondSauce for lomboq? I don't read much into the docs but just used @Data except that exposes all fields?
-
donuts236724yThe simplest way to get gson to serialize a field is to define a public getter, and vice versa, if not defined, it won't serialize the field.
I'm running into an issue with code coverage... I ran the analysis and it's penalizing unused getter, setters, equals, hashcode.
And the thing is I need those getters so GSON will serialize the fields...
How do you make coverage always > 80%?
Based on current analysis, I only get 60.
rant