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

Refactoring: misc part 3

    XMLWordPrintable

Details

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

    Description

      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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: