Skip to content

Commit 0c68719

Browse files
authored
7903355: JMH: Drop support for JDK 7
1 parent 0cffac9 commit 0c68719

File tree

59 files changed

+127
-216
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+127
-216
lines changed

.github/workflows/pre-integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ${{ matrix.os }}
1717
strategy:
1818
matrix:
19-
java: [7, 8, 11, 17, 19-ea]
19+
java: [8, 11, 17, 19-ea]
2020
os: [ubuntu-20.04, windows-2022, macos-11]
2121
profile: [default, reflection, asm]
2222
fail-fast: false

jmh-core-benchmarks/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,6 @@ questions.
6666
<plugin>
6767
<groupId>org.apache.maven.plugins</groupId>
6868
<artifactId>maven-compiler-plugin</artifactId>
69-
<configuration>
70-
<compilerVersion>1.7</compilerVersion>
71-
<source>1.7</source>
72-
<target>1.7</target>
73-
</configuration>
7469
</plugin>
7570
<plugin>
7671
<groupId>org.apache.maven.plugins</groupId>

jmh-core-benchmarks/src/main/java/org/openjdk/jmh/benchmarks/BlackholePipelinePayloadBench.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void prepare() {
7171
longs[c] = c;
7272
doubles[c] = c;
7373
objects[c] = (double) c;
74-
arrays[c] = new Double[]{Double.valueOf(c)};
74+
arrays[c] = new Double[]{(double) c};
7575
}
7676
}
7777

jmh-core-ct/pom.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,6 @@ questions.
102102
<groupId>org.apache.maven.plugins</groupId>
103103
<artifactId>maven-compiler-plugin</artifactId>
104104
<configuration>
105-
<compilerVersion>1.7</compilerVersion>
106-
<source>1.7</source>
107-
<target>1.7</target>
108105
<compilerArgument>-proc:none</compilerArgument>
109106
</configuration>
110107
</plugin>

jmh-core-it/pom.xml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,6 @@ questions.
120120
<plugin>
121121
<groupId>org.apache.maven.plugins</groupId>
122122
<artifactId>maven-compiler-plugin</artifactId>
123-
<configuration>
124-
<compilerVersion>1.7</compilerVersion>
125-
<source>1.7</source>
126-
<target>1.7</target>
127-
</configuration>
128123
</plugin>
129124
</plugins>
130125
</build>
@@ -148,9 +143,6 @@ questions.
148143
<groupId>org.apache.maven.plugins</groupId>
149144
<artifactId>maven-compiler-plugin</artifactId>
150145
<configuration>
151-
<compilerVersion>1.7</compilerVersion>
152-
<source>1.7</source>
153-
<target>1.7</target>
154146
<compilerArgument>-proc:none</compilerArgument>
155147
</configuration>
156148
<executions>
@@ -235,9 +227,6 @@ questions.
235227
<groupId>org.apache.maven.plugins</groupId>
236228
<artifactId>maven-compiler-plugin</artifactId>
237229
<configuration>
238-
<compilerVersion>1.7</compilerVersion>
239-
<source>1.7</source>
240-
<target>1.7</target>
241230
<compilerArgument>-proc:none</compilerArgument>
242231
</configuration>
243232
<executions>

jmh-core-it/src/test/java/org/openjdk/jmh/it/asymm/ExactThreadCountTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757
@Fork(1)
5858
public class ExactThreadCountTest {
5959

60-
private final Set<Thread> test1threads = Collections.synchronizedSet(new HashSet<Thread>());
61-
private final Set<Thread> test2threads = Collections.synchronizedSet(new HashSet<Thread>());
60+
private final Set<Thread> test1threads = Collections.synchronizedSet(new HashSet<>());
61+
private final Set<Thread> test2threads = Collections.synchronizedSet(new HashSet<>());
6262

6363
@Setup(Level.Iteration)
6464
public void setup() {

jmh-core-it/src/test/java/org/openjdk/jmh/it/asymm/Zero1ThreadCountTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
@Fork(1)
5656
public class Zero1ThreadCountTest {
5757

58-
private final Set<Thread> test1threads = Collections.synchronizedSet(new HashSet<Thread>());
59-
private final Set<Thread> test2threads = Collections.synchronizedSet(new HashSet<Thread>());
58+
private final Set<Thread> test1threads = Collections.synchronizedSet(new HashSet<>());
59+
private final Set<Thread> test2threads = Collections.synchronizedSet(new HashSet<>());
6060

6161
@TearDown
6262
public void check() {

jmh-core-it/src/test/java/org/openjdk/jmh/it/asymm/Zero2ThreadCountTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
@Fork(1)
5656
public class Zero2ThreadCountTest {
5757

58-
private final Set<Thread> test1threads = Collections.synchronizedSet(new HashSet<Thread>());
59-
private final Set<Thread> test2threads = Collections.synchronizedSet(new HashSet<Thread>());
58+
private final Set<Thread> test1threads = Collections.synchronizedSet(new HashSet<>());
59+
private final Set<Thread> test2threads = Collections.synchronizedSet(new HashSet<>());
6060

6161
@TearDown
6262
public void check() {

jmh-core-it/src/test/java/org/openjdk/jmh/it/errors/ForkedStuckShutdownHookTest.java

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,13 @@ public class ForkedStuckShutdownHookTest {
4444
@Setup
4545
public void setup() {
4646
Runtime.getRuntime().addShutdownHook(
47-
new Thread() {
48-
@Override
49-
public void run() {
50-
try {
51-
TimeUnit.DAYS.sleep(1);
52-
} catch (InterruptedException e) {
53-
e.printStackTrace();
54-
}
47+
new Thread(() -> {
48+
try {
49+
TimeUnit.DAYS.sleep(1);
50+
} catch (InterruptedException e) {
51+
e.printStackTrace();
5552
}
56-
}
53+
})
5754
);
5855
}
5956

jmh-core-it/src/test/java/org/openjdk/jmh/it/errors/ForkedStuckThreadTest.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,11 @@ public class ForkedStuckThreadTest {
4343

4444
@Setup
4545
public void setup() {
46-
Thread t = new Thread(new Runnable() {
47-
@Override
48-
public void run() {
49-
try {
50-
TimeUnit.DAYS.sleep(1);
51-
} catch (InterruptedException e) {
52-
e.printStackTrace();
53-
}
46+
Thread t = new Thread(() -> {
47+
try {
48+
TimeUnit.DAYS.sleep(1);
49+
} catch (InterruptedException e) {
50+
e.printStackTrace();
5451
}
5552
});
5653
t.setDaemon(false);

0 commit comments

Comments
 (0)