From 556d16aad72be897868c42c7c8bf95f6fca090ba Mon Sep 17 00:00:00 2001 From: Dawid Weiss Date: Wed, 15 Dec 2021 09:55:37 +0100 Subject: [PATCH] Minor cleanups, plugin upgrades. --- CHANGES.txt | 5 ++--- build.gradle | 4 ++-- gradle/validation/check-environment.gradle | 2 +- gradle/validation/spotless.gradle | 8 ++++---- gradle/wrapper/gradle-wrapper.properties | 2 +- .../java/com/carrotsearch/hppc/sorting/QuickSort.java | 8 ++++++-- .../hppc/expectations/APIExpectationsTest.java | 4 ++-- versions.lock | 6 +++--- versions.props | 4 ++-- 9 files changed, 23 insertions(+), 20 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index aeaec10fb..558919410 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,6 @@ -[0.9.1-SNAPSHOT] +[0.9.1] +https://github.com/carrotsearch/hppc/releases/tag/0.9.1 ** New features and API changes @@ -15,8 +16,6 @@ GH-27: Added identity short circuit to existing equals methods. (Callum Galbreath). -** Bugs - [0.9.0] https://github.com/carrotsearch/hppc/releases/tag/0.9.0 diff --git a/build.gradle b/build.gradle index b687034cc..2efa6ddc6 100644 --- a/build.gradle +++ b/build.gradle @@ -1,9 +1,9 @@ plugins { id 'base' - id "com.palantir.consistent-versions" version '1.24.0' + id 'com.diffplug.spotless' version "5.17.1" apply false + id "com.palantir.consistent-versions" version "2.5.0" - id 'com.diffplug.gradle.spotless' version "4.5.1" apply false id "com.github.ben-manes.versions" version "0.28.0" id 'de.thetaphi.forbiddenapis' version '3.0.1' apply false diff --git a/gradle/validation/check-environment.gradle b/gradle/validation/check-environment.gradle index 4797ff370..9b9e9c290 100644 --- a/gradle/validation/check-environment.gradle +++ b/gradle/validation/check-environment.gradle @@ -5,7 +5,7 @@ import org.gradle.util.GradleVersion configure(rootProject) { ext { - expectedGradleVersion = '6.5.1' + expectedGradleVersion = '7.3' expectedJavaVersion = JavaVersion.VERSION_1_8 } diff --git a/gradle/validation/spotless.gradle b/gradle/validation/spotless.gradle index 18e43c0d1..5de146004 100644 --- a/gradle/validation/spotless.gradle +++ b/gradle/validation/spotless.gradle @@ -7,14 +7,14 @@ configure(rootProject) { subprojects { plugins.withType(JavaPlugin) { - project.apply plugin: 'com.diffplug.gradle.spotless' + project.apply plugin: 'com.diffplug.spotless' spotless { java { licenseHeaderFile licenseHeader lineEndings 'UNIX' endWithNewline() - googleJavaFormat('1.7') + googleJavaFormat('1.13.0') } } @@ -27,7 +27,7 @@ subprojects { } configure(project(":hppc-template-processor")) { - plugins.withId("com.diffplug.gradle.spotless") { + plugins.withId("com.diffplug.spotless") { spotless { java { // Exclude ANTLR-generated files. @@ -38,7 +38,7 @@ configure(project(":hppc-template-processor")) { } configure(project(":hppc")) { - plugins.withId("com.diffplug.gradle.spotless") { + plugins.withId("com.diffplug.spotless") { spotless { java { // Exclude templates and generated files, at least for now. diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ac33e9944..fbce071a3 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/hppc/src/main/java/com/carrotsearch/hppc/sorting/QuickSort.java b/hppc/src/main/java/com/carrotsearch/hppc/sorting/QuickSort.java index ccfe7308c..bbb48962d 100644 --- a/hppc/src/main/java/com/carrotsearch/hppc/sorting/QuickSort.java +++ b/hppc/src/main/java/com/carrotsearch/hppc/sorting/QuickSort.java @@ -93,8 +93,12 @@ public static void sort( int q = last; while (true) { int leftCmp, rightCmp; - while ((leftCmp = compare(++i, fromIndex, comparator)) < 0) ; - while ((rightCmp = compare(--j, fromIndex, comparator)) > 0) ; + while ((leftCmp = compare(++i, fromIndex, comparator)) < 0) { + // repeat + } + while ((rightCmp = compare(--j, fromIndex, comparator)) > 0) { + // repeat + } if (i >= j) { if (i == j && rightCmp == 0) { swap(i, p, swapper); diff --git a/hppc/src/test/java/com/carrotsearch/hppc/expectations/APIExpectationsTest.java b/hppc/src/test/java/com/carrotsearch/hppc/expectations/APIExpectationsTest.java index 818580ccf..1a6e69704 100644 --- a/hppc/src/test/java/com/carrotsearch/hppc/expectations/APIExpectationsTest.java +++ b/hppc/src/test/java/com/carrotsearch/hppc/expectations/APIExpectationsTest.java @@ -129,7 +129,7 @@ class IntegerIdentityList extends ObjectArrayList { protected boolean equals(Object k1, Object k2) { return k1 == k2; } - }; + } IntegerIdentityList l1 = new IntegerIdentityList(); IntegerIdentityList l2 = new IntegerIdentityList(); @@ -154,7 +154,7 @@ class IntegerIdentityDeque extends ObjectArrayDeque { protected boolean equals(Object k1, Object k2) { return k1 == k2; } - }; + } IntegerIdentityDeque l1 = new IntegerIdentityDeque(); IntegerIdentityDeque l2 = new IntegerIdentityDeque(); diff --git a/versions.lock b/versions.lock index 5e2f57535..2fc9fdf31 100644 --- a/versions.lock +++ b/versions.lock @@ -12,15 +12,15 @@ org.apache.velocity:velocity-engine-core:2.2 (1 constraints: a8041f2c) org.slf4j:slf4j-api:1.8.0-beta4 (4 constraints: 144e9e32) [Test dependencies] -com.carrotsearch.randomizedtesting:randomizedtesting-runner:2.7.8 (1 constraints: 13051236) +com.carrotsearch.randomizedtesting:randomizedtesting-runner:2.7.9 (1 constraints: 14051336) com.koloboke:koloboke-api-jdk8:1.0.0 (2 constraints: 871d9d62) com.koloboke:koloboke-impl-common-jdk8:1.0.0 (1 constraints: 690d3433) com.koloboke:koloboke-impl-jdk8:1.0.0 (1 constraints: 0305f035) it.unimi.dsi:fastutil:8.4.1 (1 constraints: 0f052036) -junit:junit:4.12 (1 constraints: 6419368e) +junit:junit:4.13.1 (1 constraints: c4198ec1) net.sf.jopt-simple:jopt-simple:4.6 (1 constraints: 610a91b7) org.apache.commons:commons-math3:3.2 (1 constraints: 5c0a8ab7) -org.assertj:assertj-core:3.16.1 (1 constraints: 3d05483b) +org.assertj:assertj-core:3.21.0 (1 constraints: 38053c3b) org.hamcrest:hamcrest-core:1.3 (1 constraints: cc05fe3f) org.openjdk.jmh:jmh-core:1.24 (5 constraints: 3847a3da) org.openjdk.jmh:jmh-generator-annprocess:1.24 (1 constraints: db04f730) diff --git a/versions.props b/versions.props index b94e338ae..32c92206c 100644 --- a/versions.props +++ b/versions.props @@ -2,7 +2,7 @@ org.antlr:*=4.8 org.apache.velocity:velocity-engine-core=2.2 com.carrotsearch.console:*=1.0.6 -com.carrotsearch.randomizedtesting:*=2.7.8 -org.assertj:*=3.16.1 +com.carrotsearch.randomizedtesting:*=2.7.9 +org.assertj:*=3.21.0 org.openjdk.jmh:*=1.24 \ No newline at end of file