Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-5845 Search and fix minor errors and typos
  3. TRUNK-5941

Lamdbas containing only one statement should not nest this statement in a block

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Could
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Core 2.4.0
    • Component/s: None
    • Labels:
    • Complexity:
      Low

      Description

      Following https://wiki.openmrs.org/display/docs/Java+Conventions

      Java 8 lambdas should only be used for short, easily understood blocks of code and should not be wrapped in curly braces unless absolutely necessary.

      First case:

      Second case:

      Third case:

      Fourth case:

      Fifth case:

      Problem:
      Useless curly braces around a statement.

      Solution:
      Remove it.

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              miirochristopher Christopher Miiro
              Reporter:
              sacull Lukasz Debicki
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: