Skip to content

Commit 6e4bf71

Browse files
Oleh DokukaOlegDokuka
Oleh Dokuka
authored andcommitted
migrates from deprecated api, updates dependencies
Signed-off-by: Oleh Dokuka <[email protected]> Signed-off-by: Oleh Dokuka <[email protected]>
1 parent 37fc68c commit 6e4bf71

File tree

8 files changed

+336
-54
lines changed

8 files changed

+336
-54
lines changed

build.gradle

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ plugins {
1919
id 'me.champeau.jmh' version '0.6.6' apply false
2020
id 'io.spring.dependency-management' version '1.0.11.RELEASE' apply false
2121
id 'io.morethan.jmhreport' version '0.9.0' apply false
22-
id 'io.github.reyerizo.gradle.jcstress' version '0.8.11' apply false
22+
id 'io.github.reyerizo.gradle.jcstress' version '0.8.13' apply false
2323
id 'com.github.vlsi.gradle-extensions' version '1.76' apply false
2424
}
2525

@@ -33,19 +33,19 @@ subprojects {
3333
apply plugin: 'com.github.sherter.google-java-format'
3434
apply plugin: 'com.github.vlsi.gradle-extensions'
3535

36-
ext['reactor-bom.version'] = '2020.0.12'
37-
ext['logback.version'] = '1.2.3'
38-
ext['netty-bom.version'] = '4.1.70.Final'
39-
ext['netty-boringssl.version'] = '2.0.45.Final'
36+
ext['reactor-bom.version'] = '2020.0.17'
37+
ext['logback.version'] = '1.2.10'
38+
ext['netty-bom.version'] = '4.1.75.Final'
39+
ext['netty-boringssl.version'] = '2.0.51.Final'
4040
ext['hdrhistogram.version'] = '2.1.12'
4141
ext['mockito.version'] = '3.12.4'
42-
ext['slf4j.version'] = '1.7.30'
42+
ext['slf4j.version'] = '1.7.36'
4343
ext['jmh.version'] = '1.33'
4444
ext['junit.version'] = '5.8.1'
45-
ext['micrometer.version'] = '1.7.5'
46-
ext['assertj.version'] = '3.21.0'
45+
ext['micrometer.version'] = '1.8.4'
46+
ext['assertj.version'] = '3.22.0'
4747
ext['netflix.limits.version'] = '0.3.6'
48-
ext['bouncycastle-bcpkix.version'] = '1.68'
48+
ext['bouncycastle-bcpkix.version'] = '1.70'
4949
ext['awaitility.version'] = '4.1.1'
5050

5151
group = "io.rsocket"

rsocket-core/build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2018 the original author or authors.
2+
* Copyright 2015-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -42,11 +42,12 @@ dependencies {
4242

4343
jcstressImplementation(project(":rsocket-test"))
4444
jcstressImplementation "ch.qos.logback:logback-classic"
45+
jcstressImplementation 'io.projectreactor:reactor-test'
4546
}
4647

4748
jcstress {
4849
mode = 'quick' //quick, default, tough
49-
jcstressDependency = "org.openjdk.jcstress:jcstress-core:0.7"
50+
jcstressDependency = "org.openjdk.jcstress:jcstress-core:0.15"
5051
}
5152

5253
jar {

rsocket-core/src/jcstress/java/io/rsocket/core/StressSubscriber.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,11 @@ public void onError(Throwable throwable) {
224224
} else {
225225
GUARD.compareAndSet(this, Operation.ON_ERROR, null);
226226
}
227+
228+
if (done) {
229+
throw new IllegalStateException("Already done");
230+
}
231+
227232
error = throwable;
228233
done = true;
229234
q.offer(throwable);
@@ -241,6 +246,10 @@ public void onComplete() {
241246
} else {
242247
GUARD.compareAndSet(this, Operation.ON_COMPLETE, null);
243248
}
249+
if (done) {
250+
throw new IllegalStateException("Already done");
251+
}
252+
244253
done = true;
245254
ON_COMPLETE_CALLS.incrementAndGet(this);
246255

0 commit comments

Comments
 (0)