Skip to content

Commit a0953a1

Browse files
author
Arnaud Gourlay
committed
minor: warnings & code cleanup
1 parent 9c28c99 commit a0953a1

File tree

20 files changed

+29
-45
lines changed

20 files changed

+29
-45
lines changed

docs/scala.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ The `query` method takes an `Expr` object. `Expr` objects can be composed with o
126126
```scala
127127
Value readHippoResults = client.query(
128128
Select(Value("data"),Get(hippoRef))
129-
).get();
130-
System.out.println("Hippo Spells:\n " + readHippoResults + "\n");
129+
).get()
130+
println("Hippo Spells:\n " + readHippoResults + "\n")
131131
```
132132

133133
The `query` method also accepts a `timeout` parameter. The `timeout` value defines the maximum time a `query` will be allowed to run on the server. If the value is exceeded, the query is aborted. If no `timeout` is defined in scope, a default value is assigned on the server side.

faunadb-common/src/main/java/com/faunadb/common/Connection.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import java.util.concurrent.atomic.AtomicBoolean;
2323
import java.util.concurrent.atomic.AtomicLong;
2424

25-
import static io.netty.util.CharsetUtil.US_ASCII;
2625
import static io.netty.util.CharsetUtil.UTF_8;
2726
import static java.lang.String.format;
2827

faunadb-java/src/main/java/com/faunadb/client/errors/FaunaException.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import java.util.Collections;
77
import java.util.List;
88
import java.util.Optional;
9-
import java.util.stream.Collectors;
109

