Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-10685 reduce overall usage of (shaded) Guava
  3. OAK-11239

Remove usage of Guava newArrayList(vargargs) in test classes

    XMLWordPrintableJSON

Details

    • Technical task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.72.0
    • test
    • None

    Description

      I'm separating this from the overall removal, because:

      • there are several approaches (List.of, Arrays.asList, new Arraylist()), and for test cases they are easy to pick
      • many of the uses are indeed in test cases because certain hardwired kinds of lists are tested (for instace, for test setup)

      Approach:

      • replace all of them by List.of
      • change to Arrays.asList when failure due to missing support of `null`
      • change to new ArrayList when failure due to immutability

      This keeps the changes in tests as readable as possible,

      Attachments

        Issue Links

          Activity

            People

              reschke Julian Reschke
              reschke Julian Reschke
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: