Skip to content

Commit a7bd0ba

Browse files
committed
fix: lint errors
1 parent a6270d7 commit a7bd0ba

File tree

2 files changed

+19
-17
lines changed

2 files changed

+19
-17
lines changed

parse/src/main/java/com/parse/ParseException.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ public class ParseException extends Exception {
102102
public static final int FILE_DELETE_ERROR = 153;
103103
/** Error code indicating that the application has exceeded its request limit. */
104104
public static final int REQUEST_LIMIT_EXCEEDED = 155;
105-
/** Error code indicating that the request was a duplicate and has been discarded due to idempotency rules. */
105+
/**
106+
* Error code indicating that the request was a duplicate and has been discarded due to
107+
* idempotency rules.
108+
*/
106109
public static final int DUPLICATE_REQUEST = 159;
107110
/** Error code indicating that the provided event name is invalid. */
108111
public static final int INVALID_EVENT_NAME = 160;

parse/src/test/java/com/parse/ParseRESTCommandTest.java

+15-16
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import java.net.URL;
3434
import java.util.Collections;
3535
import java.util.concurrent.atomic.AtomicReference;
36-
3736
import org.json.JSONArray;
3837
import org.json.JSONObject;
3938
import org.junit.After;
@@ -562,27 +561,27 @@ public void testIdempotencyLogic() throws Exception {
562561
ParseHttpClient mockHttpClient = mock(ParseHttpClient.class);
563562
AtomicReference<String> requestIdAtomicReference = new AtomicReference<>();
564563
when(mockHttpClient.execute(
565-
argThat(
566-
argument -> {
567-
assertNotNull(
568-
argument.getHeader(ParseRESTCommand.HEADER_REQUEST_ID));
569-
if (requestIdAtomicReference.get() == null)
570-
requestIdAtomicReference.set(
571-
argument.getHeader(
572-
ParseRESTCommand.HEADER_REQUEST_ID));
573-
assertEquals(
574-
argument.getHeader(ParseRESTCommand.HEADER_REQUEST_ID),
575-
requestIdAtomicReference.get());
576-
return true;
577-
})))
578-
.thenThrow(new IOException());
564+
argThat(
565+
argument -> {
566+
assertNotNull(
567+
argument.getHeader(ParseRESTCommand.HEADER_REQUEST_ID));
568+
if (requestIdAtomicReference.get() == null)
569+
requestIdAtomicReference.set(
570+
argument.getHeader(
571+
ParseRESTCommand.HEADER_REQUEST_ID));
572+
assertEquals(
573+
argument.getHeader(ParseRESTCommand.HEADER_REQUEST_ID),
574+
requestIdAtomicReference.get());
575+
return true;
576+
})))
577+
.thenThrow(new IOException());
579578

580579
ParseRESTCommand.server = new URL("http://parse.com");
581580
ParseRESTCommand command = new ParseRESTCommand.Builder().build();
582581
Task<Void> task = command.executeAsync(mockHttpClient).makeVoid();
583582
task.waitForCompletion();
584583

585584
verify(mockHttpClient, times(ParseRequest.DEFAULT_MAX_RETRIES + 1))
586-
.execute(any(ParseHttpRequest.class));
585+
.execute(any(ParseHttpRequest.class));
587586
}
588587
}

0 commit comments

Comments
 (0)