1110
/**
1211
* The base type for all FaunaDB exceptions.

faunadb-java/src/main/java/com/faunadb/client/query/Language.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7048,7 +7048,7 @@ public static Expr ToMicros(Expr value) {
70487048
/**
70497049
* Returns a time expression's day of the month, from 1 to 31.
70507050
*
7051-
* @param value an expression. Type: Any
7051+
* @param expr an expression. Type: Any
70527052
* @return a new {@link Expr}
70537053
*/
70547054
public static Expr DayOfMonth(Expr expr) {
@@ -7059,7 +7059,7 @@ public static Expr DayOfMonth(Expr expr) {
70597059
* Returns a time expression's day of the week following ISO-8601 convention,
70607060
* from 1 (Monday) to 7 (Sunday).
70617061
*
7062-
* @param value an expression. Type: Any
7062+
* @param expr an expression. Type: Any
70637063
* @return a new {@link Expr}
70647064
*/
70657065
public static Expr DayOfWeek(Expr expr) {
@@ -7070,7 +7070,7 @@ public static Expr DayOfWeek(Expr expr) {
70707070
* Returns a time expression's day of the year, from 1 to 365, or 366 in a leap
70717071
* year.
70727072
*
7073-
* @param value an expression. Type: Any
7073+
* @param expr an expression. Type: Any
70747074
* @return a new {@link Expr}
70757075
*/
70767076
public static Expr DayOfYear(Expr expr) {
@@ -7080,7 +7080,7 @@ public static Expr DayOfYear(Expr expr) {
70807080
/**
70817081
* Returns the time expression's year, following the ISO-8601 standard.
70827082
*
7083-
* @param value an expression. Type: Any
7083+
* @param expr an expression. Type: Any
70847084
* @return a new {@link Expr}
70857085
*/
70867086
public static Expr Year(Expr expr) {
@@ -7090,7 +7090,7 @@ public static Expr Year(Expr expr) {
70907090
/**
70917091
* Returns a time expression's month of the year, from 1 to 12.
70927092
*
7093-
* @param value an expression. Type: Any
7093+
* @param expr an expression. Type: Any
70947094
* @return a new {@link Expr}
70957095
*/
70967096
public static Expr Month(Expr expr) {
@@ -7100,7 +7100,7 @@ public static Expr Month(Expr expr) {
71007100
/**
71017101
* Returns a time expression's hour of the day, from 0 to 23.
71027102
*
7103-
* @param value an expression. Type: Any
7103+
* @param expr an expression. Type: Any
71047104
* @return a new {@link Expr}
71057105
*/
71067106
public static Expr Hour(Expr expr) {
@@ -7110,7 +7110,7 @@ public static Expr Hour(Expr expr) {
71107110
/**
71117111
* Returns a time expression's minute of the hour, from 0 to 59.
71127112
*
7113-
* @param value an expression. Type: Any
7113+
* @param expr an expression. Type: Any
71147114
* @return a new {@link Expr}
71157115
*/
71167116
public static Expr Minute(Expr expr) {
@@ -7120,7 +7120,7 @@ public static Expr Minute(Expr expr) {
71207120
/**
71217121
* Returns a time expression's second of the minute, from 0 to 59.
71227122
*
7123-
* @param value an expression. Type: Any
7123+
* @param expr an expression. Type: Any
71247124
* @return a new {@link Expr}
71257125
*/
71267126
public static Expr Second(Expr expr) {

faunadb-java/src/main/java/com/faunadb/client/types/Codec.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import com.faunadb.client.types.Value.*;
44

5-
import java.util.Collections;
65
import java.util.List;
76
import java.util.Map;
87
import java.util.function.Function;

faunadb-java/src/main/java/com/faunadb/client/types/Deserializer.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
import java.io.IOException;
1212
import java.util.ArrayList;
13-
import java.util.Collections;
1413
import java.util.LinkedHashMap;
1514
import java.util.Iterator;
1615
import java.util.List;

faunadb-java/src/main/java/com/faunadb/client/types/Path.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
import java.util.ArrayList;
44
import java.util.Collections;
55
import java.util.List;
6-
import java.util.Map;
7-
import java.util.function.Function;
86
import java.util.stream.Collectors;
97

108
import static com.faunadb.client.types.Codec.ARRAY;

faunadb-java/src/test/java/com/faunadb/client/ClientSpec.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import static com.faunadb.client.types.Codec.*;
3131
import static com.faunadb.client.types.Value.NullV.NULL;
3232
import static java.lang.String.format;
33-
import static java.util.Arrays.asList;
3433
import static org.hamcrest.CoreMatchers.*;
3534
import static org.hamcrest.Matchers.aMapWithSize;
3635
import static org.hamcrest.Matchers.containsInAnyOrder;

faunadb-java/src/test/java/com/faunadb/client/DeserializationSpec.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import org.junit.Test;
1111

1212
import java.io.IOException;
13-
import java.time.Duration;
1413
import java.time.Instant;
1514
import java.time.LocalDate;
1615
import java.time.temporal.ChronoUnit;
@@ -19,10 +18,8 @@
1918
import java.util.Optional;
2019

2120
import static com.faunadb.client.types.Codec.*;
22-
import static com.faunadb.client.types.Value.RefV;
2321
import static org.hamcrest.CoreMatchers.equalTo;
2422
import static org.hamcrest.CoreMatchers.is;
25-
import static java.time.ZoneOffset.UTC;
2623
import static org.junit.Assert.assertThat;
2724

2825
public class DeserializationSpec {

faunadb-scala/src/load/scala/faunadb/FaunaClientFixture.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ trait FaunaClientFixture extends SuiteMixin with BeforeAndAfterAll { self: fixtu
1616
val scheme = Option(System.getenv("FAUNA_SCHEME")) getOrElse { "https" }
1717
val port = Option(System.getenv("FAUNA_PORT")) getOrElse { "443" }
1818

19-
collection.Map("root_token" -> rootKey, "root_url" -> s"${scheme}://${domain}:${port}")
19+
collection.Map("root_token" -> rootKey, "root_url" -> s"$scheme://$domain:$port")
2020
}
2121

2222
_rootClient = FaunaClient(endpoint = config("root_url"), secret = config("root_token"))

0 commit comments

Comments
 (0)