Skip to content

Commit

Permalink
=fmt fmt java code with javafmtAll
Browse files Browse the repository at this point in the history
  • Loading branch information
He-Pin committed Oct 21, 2023
1 parent d3a96e5 commit 8b2c7c8
Show file tree
Hide file tree
Showing 315 changed files with 54,880 additions and 38,516 deletions.
6 changes: 6 additions & 0 deletions .sbt-java-formatter.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ ignored-files = [
"StreamRefMessages.java",
//in tests
"ProtobufProtocol.java"
//formtat imports cause errors
"AggregatorTest.java",
"InteractionPatternsTest.java",
"ReplicatedShardingTest.java",
"ReplicatedAuctionExampleTest.java"
]

//ignore by packages:
Expand All @@ -32,4 +37,5 @@ ignored-packages = [
//in docs
"docs.ddata.protobuf.msg",
"docs.persistence.proto"

]
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,17 @@

// #manual-scheduling-simple

import java.time.Duration;
import org.apache.pekko.actor.testkit.typed.javadsl.LogCapturing;
import org.apache.pekko.actor.typed.Behavior;
import org.apache.pekko.actor.testkit.typed.javadsl.ManualTime;
import org.apache.pekko.actor.testkit.typed.javadsl.TestKitJunitResource;
import org.apache.pekko.actor.testkit.typed.javadsl.TestProbe;
import org.apache.pekko.actor.typed.Behavior;
import org.apache.pekko.actor.typed.javadsl.Behaviors;
import org.junit.ClassRule;
import org.junit.Rule;
import org.scalatestplus.junit.JUnitSuite;
import java.time.Duration;

import org.apache.pekko.actor.typed.javadsl.Behaviors;

import org.junit.Test;

import org.apache.pekko.actor.testkit.typed.javadsl.TestProbe;
import org.scalatestplus.junit.JUnitSuite;

