Skip to content

cleanup the code #367

@xzel23

Description

@xzel23

I will collect several PRs here since there are many places where the code can be simplified and putting all in a single PR will be hard to review.

  1. resource handling: use try-with resources to reduce complexity and handle corner cases correctly; don't re-implement JDK functionality
  2. remove unnecessary explicit boxing and unboxing
  3. simplify operations on collections, for example use Map.putIfAbsent()/computeIfAbsent() and others
  4. collapse Exceptions with the same catch clauses
  5. replace StringBuffer with StringBuilder

Please keep this one open for the time being, I will provide iterative PRs.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions