Skip to content

Commit 44f5e8c

Browse files
Revert "Modernize build tooling and tuple string hashing support (#99)" (#118)
This reverts commit 1f36365.
1 parent 1f36365 commit 44f5e8c

40 files changed

Lines changed: 2771 additions & 2753 deletions

.github/workflows/build.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,27 @@ on:
55
- ea
66
- develop
77
pull_request:
8-
types: [ opened, synchronize, reopened ]
9-
env:
10-
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
11-
8+
types: [opened, synchronize, reopened]
129
jobs:
1310
build:
1411
name: Build
1512
runs-on: ubuntu-latest
1613
steps:
17-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@v2
1815
with:
1916
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
20-
- name: Set up JDK 17
21-
uses: actions/setup-java@v4
17+
- name: Set up JDK 11
18+
uses: actions/setup-java@v1
2219
with:
23-
distribution: temurin
24-
java-version: 17
20+
java-version: 11
2521
- name: Cache SonarCloud packages
26-
uses: actions/cache@v4
22+
uses: actions/cache@v1
2723
with:
2824
path: ~/.sonar/cache
2925
key: ${{ runner.os }}-sonar
3026
restore-keys: ${{ runner.os }}-sonar
3127
- name: Cache Maven packages
32-
uses: actions/cache@v4
28+
uses: actions/cache@v1
3329
with:
3430
path: ~/.m2
3531
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}

