Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit 5f0debc

Browse files
committed
Cleanup whitespace
1 parent 5f6f883 commit 5f0debc

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

src/main/java/com/rollbar/android/RollbarThread.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
public class RollbarThread extends Thread {
1414
private final List<JSONObject> queue;
1515
private final Notifier notifier;
16-
16+
1717
private final Lock lock = new ReentrantLock();
1818
private final Condition ready = lock.newCondition();
19-
19+
2020
public RollbarThread(Notifier notifier) {
2121
this.notifier = notifier;
2222
queue = new ArrayList<JSONObject>();
@@ -26,7 +26,7 @@ public RollbarThread(Notifier notifier) {
2626
public void run() {
2727
for (;;) {
2828
lock.lock();
29-
29+
3030
try {
3131
if (queue.isEmpty()) {
3232
ready.await();
@@ -54,7 +54,7 @@ public void run() {
5454

5555
Log.d(Rollbar.TAG, "Rollbar thread finishing.");
5656
}
57-
57+
5858
public void queueItem(JSONObject item) {
5959
lock.lock();
6060
queue.add(item);

src/main/java/com/rollbar/android/http/HttpRequest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class HttpRequest implements Runnable {
2727

2828
private String method;
2929
private byte[] body;
30-
30+
3131
private int attemptNumber;
3232

3333
public HttpRequest(URL url, String method, HttpResponseHandler handler) {
@@ -36,7 +36,7 @@ public HttpRequest(URL url, String method, HttpResponseHandler handler) {
3636
this.handler = handler;
3737

3838
this.requestProperties = new HashMap<String, String>();
39-
39+
4040
attemptNumber = 1;
4141
}
4242

@@ -86,7 +86,7 @@ public void run() {
8686

8787
InputStream in = new BufferedInputStream(
8888
responseCode == 200 ? connection.getInputStream() : connection.getErrorStream());
89-
89+
9090
String responseText = getResponseText(in);
9191
HttpResponse response = new HttpResponse(responseCode, responseText);
9292

@@ -101,18 +101,18 @@ public void run() {
101101
connection.disconnect();
102102
}
103103
}
104-
104+
105105
private void handleFailureWithRetries(HttpResponse response) {
106106
if (attemptNumber < HttpRequestManager.MAX_RETRIES &&
107107
!response.hasStatusCode()) {
108108
attemptNumber++;
109-
109+
110110
HttpRequestManager.getInstance().retryRequest(this);
111111
} else {
112112
handler.onFailure(response);
113113
}
114114
}
115-
115+
116116
public int getAttemptNumber() {
117117
return attemptNumber;
118118
}

src/main/java/com/rollbar/android/http/HttpRequestManager.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
public class HttpRequestManager {
1414
public static final int MAX_RETRIES = 5;
15-
15+
1616
private static HttpRequestManager instance = null;
1717
private final ThreadPoolExecutor executor;
1818
private final ScheduledExecutorService service;
@@ -28,7 +28,7 @@ public static HttpRequestManager getInstance() {
2828
}
2929
return instance;
3030
}
31-
31+
3232
private void postJson(String urlString, String body, boolean async, HttpResponseHandler handler) {
3333
URL url;
3434

@@ -60,12 +60,12 @@ public void postJson(String urlString, JSONObject json, boolean async, HttpRespo
6060
public void postJson(String urlString, JSONArray json, boolean async, HttpResponseHandler handler) {
6161
postJson(urlString, json.toString(), async, handler);
6262
}
63-
63+
6464
public void retryRequest(final HttpRequest request) {
6565
int retryDelay = request.getAttemptNumber();
66-
66+
6767
service.schedule(new Runnable() {
68-
68+
6969
@Override
7070
public void run() {
7171
executor.execute(request);

src/main/java/com/rollbar/android/http/HttpResponse.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
public class HttpResponse {
44
private final String result;
5-
5+
66
private final int statusCode;
77
private final String responseText;
8-
8+
99
public HttpResponse(String result) {
1010
this.result = result;
1111
this.statusCode = 0;
@@ -25,7 +25,7 @@ public int getStatusCode() {
2525
public String getResponseText() {
2626
return responseText;
2727
}
28-
28+
2929
public boolean hasStatusCode() {
3030
return statusCode > 0;
3131
}
@@ -35,7 +35,7 @@ public String toString() {
3535
if (responseText != null) {
3636
return responseText;
3737
}
38-
38+
3939
return result;
4040
}
4141
}

0 commit comments

Comments
 (0)