Skip to content

Commit c39e63c

Browse files
Praful Makanisduskis
authored andcommitted
Used google-java-formatter and added plugin (#619)
1 parent 9a99e3d commit c39e63c

File tree

267 files changed

+5235
-6379
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

267 files changed

+5235
-6379
lines changed

google-http-client-android/src/main/java/com/google/api/client/extensions/android/AndroidUtils.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import com.google.api.client.util.Preconditions;
2020

2121
/**
22-
* {@link Beta} <br/>
22+
* {@link Beta} <br>
2323
* Utilities for Android.
2424
*
2525
* @since 1.11
@@ -44,11 +44,12 @@ public static boolean isMinimumSdkLevel(int minimumSdkLevel) {
4444
* @see android.os.Build.VERSION_CODES
4545
*/
4646
public static void checkMinimumSdkLevel(int minimumSdkLevel) {
47-
Preconditions.checkArgument(isMinimumSdkLevel(minimumSdkLevel),
48-
"running on Android SDK level %s but requires minimum %s", Build.VERSION.SDK_INT,
47+
Preconditions.checkArgument(
48+
isMinimumSdkLevel(minimumSdkLevel),
49+
"running on Android SDK level %s but requires minimum %s",
50+
Build.VERSION.SDK_INT,
4951
minimumSdkLevel);
5052
}
5153

52-
private AndroidUtils() {
53-
}
54+
private AndroidUtils() {}
5455
}

google-http-client-android/src/main/java/com/google/api/client/extensions/android/http/AndroidHttp.java

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,16 @@
1919
import com.google.api.client.http.apache.ApacheHttpTransport;
2020
import com.google.api.client.http.javanet.NetHttpTransport;
2121
import com.google.api.client.util.Beta;
22-
2322
import java.net.HttpURLConnection;
2423

2524
/**
26-
* {@link Beta} <br/>
25+
* {@link Beta} <br>
2726
* Utilities for Android HTTP transport.
2827
*
2928
* @since 1.11
3029
* @author Yaniv Inbar
31-
* @deprecated Gingerbread is no longer supported by Google Play Services. Please use
32-
* {@link NetHttpTransport} directly or switch to Cronet which is better supported.
30+
* @deprecated Gingerbread is no longer supported by Google Play Services. Please use {@link
31+
* NetHttpTransport} directly or switch to Cronet which is better supported.
3332
*/
3433
@Beta
3534
@Deprecated
@@ -39,24 +38,19 @@ public class AndroidHttp {
3938
* Returns a new thread-safe HTTP transport instance that is compatible with Android SDKs prior to
4039
* Gingerbread.
4140
*
42-
* <p>
43-
* Don't use this for Android applications that anyway require Gingerbread. Instead just call
41+
* <p>Don't use this for Android applications that anyway require Gingerbread. Instead just call
4442
* {@code new NetHttpTransport()}.
45-
* </p>
4643
*
47-
* <p>
48-
* Prior to Gingerbread, the {@link HttpURLConnection} implementation was buggy, and the Apache
44+
* <p>Prior to Gingerbread, the {@link HttpURLConnection} implementation was buggy, and the Apache
4945
* HTTP Client was preferred. However, starting with Gingerbread, the {@link HttpURLConnection}
5046
* implementation bugs were fixed, and is now better supported than the Apache HTTP Client. There
5147
* is no guarantee that Apache HTTP transport will continue to work in future SDKs. Therefore,
52-
* this method uses {@link NetHttpTransport} for Gingerbread or higher, and otherwise
53-
* {@link ApacheHttpTransport}.
54-
* </p>
48+
* this method uses {@link NetHttpTransport} for Gingerbread or higher, and otherwise {@link
49+
* ApacheHttpTransport}.
5550
*/
5651
public static HttpTransport newCompatibleTransport() {
5752
return AndroidUtils.isMinimumSdkLevel(9) ? new NetHttpTransport() : new ApacheHttpTransport();
5853
}
5954

60-
private AndroidHttp() {
61-
}
55+
private AndroidHttp() {}
6256
}

google-http-client-android/src/main/java/com/google/api/client/extensions/android/http/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*/
1414

1515
/**
16-
* {@link com.google.api.client.util.Beta} <br/>
16+
* {@link com.google.api.client.util.Beta} <br>
1717
* Utilities for Android HTTP transport.
1818
*
1919
* @since 1.11

google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonFactory.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,13 @@
3333
import java.nio.charset.Charset;
3434

3535
/**
36-
* {@link Beta} <br/>
36+
* {@link Beta} <br>
3737
* Low-level JSON library implementation based on GSON.
3838
*
39-
* <p>
40-
* Implementation is thread-safe, and sub-classes must be thread-safe. For maximum efficiency,
39+
* <p>Implementation is thread-safe, and sub-classes must be thread-safe. For maximum efficiency,
4140
* applications should use a single globally-shared instance of the JSON factory.
42-
* </p>
4341
*
44-
* <p>
45-
* Required minimum Android SDK 3.0 (level 11).
46-
* </p>
42+
* <p>Required minimum Android SDK 3.0 (level 11).
4743
*
4844
* @since 1.11
4945
* @author Yaniv Inbar

google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonGenerator.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,10 @@
2424
import java.math.BigInteger;
2525

2626
/**
27-
* {@link Beta} <br/>
27+
* {@link Beta} <br>
2828
* Low-level JSON serializer implementation based on GSON.
2929
*
30-
* <p>
31-
* Implementation is not thread-safe.
32-
* </p>
30+
* <p>Implementation is not thread-safe.
3331
*
3432
* @author Yaniv Inbar
3533
*/

google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonParser.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,10 @@
2929
import java.util.List;
3030

3131
/**
32-
* {@link Beta} <br/>
32+
* {@link Beta} <br>
3333
* Low-level JSON serializer implementation based on GSON.
3434
*
35-
* <p>
36-
* Implementation is not thread-safe.
37-
* </p>
35+
* <p>Implementation is not thread-safe.
3836
*
3937
* @author Yaniv Inbar
4038
*/
@@ -87,7 +85,6 @@ public short getShortValue() {
8785
return Short.parseShort(currentText);
8886
}
8987

90-
9188
@Override
9289
public int getIntValue() {
9390
checkNumber();
@@ -199,8 +196,10 @@ public JsonToken nextToken() throws IOException {
199196
break;
200197
case NUMBER:
201198
currentText = reader.nextString();
202-
currentToken = currentText.indexOf('.') == -1
203-
? JsonToken.VALUE_NUMBER_INT : JsonToken.VALUE_NUMBER_FLOAT;
199+
currentToken =
200+
currentText.indexOf('.') == -1
201+
? JsonToken.VALUE_NUMBER_INT
202+
: JsonToken.VALUE_NUMBER_FLOAT;
204203
break;
205204
case NAME:
206205
currentText = reader.nextName();

google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*/
1414

1515
/**
16-
* {@link com.google.api.client.util.Beta} <br/>
16+
* {@link com.google.api.client.util.Beta} <br>
1717
* Low-level implementation of the GSON parser library built-in to the Android 3.0 SDK.
1818
*
1919
* @since 1.11

google-http-client-android/src/main/java/com/google/api/client/extensions/android/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*/
1414

1515
/**
16-
* {@link com.google.api.client.util.Beta} <br/>
16+
* {@link com.google.api.client.util.Beta} <br>
1717
* Utilities for Android.
1818
*
1919
* @since 1.11

google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@
2525
import org.apache.http.params.HttpConnectionParams;
2626
import org.apache.http.params.HttpParams;
2727

28-
/**
29-
* @author Yaniv Inbar
30-
*/
28+
/** @author Yaniv Inbar */
3129
final class ApacheHttpRequest extends LowLevelHttpRequest {
3230
private final HttpClient httpClient;
3331

@@ -54,7 +52,8 @@ public void setTimeout(int connectTimeout, int readTimeout) throws IOException {
5452
@Override
5553
public LowLevelHttpResponse execute() throws IOException {
5654
if (getStreamingContent() != null) {
57-
Preconditions.checkArgument(request instanceof HttpEntityEnclosingRequest,
55+
Preconditions.checkArgument(
56+
request instanceof HttpEntityEnclosingRequest,
5857
"Apache HTTP client does not support %s requests with content.",
5958
request.getRequestLine().getMethod());
6059
ContentEntity entity = new ContentEntity(getContentLength(), getStreamingContent());

0 commit comments

Comments
 (0)