diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 772055367d..8bc1f388a0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,8 @@ env: jobs: build: name: Test and publish a snapshot + env: + HAS_SECRETS: ${{ secrets.SONATYPE_PASSWORD != '' }} strategy: matrix: os: [ubuntu-latest] diff --git a/library-impl/src/main/scala/special/collection/Helpers.scala b/library-impl/src/main/scala/special/collection/Helpers.scala index 9f131b3f54..e4a4d93ea5 100644 --- a/library-impl/src/main/scala/special/collection/Helpers.scala +++ b/library-impl/src/main/scala/special/collection/Helpers.scala @@ -27,7 +27,11 @@ object Helpers { var nValues = 0 while (i < arr.length) { val (key, value) = m(arr(i)) - val pos = keyPositions.getOrDefault(key, 0) + val pos = { + val p: Integer = keyPositions.get(key) + if (p == null) 0 else p.intValue() + } + if (pos == 0) { keyPositions.put(key, nValues + 1) keys += key