Skip to content
This repository was archived by the owner on May 4, 2019. It is now read-only.

Commit cd4cc25

Browse files
committed
Fix requestChannel generator
1 parent 0d577cf commit cd4cc25

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

core/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ dependencies {
99
compile 'com.google.protobuf:protobuf-java:3.5.0'
1010
compile 'com.google.protobuf:protobuf-java-util:3.5.0'
1111

12-
compile 'io.rsocket:rsocket-core:0.11.2'
13-
compile 'io.rsocket:rsocket-transport-netty:0.11.2'
12+
compile 'io.rsocket:rsocket-core:0.11.3'
13+
compile 'io.rsocket:rsocket-transport-netty:0.11.3'
1414
compile 'io.micrometer:micrometer-core:1.0.3'
1515
}
1616

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
group=io.netifi.proteus
2-
version=0.6.1
2+
version=0.6.2

gradle/java.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ dependencies {
5757
testCompile 'org.apache.logging.log4j:log4j-api:2.8.2'
5858
testCompile 'org.apache.logging.log4j:log4j-core:2.8.2'
5959
testCompile 'org.apache.logging.log4j:log4j-slf4j-impl:2.8.2'
60-
testCompile 'io.rsocket:rsocket-transport-netty:0.11.2'
61-
testCompile 'io.rsocket:rsocket-transport-local:0.11.2'
60+
testCompile 'io.rsocket:rsocket-transport-netty:0.11.3'
61+
testCompile 'io.rsocket:rsocket-transport-local:0.11.3'
6262
testCompile 'org.mockito:mockito-all:1.10.19'
6363
}
6464

protobuf-rpc/src/java_plugin/cpp/java_generator.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,14 +578,14 @@ static void PrintClient(const ServiceDescriptor* service,
578578
p->Indent();
579579
p->Print(
580580
*vars,
581-
"boolean once;\n\n"
581+
"private final $AtomicBoolean$ once = new $AtomicBoolean$(false);\n\n"
582582
"@$Override$\n"
583583
"public $Payload$ apply($MessageLite$ message) {\n");
584584
p->Indent();
585585
p->Print(
586586
*vars,
587587
"$ByteBuf$ data = serialize(message);\n"
588-
"if (!once) {\n");
588+
"if (once.compareAndSet(false, true)) {\n");
589589
p->Indent();
590590
p->Print(
591591
*vars,
@@ -1335,6 +1335,7 @@ void GenerateClient(const ServiceDescriptor* service,
13351335
vars["from"] = "from";
13361336
vars["Function"] = "java.util.function.Function";
13371337
vars["Supplier"] = "java.util.function.Supplier";
1338+
vars["AtomicBoolean"] = "java.util.concurrent.atomic.AtomicBoolean";
13381339
vars["Override"] = "java.lang.Override";
13391340
vars["Publisher"] = "org.reactivestreams.Publisher";
13401341
vars["Generated"] = "javax.annotation.Generated";

0 commit comments

Comments
 (0)