Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sbt-java-formatter to 0.8.0 #311

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Scala Steward: Reformat with sbt-java-formatter 0.8.0
86a432fc79a609f936832a08bf5efb85690174f9
4 changes: 2 additions & 2 deletions chapter02/src/main/java/AskActorWithJava8.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
*
*/

import static akka.pattern.Patterns.ask;

import akka.actor.AbstractActor;
import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.actor.Props;
import akka.japi.Creator;

import java.time.Duration;
import java.util.concurrent.CompletionStage;
import static akka.pattern.Patterns.ask;

public class AskActorWithJava8 {
public static class Request {
Expand Down
3 changes: 1 addition & 2 deletions chapter02/src/main/java/ParallelExecutionWithJavaFuture.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
*
*/

import reactivedesignpatterns.NamedPoolThreadFactory;

import java.util.concurrent.*;
import reactivedesignpatterns.NamedPoolThreadFactory;

public class ParallelExecutionWithJavaFuture {
public static class ReplyA {}
Expand Down
2 changes: 1 addition & 1 deletion chapter03/src/main/java/chapter03/IntSeeding.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

package chapter03;

import java.util.concurrent.ThreadLocalRandom;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.concurrent.ThreadLocalRandom;

// 代码清单3-7
public class IntSeeding {
Expand Down
7 changes: 3 additions & 4 deletions chapter14/src/main/java/chapter14/ComplexCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@
import akka.stream.javadsl.RunnableGraph;
import akka.stream.javadsl.Sink;
import akka.stream.javadsl.Source;

import javax.script.Invocable;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import java.util.Collection;
import java.util.Collections;
import java.util.Set;
import java.util.concurrent.CompletionStage;
import java.util.stream.Stream;
import javax.script.Invocable;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;

public interface ComplexCommand {

Expand Down
8 changes: 4 additions & 4 deletions chapter14/src/main/java/chapter14/ManagedBlocking.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@

package chapter14;

import static java.util.concurrent.TimeUnit.SECONDS;

import akka.actor.AbstractActor;
import akka.actor.ActorRef;
import akka.japi.pf.ReceiveBuilder;
import reactivedesignpatterns.NamedPoolThreadFactory;

import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.ResultSet;
import java.util.LinkedList;
Expand All @@ -21,7 +20,8 @@
import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.ThreadPoolExecutor;
import static java.util.concurrent.TimeUnit.SECONDS;
import javax.sql.DataSource;
import reactivedesignpatterns.NamedPoolThreadFactory;

public interface ManagedBlocking {

Expand Down
8 changes: 4 additions & 4 deletions chapter14/src/main/java/chapter14/ResourceEncapsulation.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@
import com.amazonaws.services.ec2.AmazonEC2Client;
import com.amazonaws.services.ec2.AmazonEC2ClientBuilder;
import com.amazonaws.services.ec2.model.*;
import scala.PartialFunction;
import scala.concurrent.ExecutionContext;
import scala.concurrent.Future;
import scala.concurrent.Promise;
import java.net.InetAddress;
import java.time.Duration;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import scala.PartialFunction;
import scala.concurrent.ExecutionContext;
import scala.concurrent.Future;
import scala.concurrent.Promise;

/**
* This is not a completely runnable example but only a fully compiled collection of code snippets
Expand Down
2 changes: 1 addition & 1 deletion chapter14/src/main/java/chapter14/ResourceLoan.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
import akka.actor.Cancellable;
import chapter14.ResourceEncapsulation.*;
import chapter14.ResourceEncapsulation.Shutdown;
import scala.concurrent.duration.FiniteDuration;
import java.net.InetAddress;
import java.util.ArrayList;
import java.util.List;
import scala.concurrent.duration.FiniteDuration;

public class ResourceLoan {

Expand Down
3 changes: 2 additions & 1 deletion chapter15/src/main/java/chapter15/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@

package chapter15;

import static chapter15.Server.SERVER_PORT;

import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import static chapter15.Server.SERVER_PORT;

// 代码清单 15-2
// Listing 15.2 Client sending a request and then blocking until the server responds
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.15")

addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.2")

addSbtPlugin("com.lightbend.sbt" % "sbt-java-formatter" % "0.7.0")
addSbtPlugin("com.lightbend.sbt" % "sbt-java-formatter" % "0.8.0")

addSbtPlugin("io.spray" % "sbt-boilerplate" % "0.6.1")

Expand Down