public class ManualTimerExampleTest extends JUnitSuite {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@

package org.apache.pekko.actor.testkit.typed.javadsl;

import java.time.Duration;
import java.util.List;
import org.apache.pekko.actor.typed.ActorRef;
import org.apache.pekko.actor.typed.Props;
import org.apache.pekko.actor.typed.Scheduler;
import org.apache.pekko.actor.typed.javadsl.Behaviors;

import java.time.Duration;
import java.util.List;

public class ActorTestKitApiTest {

public void compileOnlyTestCase() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,19 @@

package org.apache.pekko.actor.testkit.typed.javadsl;

import static org.apache.pekko.Done.done;
import static org.junit.Assert.assertEquals;

import java.util.HashMap;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
import org.apache.pekko.Done;
import org.apache.pekko.actor.typed.javadsl.Behaviors;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
import org.scalatestplus.junit.JUnitSuite;

import java.util.HashMap;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;

import static org.apache.pekko.Done.done;
import static org.junit.Assert.assertEquals;

public class ActorTestKitTest extends JUnitSuite {

@ClassRule public static TestKitJunitResource testKit = new TestKitJunitResource();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@

package org.apache.pekko.actor.testkit.typed.javadsl;

import static org.junit.Assert.*;

import java.time.Duration;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.IntStream;
import org.apache.pekko.Done;
import org.apache.pekko.actor.testkit.typed.CapturedLogEvent;
import org.apache.pekko.actor.testkit.typed.Effect;
Expand All @@ -25,14 +32,6 @@
import org.scalatestplus.junit.JUnitSuite;
import org.slf4j.event.Level;

import java.time.Duration;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.IntStream;

import static org.junit.Assert.*;

public class BehaviorTestKitTest extends JUnitSuite {

public interface Command {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@

package org.apache.pekko.actor.testkit.typed.javadsl;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import java.util.Collections;
import java.util.Optional;
import org.apache.pekko.actor.testkit.typed.LoggingEvent;
import org.apache.pekko.actor.testkit.typed.TestException;
import org.junit.ClassRule;
Expand All @@ -21,12 +26,6 @@
import org.scalatestplus.junit.JUnitSuite;
import org.slf4j.event.Level;

import java.util.Collections;
import java.util.Optional;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

public class LoggingTestKitTest extends JUnitSuite {

@ClassRule public static TestKitJunitResource testKit = new TestKitJunitResource();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,18 @@

package org.apache.pekko.actor.testkit.typed.javadsl;

import static org.junit.Assert.*;

import java.time.Duration;
import java.util.Arrays;
import java.util.List;

import org.apache.pekko.actor.testkit.typed.scaladsl.TestProbeSpec;
import org.apache.pekko.actor.testkit.typed.scaladsl.TestProbeSpec.*;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
import org.scalatestplus.junit.JUnitSuite;

import static org.junit.Assert.*;

public class TestProbeTest extends JUnitSuite {

@ClassRule public static TestKitJunitResource testKit = new TestKitJunitResource();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,14 @@

package org.apache.pekko.actor;

import static org.junit.Assert.*;
import static java.util.stream.Collectors.toCollection;
import static org.junit.Assert.*;

import java.util.ArrayList;
import java.util.stream.IntStream;

import org.apache.pekko.japi.Creator;
import org.junit.Assert;
import org.junit.Test;

import org.apache.pekko.japi.Creator;

import org.scalatestplus.junit.JUnitSuite;

public class ActorCreationTest extends JUnitSuite {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,17 @@

package org.apache.pekko.actor;

import static org.junit.Assert.assertEquals;

import java.time.Duration;
import java.util.concurrent.CompletionStage;
import java.util.concurrent.TimeUnit;

import org.apache.pekko.testkit.PekkoJUnitActorSystemResource;
import org.apache.pekko.testkit.PekkoSpec;

import org.junit.ClassRule;
import org.junit.Test;
import org.scalatestplus.junit.JUnitSuite;

import static org.junit.Assert.assertEquals;

public class ActorSelectionTest extends JUnitSuite {

@ClassRule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,16 @@

package org.apache.pekko.actor;

import static java.util.concurrent.TimeUnit.SECONDS;
import static org.junit.Assert.assertFalse;

import java.util.concurrent.CompletionStage;
import org.apache.pekko.testkit.PekkoJUnitActorSystemResource;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.scalatestplus.junit.JUnitSuite;

import java.util.concurrent.CompletionStage;

import static java.util.concurrent.TimeUnit.SECONDS;
import static org.junit.Assert.assertFalse;

public class ActorSystemTest extends JUnitSuite {

@Rule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@

package org.apache.pekko.actor;

import org.junit.Test;
import org.scalatestplus.junit.JUnitSuite;
import static org.junit.Assert.assertEquals;

import java.util.Optional;

import static org.junit.Assert.assertEquals;
import org.junit.Test;
import org.scalatestplus.junit.JUnitSuite;

public class AddressTest extends JUnitSuite {

Expand Down
10 changes: 4 additions & 6 deletions actor-tests/src/test/java/org/apache/pekko/actor/JavaAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,27 @@

package org.apache.pekko.actor;

import static org.junit.Assert.*;

import java.util.Optional;
import org.apache.pekko.event.Logging;
import org.apache.pekko.event.Logging.LoggerInitialized;
import org.apache.pekko.japi.Creator;
import org.apache.pekko.japi.Pair;
import org.apache.pekko.japi.Util;
import org.apache.pekko.japi.tuple.Tuple22;
import org.apache.pekko.japi.tuple.Tuple4;
import org.apache.pekko.routing.GetRoutees;
import org.apache.pekko.routing.FromConfig;
import org.apache.pekko.routing.GetRoutees;
import org.apache.pekko.routing.NoRouter;
import org.apache.pekko.testkit.PekkoJUnitActorSystemResource;
import org.apache.pekko.testkit.PekkoSpec;
import org.apache.pekko.testkit.TestProbe;

import org.junit.ClassRule;
import org.junit.Test;
import org.scalatestplus.junit.JUnitSuite;
import scala.Option;

import java.util.Optional;

import static org.junit.Assert.*;

public class JavaAPI extends JUnitSuite {

@ClassRule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@

package org.apache.pekko.actor;

import static org.junit.Assert.*;

import com.typesafe.config.ConfigFactory;
import org.apache.pekko.testkit.PekkoJUnitActorSystemResource;
import org.junit.*;
import org.apache.pekko.testkit.PekkoSpec;
import com.typesafe.config.ConfigFactory;
import org.junit.*;
import org.scalatestplus.junit.JUnitSuite;

import static org.junit.Assert.*;

public class JavaExtension extends JUnitSuite {

static class TestExtensionId extends AbstractExtensionId<TestExtension>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

import org.apache.pekko.testkit.PekkoJUnitActorSystemResource;
import org.apache.pekko.testkit.TestProbe;

import org.junit.ClassRule;
import org.junit.Test;
import org.scalatestplus.junit.JUnitSuite;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@

package org.apache.pekko.actor.setup;

import org.junit.Test;
import org.scalatestplus.junit.JUnitSuite;
import static org.junit.Assert.*;

import java.util.Optional;

import static org.junit.Assert.*;
import org.junit.Test;
import org.scalatestplus.junit.JUnitSuite;

public class ActorSystemSetupTest extends JUnitSuite {

Expand Down
Loading

0 comments on commit 8b2c7c8

Please sign in to comment.