.mvn/wrapper/MavenWrapperDownloader.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
1716
import java.net.*;
1817
import java.io.*;
1918
import java.nio.channels.*;
@@ -26,7 +25,7 @@ public class MavenWrapperDownloader {
2625
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
2726
*/
2827
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
29-
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
28+
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
3029

3130
/**
3231
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
@@ -55,7 +54,7 @@ public static void main(String args[]) {
5554
// wrapperUrl parameter.
5655
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
5756
String url = DEFAULT_DOWNLOAD_URL;
58-
if (mavenWrapperPropertyFile.exists()) {
57+
if(mavenWrapperPropertyFile.exists()) {
5958
FileInputStream mavenWrapperPropertyFileInputStream = null;
6059
try {
6160
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
@@ -66,7 +65,7 @@ public static void main(String args[]) {
6665
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
6766
} finally {
6867
try {
69-
if (mavenWrapperPropertyFileInputStream != null) {
68+
if(mavenWrapperPropertyFileInputStream != null) {
7069
mavenWrapperPropertyFileInputStream.close();
7170
}
7271
} catch (IOException e) {
@@ -77,8 +76,8 @@ public static void main(String args[]) {
7776
System.out.println("- Downloading from: " + url);
7877

7978
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
80-
if (!outputFile.getParentFile().exists()) {
81-
if (!outputFile.getParentFile().mkdirs()) {
79+
if(!outputFile.getParentFile().exists()) {
80+
if(!outputFile.getParentFile().mkdirs()) {
8281
System.out.println(
8382
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
8483
}

.travis.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@ jobs:
3232
- arch: s390x
3333
jdk: openjdk7 # target release on big-endian machine
3434
install:
35-
- wget -O ibmjdk7.bin -q -T 10 -t 5 https://public.dhe.ibm.com/ibmdl/export/pub/systems/cloud/runtimes/java/7.1.4.85/linux/s390x/ibm-java-sdk-7.1-4.85-s390x-archive.bin
36-
- echo "6a901bc0b713582a323481d5b41d0c289cbd6fbb265eefb4962080240fe59ff2 ibmjdk7.bin" | sha256sum -c -
37-
- chmod +x ibmjdk7.bin
38-
- echo "INSTALLER_UI=silent" > response.properties
39-
- echo "USER_INSTALL_DIR=$PWD/ibmjdk7" >> response.properties
40-
- echo "LICENSE_ACCEPTED=TRUE" >> response.properties
41-
- ./ibmjdk7.bin -i silent -f response.properties
42-
- export PATH="$PWD/ibmjdk7/bin:$PATH"
43-
- export JAVA_HOME="$PWD/ibmjdk7"
44-
- java -version
35+
- wget -O ibmjdk7.bin -q -T 10 -t 5 https://public.dhe.ibm.com/ibmdl/export/pub/systems/cloud/runtimes/java/7.1.4.85/linux/s390x/ibm-java-sdk-7.1-4.85-s390x-archive.bin
36+
- echo "6a901bc0b713582a323481d5b41d0c289cbd6fbb265eefb4962080240fe59ff2 ibmjdk7.bin" | sha256sum -c -
37+
- chmod +x ibmjdk7.bin
38+
- echo "INSTALLER_UI=silent" > response.properties
39+
- echo "USER_INSTALL_DIR=$PWD/ibmjdk7" >> response.properties
40+
- echo "LICENSE_ACCEPTED=TRUE" >> response.properties
41+
- ./ibmjdk7.bin -i silent -f response.properties
42+
- export PATH="$PWD/ibmjdk7/bin:$PATH"
43+
- export JAVA_HOME="$PWD/ibmjdk7"
44+
- java -version
4545

4646
cache:
4747
directories:

pom.xml

Lines changed: 76 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
99

10-
<parent>
10+
<parent>
1111
<groupId>net.openhft</groupId>
1212
<artifactId>java-parent-pom</artifactId>
1313
<version>2026.0</version>
@@ -239,7 +239,7 @@
239239
<dependency>
240240
<groupId>org.apache.maven.scm</groupId>
241241
<artifactId>maven-scm-provider-gitexe</artifactId>
242-
<version>1.11.2</version> <!-- this version should be sync with the scmVersion of maven-release-plugin -->
242+
<version>1.11.2</version> <!-- this version should be sync with the scmVersion of maven-release-plugin -->
243243
</dependency>
244244
</dependencies>
245245
</plugin>
@@ -258,7 +258,7 @@
258258
</configuration>
259259
</plugin>
260260

261-
<plugin>
261+
<plugin>
262262
<groupId>org.apache.felix</groupId>
263263
<artifactId>maven-bundle-plugin</artifactId>
264264
<extensions>true</extensions>
@@ -309,7 +309,7 @@
309309
<properties>
310310
<project.jdk.min-version>1.${project.target.release}</project.jdk.min-version>
311311
<maven.bundle.plugin.version>3.5.1</maven.bundle.plugin.version>
312-
<doclint/>
312+
<doclint />
313313
</properties>
314314
</profile>
315315
<profile>
@@ -381,5 +381,77 @@
381381
</plugins>
382382
</build>
383383
</profile>
384+
<profile>
385+
<id>quality</id>
386+
<build>
387+
<plugins>
388+
<plugin>
389+
<groupId>org.apache.maven.plugins</groupId>
390+
<artifactId>maven-checkstyle-plugin</artifactId>
391+
<version>3.6.0</version>
392+
<executions>
393+
<execution>
394+
<id>validate</id>
395+
<phase>validate</phase>
396+
<goals>
397+
<goal>check</goal>
398+
</goals>
399+
</execution>
400+
</executions>
401+
<configuration>
402+
<configLocation>${checkstyle.config.location}</configLocation>
403+
<failOnViolation>true</failOnViolation>
404+
<logViolationsToConsole>true</logViolationsToConsole>
405+
<includeTestSourceDirectory>true</includeTestSourceDirectory>
406+
<violationSeverity>${checkstyle.violationSeverity}</violationSeverity>
407+
</configuration>
408+
<dependencies>
409+
<dependency>
410+
<groupId>com.puppycrawl.tools</groupId>
411+
<artifactId>checkstyle</artifactId>
412+
<version>10.26.1</version>
413+
</dependency>
414+
<dependency>
415+
<groupId>net.openhft</groupId>
416+
<artifactId>chronicle-quality-rules</artifactId>
417+
<version>1.27.0-SNAPSHOT</version>
418+
</dependency>
419+
</dependencies>
420+
</plugin>
421+
<plugin>
422+
<groupId>com.github.spotbugs</groupId>
423+
<artifactId>spotbugs-maven-plugin</artifactId>
424+
<!-- SpotBugs 4.x line that requires Java 11+ -->
425+
<version>4.9.8.1</version>
426+
<configuration>
427+
<effort>Max</effort>
428+
<threshold>Low</threshold>
429+
<includeTests>true</includeTests>
430+
<failOnError>true</failOnError>
431+
<!-- Shared SpotBugs filters from chronicle-quality-rules -->
432+
<includeFilterFile>net/openhft/quality/spotbugs27/chronicle-spotbugs-include.xml</includeFilterFile>
433+
<excludeFilterFile>net/openhft/quality/spotbugs27/chronicle-spotbugs-exclude.xml</excludeFilterFile>
434+
</configuration>
435+
<dependencies>
436+
<dependency>
437+
<groupId>net.openhft</groupId>
438+
<artifactId>chronicle-quality-rules</artifactId>
439+
<version>1.27.0-SNAPSHOT</version>
440+
</dependency>
441+
</dependencies>
442+
<executions>
443+
<execution>
444+
<id>spotbugs-main</id>
445+
<!-- Run after compilation of main classes, before tests execute, and gate on findings -->
446+
<phase>process-test-classes</phase>
447+
<goals>
448+
<goal>check</goal>
449+
</goals>
450+
</execution>
451+
</executions>
452+
</plugin>
453+
</plugins>
454+
</build>
455+
</profile>
384456
</profiles>
385457
</project>

src/main/java-stub/java/lang/Math.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@
55

66
/**
77
* Stub for JDK internal ckass java.lang.Math.
8-
* <p>
8+
*
99
* - When crossing compiling for Java SE 7 and 8, this stub class can be used for detecting
10-
* Math#multiplyHigh() method at runtime.
10+
* Math#multiplyHigh() method at runtime.
1111
* - Only used methods are exported.
1212
* - In test and production runtime, the real class is loaded from boot classpath.
1313
*/
1414

1515
public class Math {
16-
public static long multiplyHigh(long x, long y) {
17-
throw new UnsupportedOperationException();
18-
}
16+
public static long multiplyHigh(long x, long y) { throw new UnsupportedOperationException(); }
1917
}

src/main/java-stub/sun/misc/Unsafe.java

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,22 @@
55

66
/**
77
* Stub for JDK internal ckass sun.misc.Unsafe.
8-
* <p>
8+
*
99
* - When crossing compiling for Java SE 7 and 8, this stub class can bypass compiler sun-api
10-
* warnings.
10+
* warnings.
1111
* - Only used methods are exported.
1212
* - In test and production runtime, the real class is loaded from boot classpath.
1313
*/
1414

1515
public final class Unsafe {
16-
public native Object getObject(Object o, long offset);
17-
18-
public native int getInt(Object o, long offset);
19-
16+
public native Object getObject( Object o, long offset);
17+
public native int getInt( Object o, long offset);
2018
public native boolean getBoolean(Object o, long offset);
21-
22-
public native byte getByte(Object o, long offset);
23-
24-
public native short getShort(Object o, long offset);
25-
26-
public native char getChar(Object o, long offset);
27-
28-
public native long getLong(Object o, long offset);
19+
public native byte getByte( Object o, long offset);
20+
public native short getShort( Object o, long offset);
21+
public native char getChar( Object o, long offset);
22+
public native long getLong( Object o, long offset);
2923

3024
public native long objectFieldOffset(java.lang.reflect.Field f);
31-
3225
public native int arrayBaseOffset(Class arrayClass);
3326
}

0 commit comments

Comments
 (0)