Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.3
    • Component/s: None
    • Labels:
      None

      Description

      Type

      Replacement of tokens.

      Approach

      When the Boolean is used outside of an Optional, it is always possible to simply replace it with the proper comparison.
      We should make sure to correctly support when the boolean is negated.
      Inside an Optional could be supported as a second step, but seems like something that hardly ever occurs.

      Before

      if (B) { }
      if (!B) { }
      Optional.of(True()).orElse(null)
      

      After

      if (Boolean.TRUE.equals(B)) { }
      if (Boolean.FALSE.equals(B)) { }
      Optional.of(True()).orElse(null) // Not replaced
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              quentin.jaquier Quentin Jaquier
              Reporter:
              quentin.jaquier Quentin Jaquier
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: