Skip to content

Commit

Permalink
Merge pull request #1615 from dilanSachi/isolate-caller
Browse files Browse the repository at this point in the history
[master] Remove unused variables & make caller isolated
  • Loading branch information
dilanSachi authored Jun 26, 2024
2 parents b4a2fbd + 977fba1 commit b7eac02
Show file tree
Hide file tree
Showing 120 changed files with 667 additions and 686 deletions.
20 changes: 10 additions & 10 deletions ballerina-tests/69_package_with_multiple_imports_pb.bal
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ public isolated client class packagingServiceClient {
}
}

public client class Hello3StreamingClient {
private grpc:StreamingClient sClient;
public isolated client class Hello3StreamingClient {
private final grpc:StreamingClient sClient;

isolated function init(grpc:StreamingClient sClient) {
self.sClient = sClient;
Expand Down Expand Up @@ -173,8 +173,8 @@ public class ResMessage2Stream {
}
}

public client class Hello4StreamingClient {
private grpc:StreamingClient sClient;
public isolated client class Hello4StreamingClient {
private final grpc:StreamingClient sClient;

isolated function init(grpc:StreamingClient sClient) {
self.sClient = sClient;
Expand Down Expand Up @@ -217,8 +217,8 @@ public client class Hello4StreamingClient {
}
}

public client class Hello5StreamingClient {
private grpc:StreamingClient sClient;
public isolated client class Hello5StreamingClient {
private final grpc:StreamingClient sClient;

isolated function init(grpc:StreamingClient sClient) {
self.sClient = sClient;
Expand Down Expand Up @@ -261,8 +261,8 @@ public client class Hello5StreamingClient {
}
}

public client class PackagingServiceRootMessageCaller {
private grpc:Caller caller;
public isolated client class PackagingServiceRootMessageCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down Expand Up @@ -293,8 +293,8 @@ public client class PackagingServiceRootMessageCaller {
}
}

public client class PackagingServiceResMessage2Caller {
private grpc:Caller caller;
public isolated client class PackagingServiceResMessage2Caller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down
12 changes: 6 additions & 6 deletions ballerina-tests/70_package_with_nested_modules_pb.bal
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ public isolated client class helloWorld70Client {
}
}

public client class HelloWorld70ClientStreamStreamingClient {
private grpc:StreamingClient sClient;
public isolated client class HelloWorld70ClientStreamStreamingClient {
private final grpc:StreamingClient sClient;

isolated function init(grpc:StreamingClient sClient) {
self.sClient = sClient;
Expand Down Expand Up @@ -167,8 +167,8 @@ public class ResMessageStream {
}
}

public client class HelloWorld70BidiStreamStreamingClient {
private grpc:StreamingClient sClient;
public isolated client class HelloWorld70BidiStreamStreamingClient {
private final grpc:StreamingClient sClient;

isolated function init(grpc:StreamingClient sClient) {
self.sClient = sClient;
Expand Down Expand Up @@ -211,8 +211,8 @@ public client class HelloWorld70BidiStreamStreamingClient {
}
}

public client class HelloWorld70ResMessageCaller {
private grpc:Caller caller;
public isolated client class HelloWorld70ResMessageCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down
12 changes: 6 additions & 6 deletions ballerina-tests/71_package_with_service_in_submodule_pb.bal
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ public isolated client class helloWorld71Client {
}
}

public client class HelloWorld71ClientStreamStreamingClient {
private grpc:StreamingClient sClient;
public isolated client class HelloWorld71ClientStreamStreamingClient {
private final grpc:StreamingClient sClient;

isolated function init(grpc:StreamingClient sClient) {
self.sClient = sClient;
Expand Down Expand Up @@ -142,8 +142,8 @@ public client class HelloWorld71ClientStreamStreamingClient {
}
}

public client class HelloWorld71BidiStreamStreamingClient {
private grpc:StreamingClient sClient;
public isolated client class HelloWorld71BidiStreamStreamingClient {
private final grpc:StreamingClient sClient;

isolated function init(grpc:StreamingClient sClient) {
self.sClient = sClient;
Expand Down Expand Up @@ -186,8 +186,8 @@ public client class HelloWorld71BidiStreamStreamingClient {
}
}

public client class HelloWorld71ResMessageCaller {
private grpc:Caller caller;
public isolated client class HelloWorld71ResMessageCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down
12 changes: 6 additions & 6 deletions ballerina-tests/modules/messageWithService/71_message_pb.bal
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ public isolated client class helloBallerina71Client {
}
}

public client class HelloStreamingClient {
private grpc:StreamingClient sClient;
public isolated client class HelloStreamingClient {
private final grpc:StreamingClient sClient;

isolated function init(grpc:StreamingClient sClient) {
self.sClient = sClient;
Expand Down Expand Up @@ -166,8 +166,8 @@ public class ResMessageStream {
}
}

public client class ByeStreamingClient {
private grpc:StreamingClient sClient;
public isolated client class ByeStreamingClient {
private final grpc:StreamingClient sClient;

isolated function init(grpc:StreamingClient sClient) {
self.sClient = sClient;
Expand Down Expand Up @@ -210,8 +210,8 @@ public client class ByeStreamingClient {
}
}

public client class HelloBallerina71ResMessageCaller {
private grpc:Caller caller;
public isolated client class HelloBallerina71ResMessageCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down
24 changes: 12 additions & 12 deletions ballerina-tests/tests/01_advanced_type_service_pb.bal
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ public isolated client class HelloWorldClient {
}
}

public client class HelloWorldStringCaller {
private grpc:Caller caller;
public isolated client class HelloWorldStringCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down Expand Up @@ -201,8 +201,8 @@ public client class HelloWorldStringCaller {
}
}

public client class HelloWorldNilCaller {
private grpc:Caller caller;
public isolated client class HelloWorldNilCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand All @@ -225,8 +225,8 @@ public client class HelloWorldNilCaller {
}
}

public client class HelloWorldPersonCaller {
private grpc:Caller caller;
public isolated client class HelloWorldPersonCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down Expand Up @@ -257,8 +257,8 @@ public client class HelloWorldPersonCaller {
}
}

public client class HelloWorldStockNamesCaller {
private grpc:Caller caller;
public isolated client class HelloWorldStockNamesCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down Expand Up @@ -289,8 +289,8 @@ public client class HelloWorldStockNamesCaller {
}
}

public client class HelloWorldStockQuotesCaller {
private grpc:Caller caller;
public isolated client class HelloWorldStockQuotesCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down Expand Up @@ -321,8 +321,8 @@ public client class HelloWorldStockQuotesCaller {
}
}

public client class HelloWorldStockQuoteCaller {
private grpc:Caller caller;
public isolated client class HelloWorldStockQuoteCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down
36 changes: 18 additions & 18 deletions ballerina-tests/tests/02_array_field_type_service_pb.bal
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ public isolated client class HelloWorld3Client {
}
}

public client class HelloWorld3FloatCaller {
private grpc:Caller caller;
public isolated client class HelloWorld3FloatCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down Expand Up @@ -284,8 +284,8 @@ public client class HelloWorld3FloatCaller {
}
}

public client class HelloWorld3IntCaller {
private grpc:Caller caller;
public isolated client class HelloWorld3IntCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down Expand Up @@ -316,8 +316,8 @@ public client class HelloWorld3IntCaller {
}
}

public client class HelloWorld3TestFloatCaller {
private grpc:Caller caller;
public isolated client class HelloWorld3TestFloatCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down Expand Up @@ -348,8 +348,8 @@ public client class HelloWorld3TestFloatCaller {
}
}

public client class HelloWorld3TestBooleanCaller {
private grpc:Caller caller;
public isolated client class HelloWorld3TestBooleanCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down Expand Up @@ -380,8 +380,8 @@ public client class HelloWorld3TestBooleanCaller {
}
}

public client class HelloWorld3BooleanCaller {
private grpc:Caller caller;
public isolated client class HelloWorld3BooleanCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down Expand Up @@ -412,8 +412,8 @@ public client class HelloWorld3BooleanCaller {
}
}

public client class HelloWorld3TestIntCaller {
private grpc:Caller caller;
public isolated client class HelloWorld3TestIntCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down Expand Up @@ -444,8 +444,8 @@ public client class HelloWorld3TestIntCaller {
}
}

public client class HelloWorld3StringCaller {
private grpc:Caller caller;
public isolated client class HelloWorld3StringCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down Expand Up @@ -476,8 +476,8 @@ public client class HelloWorld3StringCaller {
}
}

public client class HelloWorld3TestStructCaller {
private grpc:Caller caller;
public isolated client class HelloWorld3TestStructCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down Expand Up @@ -508,8 +508,8 @@ public client class HelloWorld3TestStructCaller {
}
}

public client class HelloWorld3TestStringCaller {
private grpc:Caller caller;
public isolated client class HelloWorld3TestStringCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public isolated client class ChatClient {
}
}

public client class ChatStreamingClient {
private grpc:StreamingClient sClient;
public isolated client class ChatStreamingClient {
private final grpc:StreamingClient sClient;

isolated function init(grpc:StreamingClient sClient) {
self.sClient = sClient;
Expand Down Expand Up @@ -77,8 +77,8 @@ public client class ChatStreamingClient {
}
}

public client class ChatStringCaller {
private grpc:Caller caller;
public isolated client class ChatStringCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down
8 changes: 4 additions & 4 deletions ballerina-tests/tests/04_client_streaming_service_pb.bal
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public isolated client class HelloWorld7Client {
}
}

public client class LotsOfGreetingsStreamingClient {
private grpc:StreamingClient sClient;
public isolated client class LotsOfGreetingsStreamingClient {
private final grpc:StreamingClient sClient;

isolated function init(grpc:StreamingClient sClient) {
self.sClient = sClient;
Expand Down Expand Up @@ -77,8 +77,8 @@ public client class LotsOfGreetingsStreamingClient {
}
}

public client class HelloWorld7StringCaller {
private grpc:Caller caller;
public isolated client class HelloWorld7StringCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down
8 changes: 4 additions & 4 deletions ballerina-tests/tests/05_invalid_resource_service_pb.bal
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ public isolated client class HelloWorld98Client {
}
}

public client class HelloWorld98IntCaller {
private grpc:Caller caller;
public isolated client class HelloWorld98IntCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down Expand Up @@ -118,8 +118,8 @@ public client class HelloWorld98IntCaller {
}
}

public client class HelloWorld98StringCaller {
private grpc:Caller caller;
public isolated client class HelloWorld98StringCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down
4 changes: 2 additions & 2 deletions ballerina-tests/tests/06_server_streaming_service_pb.bal
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public isolated client class HelloWorld45Client {
}
}

public client class HelloWorld45StringCaller {
private grpc:Caller caller;
public isolated client class HelloWorld45StringCaller {
private final grpc:Caller caller;

public isolated function init(grpc:Caller caller) {
self.caller = caller;
Expand Down
Loading

0 comments on commit b7eac02

Please sign in to comment.