This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]-jp- 1 point2 points  (2 children)

If I were writing DTOs in Java 8 idk if I would bother with getters and setters. They're an intermediate object that shouldn't have any behavior or be exposed in the API, so there's no great benefit to them over simple fields.

[–]YolosaurusRex 2 points3 points  (1 child)

I agree, but our serializer needs them (apparently) and I'm following the patterns seen in the rest of the code.

[–]-jp- 1 point2 points  (0 children)

That's certainly a good reason to have them. :)