[
https://issues.apache.org/jira/browse/OOZIE-2700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Peter Bacsko updated OOZIE-2700:
--------------------------------
Parent Issue: OOZIE-2889 (was: OOZIE-1770)
> OYA: Misc code cleanup
> ----------------------
>
> Key: OOZIE-2700
> URL: https://issues.apache.org/jira/browse/OOZIE-2700
> Project: Oozie
> Issue Type: Sub-task
> Reporter: Peter Bacsko
>
> In the scope of OYA, we have the opportunity to increase the code quality of
> Oozie.
> The following things could be improved:
> * Remove hard-coded, repeated strings and place them to static variables
> * Eliminate unnecessary {{@SuppressWarnings}} annotations
> * Proper usage of generics, eg. {{Class<?>}} instead of just {{Class}}
> * Replace deprecated method calls to something else, for example:
> ** {{DistributedCache.addCacheFile()}}
> ** {{DistributedCache.createSymlink()}}
> ** {{SequenceFile.Reader()}} (two deprecated constructors)
> * Remove unused imports
> * In general, we should look for compile time warnings and take appropriate
> actions to resolve them, if possible
> * Remove duplicated version definitions in POMs
> * Delete trailing white spaces
> * Check for lines which are longer than 132 chars
> * {{try-with-resources}} usage
> * Diamond operator usage
> * Inject collaborators into constructor
> * Get rid of {{static}} methods when they are not leaves (using collaborators
> inside)
> * Split responsibilities into separate (sometimes nested) classes using
> composition
> * Get rid of writable {{static}} {{Object}} instances and singletons
> * {{Preconditions.checkArgument()}}, {{Preconditions.checkState()}},
> {{Preconditions.checkNotNull()}} usage
> * Unit testing: use
> [*AssertJ*|http://joel-costigliola.github.io/assertj/assertj-core-quick-start.html]
> for fluent assertions
> * Unit testing: use
> [*{{Assume}}*|http://junit.sourceforge.net/javadoc/org/junit/Assume.html]
> * Unit testing: use {{@Rule}} {{ExpectedException}} and {{TemporaryFolder}}
> * Nice to have: Guice an an IoC framework
> * Nice to have: use SLF4J {{Logger}} instead of {{XLog}}
> * Nice to have: [*Proper unit
> testing*|http://misko.hevery.com/code-reviewers-guide]
> The list above is not exhaustive, so feel free to include ideas.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)