Skip to content

Conversation

@alexyush
Copy link

No description provided.

@IharYudziankou
Copy link

What must be refactored

  • Never throw NullPointerException. More than, never catch it. Any null check should be processed manually or using e.g. Guava libraries
  • Use Logger, e.g. Slf4j
  • Move static resources to *.properties files (e.g. URL)
  • Avoid using System.out.println(). See bullet about Logger

What is better to refactor

  • Add javadocs. It makes easy to understand logic
  • Extract version of dependencies to properties in pom.xml
  • Use else-if instead of sequence of if
  • In classes firstly should be declared fields, then constructors, then public methods, then private. It is sometimes allowed to mix private and public methods, but common way is as described.
  • Do you really need empty default constructors ?
  • Add final modificator to method's parameters and local variables
  • Java 7 allows multiple exception handling in catch blok
  • Avoid 'Magic Numbers'

What possibly can be updated (Colleagues please correct me if I were wrong)

  • Use the same pattern of parameters naming (e.g. record and rec in RecordDao)
  • Prefer foreach instead while and Iterator

pom.xml Outdated

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure that builds complete successfully?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants