Skip to content

Commit 835b5f5

Browse files
committed
Fixed Lint about formatting strings
1 parent 81f4402 commit 835b5f5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sample/src/main/java/com/loopj/android/http/sample/SampleParentActivity.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import java.io.UnsupportedEncodingException;
2525
import java.util.ArrayList;
2626
import java.util.List;
27+
import java.util.Locale;
2728

2829
public abstract class SampleParentActivity extends Activity {
2930

@@ -109,7 +110,7 @@ protected final void debugHeaders(String TAG, Header[] headers) {
109110
Log.d(TAG, "Return Headers:");
110111
StringBuilder builder = new StringBuilder();
111112
for (Header h : headers) {
112-
String _h = String.format("%s : %s", h.getName(), h.getValue());
113+
String _h = String.format(Locale.US, "%s : %s", h.getName(), h.getValue());
113114
Log.d(TAG, _h);
114115
builder.append(_h);
115116
builder.append("\n");
@@ -143,7 +144,7 @@ protected final void debugResponse(String TAG, String response) {
143144
}
144145

145146
protected final void debugStatusCode(String TAG, int statusCode) {
146-
String msg = String.format("Return Status Code: %d", statusCode);
147+
String msg = String.format(Locale.US, "Return Status Code: %d", statusCode);
147148
Log.d(TAG, msg);
148149
addView(getColoredView(LIGHTBLUE, msg));
149150
}

0 commit comments

Comments
 (0)