Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,31 @@ on:
- ea
- develop
pull_request:
types: [opened, synchronize, reopened]
types: [ opened, synchronize, reopened ]
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 11
distribution: temurin
java-version: 17
- name: Cache SonarCloud packages
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
Expand Down
11 changes: 6 additions & 5 deletions .mvn/wrapper/MavenWrapperDownloader.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import java.net.*;
import java.io.*;
import java.nio.channels.*;
Expand All @@ -25,7 +26,7 @@ public class MavenWrapperDownloader {
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";

/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
Expand Down Expand Up @@ -54,7 +55,7 @@ public static void main(String args[]) {
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
if (mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Expand All @@ -65,7 +66,7 @@ public static void main(String args[]) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
if (mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
Expand All @@ -76,8 +77,8 @@ public static void main(String args[]) {
System.out.println("- Downloading from: " + url);

File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
if (!outputFile.getParentFile().exists()) {
if (!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
Expand Down
20 changes: 10 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ jobs:
- arch: s390x
jdk: openjdk7 # target release on big-endian machine
install:
- 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
- echo "6a901bc0b713582a323481d5b41d0c289cbd6fbb265eefb4962080240fe59ff2 ibmjdk7.bin" | sha256sum -c -
- chmod +x ibmjdk7.bin
- echo "INSTALLER_UI=silent" > response.properties
- echo "USER_INSTALL_DIR=$PWD/ibmjdk7" >> response.properties
- echo "LICENSE_ACCEPTED=TRUE" >> response.properties
- ./ibmjdk7.bin -i silent -f response.properties
- export PATH="$PWD/ibmjdk7/bin:$PATH"
- export JAVA_HOME="$PWD/ibmjdk7"
- java -version
- 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
- echo "6a901bc0b713582a323481d5b41d0c289cbd6fbb265eefb4962080240fe59ff2 ibmjdk7.bin" | sha256sum -c -
- chmod +x ibmjdk7.bin
- echo "INSTALLER_UI=silent" > response.properties
- echo "USER_INSTALL_DIR=$PWD/ibmjdk7" >> response.properties
- echo "LICENSE_ACCEPTED=TRUE" >> response.properties
- ./ibmjdk7.bin -i silent -f response.properties
- export PATH="$PWD/ibmjdk7/bin:$PATH"
- export JAVA_HOME="$PWD/ibmjdk7"
- java -version

cache:
directories:
Expand Down
80 changes: 4 additions & 76 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<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">

<parent>
<parent>
<groupId>net.openhft</groupId>
<artifactId>java-parent-pom</artifactId>
<version>2026.0</version>
Expand Down Expand Up @@ -239,7 +239,7 @@
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-gitexe</artifactId>
<version>1.11.2</version> <!-- this version should be sync with the scmVersion of maven-release-plugin -->
<version>1.11.2</version> <!-- this version should be sync with the scmVersion of maven-release-plugin -->
</dependency>
</dependencies>
</plugin>
Expand All @@ -258,7 +258,7 @@
</configuration>
</plugin>

<plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
Expand Down Expand Up @@ -309,7 +309,7 @@
<properties>
<project.jdk.min-version>1.${project.target.release}</project.jdk.min-version>
<maven.bundle.plugin.version>3.5.1</maven.bundle.plugin.version>
<doclint />
<doclint/>
</properties>
</profile>
<profile>
Expand Down Expand Up @@ -381,77 +381,5 @@
</plugins>
</build>
</profile>
<profile>
<id>quality</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<configLocation>${checkstyle.config.location}</configLocation>
<failOnViolation>true</failOnViolation>
<logViolationsToConsole>true</logViolationsToConsole>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<violationSeverity>${checkstyle.violationSeverity}</violationSeverity>
</configuration>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>10.26.1</version>
</dependency>
<dependency>
<groupId>net.openhft</groupId>
<artifactId>chronicle-quality-rules</artifactId>
<version>1.27.0-SNAPSHOT</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<!-- SpotBugs 4.x line that requires Java 11+ -->
<version>4.9.8.1</version>
<configuration>
<effort>Max</effort>
<threshold>Low</threshold>
<includeTests>true</includeTests>
<failOnError>true</failOnError>
<!-- Shared SpotBugs filters from chronicle-quality-rules -->
<includeFilterFile>net/openhft/quality/spotbugs27/chronicle-spotbugs-include.xml</includeFilterFile>
<excludeFilterFile>net/openhft/quality/spotbugs27/chronicle-spotbugs-exclude.xml</excludeFilterFile>
</configuration>
<dependencies>
<dependency>
<groupId>net.openhft</groupId>
<artifactId>chronicle-quality-rules</artifactId>
<version>1.27.0-SNAPSHOT</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>spotbugs-main</id>
<!-- Run after compilation of main classes, before tests execute, and gate on findings -->
<phase>process-test-classes</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
8 changes: 5 additions & 3 deletions src/main/java-stub/java/lang/Math.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@

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

public class Math {
public static long multiplyHigh(long x, long y) { throw new UnsupportedOperationException(); }
public static long multiplyHigh(long x, long y) {
throw new UnsupportedOperationException();
}
}
23 changes: 15 additions & 8 deletions src/main/java-stub/sun/misc/Unsafe.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,29 @@

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

public final class Unsafe {
public native Object getObject( Object o, long offset);
public native int getInt( Object o, long offset);
public native Object getObject(Object o, long offset);

public native int getInt(Object o, long offset);

public native boolean getBoolean(Object o, long offset);
public native byte getByte( Object o, long offset);
public native short getShort( Object o, long offset);
public native char getChar( Object o, long offset);
public native long getLong( Object o, long offset);

public native byte getByte(Object o, long offset);

public native short getShort(Object o, long offset);

public native char getChar(Object o, long offset);

public native long getLong(Object o, long offset);

public native long objectFieldOffset(java.lang.reflect.Field f);

public native int arrayBaseOffset(Class arrayClass);
}
Loading
Loading