aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/android/volley/Response.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/android/volley/Response.java')
-rw-r--r--src/main/java/com/android/volley/Response.java17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/main/java/com/android/volley/Response.java b/src/main/java/com/android/volley/Response.java
index 1fe7215..2f50e2d 100644
--- a/src/main/java/com/android/volley/Response.java
+++ b/src/main/java/com/android/volley/Response.java
@@ -32,23 +32,23 @@ public class Response<T> {
/** Callback interface for delivering error responses. */
public interface ErrorListener {
/**
- * Callback method that an error has been occurred with the
- * provided error code and optional user-readable message.
+ * Callback method that an error has been occurred with the provided error code and optional
+ * user-readable message.
*/
void onErrorResponse(VolleyError error);
}
/** Returns a successful response containing the parsed result. */
public static <T> Response<T> success(T result, Cache.Entry cacheEntry) {
- return new Response<T>(result, cacheEntry);
+ return new Response<>(result, cacheEntry);
}
/**
- * Returns a failed response containing the given error code and an optional
- * localized message displayed to the user.
+ * Returns a failed response containing the given error code and an optional localized message
+ * displayed to the user.
*/
public static <T> Response<T> error(VolleyError error) {
- return new Response<T>(error);
+ return new Response<>(error);
}
/** Parsed response, or null in the case of error. */
@@ -63,14 +63,11 @@ public class Response<T> {
/** True if this response was a soft-expired one and a second one MAY be coming. */
public boolean intermediate = false;
- /**
- * Returns whether this response is considered successful.
- */
+ /** Returns whether this response is considered successful. */
public boolean isSuccess() {
return error == null;
}
-
private Response(T result, Cache.Entry cacheEntry) {
this.result = result;
this.cacheEntry = cacheEntry;