Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7902390

Refactoring: misc part 3

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • st4.0
    • st4.0
    • tools
    • None

      For easier code reading the following refactoring can be done:
      - 'equals()' expression replaceable by 'Objects.equals()' expression
      - Explicit type can be replaced with <>
      - Identical 'catch' branches in 'try' statement
      - Simplify catch blocks
      - 'try finally' replaceable with 'try' with resources,
      - Add t-w-r where applicable
      - update BaseWriter, Reader, Classpath, MultipleFileReader to be autocloseable
      - replace some simple while loops with foreach
      - 'if' replaceable with 'switch'
      - String concatenation as argument to 'StringBuilder.append()' call

            vrudomet Victor Rudometov
            vrudomet Victor Rudometov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: