Skip to content

Commit

Permalink
Apply formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
bresciamattia authored and github-actions[bot] committed May 6, 2024
1 parent e8e2aa7 commit 3a663e4
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright © 2017-2024 factcast.org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.factcast.client.grpc;

import io.grpc.Channel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright © 2017-2024 factcast.org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.factcast.client.grpc;

import io.grpc.Channel;
Expand All @@ -8,7 +23,8 @@ public class FactCastGrpcStubsFactoryImpl implements FactCastGrpcStubsFactory {

@NonNull
@Override
public RemoteFactStoreGrpc.RemoteFactStoreBlockingStub createBlockingStub(@NonNull Channel channel) {
public RemoteFactStoreGrpc.RemoteFactStoreBlockingStub createBlockingStub(
@NonNull Channel channel) {
return RemoteFactStoreGrpc.newBlockingStub(channel);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,12 @@ public GrpcFactStore(
@NonNull @Value("${grpc.client.factstore.credentials:#{null}}") Optional<String> credentials,
@NonNull FactCastGrpcClientProperties properties,
@Nullable String clientId) {
this(channelFactory.createChannel(CHANNEL_NAME), stubsFactory, credentials, properties, clientId);
this(
channelFactory.createChannel(CHANNEL_NAME),
stubsFactory,
credentials,
properties,
clientId);
}

@Generated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,8 @@ void testNewCredentials() {
props.setUser("foo");
props.setPassword("bar");

GrpcFactStore uutNewCredentials = new GrpcFactStore(channel, stubsFactory, Optional.empty(), props, "foo");
GrpcFactStore uutNewCredentials =
new GrpcFactStore(channel, stubsFactory, Optional.empty(), props, "foo");
uutNewCredentials.initializeIfNecessary();

verify(blockingStub).withCallCredentials(any());
Expand Down Expand Up @@ -670,7 +671,9 @@ void testAddClientVersionToMeta() {
@Test
void testAddClientIdToMetaDoesNotUseNull() {
Metadata meta = mock(Metadata.class);
uut = new GrpcFactStore(mock(Channel.class), mock(FactCastGrpcStubsFactory.class), Optional.of("foo:bar"));
uut =
new GrpcFactStore(
mock(Channel.class), mock(FactCastGrpcStubsFactory.class), Optional.of("foo:bar"));

uut.addClientIdTo(meta);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import net.devh.boot.grpc.client.channelfactory.GrpcChannelConfigurer;
import net.devh.boot.grpc.client.channelfactory.GrpcChannelFactory;
import org.factcast.client.grpc.FactCastGrpcClientProperties;
import org.factcast.client.grpc.FactCastGrpcStubsFactory;
import org.factcast.client.grpc.FactCastGrpcStubsFactoryImpl;
import org.factcast.client.grpc.GrpcFactStore;
import org.factcast.core.store.FactStore;
Expand Down

0 comments on commit 3a663e4

Please sign in to comment.