Whitespace cleanup and other inspections from IDEA 13

git-svn-id: https://zxing.googlecode.com/svn/trunk@2989 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2013-12-06 11:17:57 +00:00
parent 49e2bca2aa
commit da9d32846a
21 changed files with 278 additions and 283 deletions

View file

@ -26,7 +26,6 @@ import android.view.LayoutInflater;
import android.view.View;
import android.webkit.CookieManager;
import android.webkit.CookieSyncManager;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.TextView;
@ -67,7 +66,7 @@ public final class SearchBookContentsActivity extends Activity {
private TextView headerView;
private AsyncTask<String,?,?> networkTask;
private final Button.OnClickListener buttonListener = new Button.OnClickListener() {
private final View.OnClickListener buttonListener = new View.OnClickListener() {
@Override
public void onClick(View view) {
launchSearch();

View file

@ -17,7 +17,6 @@
package com.google.zxing.client.android.result;
import android.view.View;
import android.widget.Button;
/**
* Handles the result of barcode decoding in the context of the Android platform, by dispatching the
@ -25,7 +24,7 @@ import android.widget.Button;
*
* @author dswitkin@google.com (Daniel Switkin)
*/
public final class ResultButtonListener implements Button.OnClickListener {
public final class ResultButtonListener implements View.OnClickListener {
private final ResultHandler resultHandler;
private final int index;

View file

@ -33,7 +33,6 @@ import android.provider.Browser;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import com.google.zxing.client.android.clipboard.ClipboardInterface;
@ -53,7 +52,7 @@ public final class ShareActivity extends Activity {
private View clipboardButton;
private final Button.OnClickListener contactListener = new Button.OnClickListener() {
private final View.OnClickListener contactListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI);
@ -62,7 +61,7 @@ public final class ShareActivity extends Activity {
}
};
private final Button.OnClickListener bookmarkListener = new Button.OnClickListener() {
private final View.OnClickListener bookmarkListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Intent.ACTION_PICK);
@ -72,7 +71,7 @@ public final class ShareActivity extends Activity {
}
};
private final Button.OnClickListener appListener = new Button.OnClickListener() {
private final View.OnClickListener appListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Intent.ACTION_PICK);
@ -82,7 +81,7 @@ public final class ShareActivity extends Activity {
}
};
private final Button.OnClickListener clipboardListener = new Button.OnClickListener() {
private final View.OnClickListener clipboardListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
// Should always be true, because we grey out the clipboard button in onResume() if it's empty

View file

@ -21,7 +21,6 @@ import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Environment;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public final class BenchmarkActivity extends Activity {
@ -30,7 +29,7 @@ public final class BenchmarkActivity extends Activity {
private TextView textView;
private AsyncTask<?,?,?> benchmarkTask;
private final Button.OnClickListener runBenchmark = new Button.OnClickListener() {
private final View.OnClickListener runBenchmark = new View.OnClickListener() {
@Override
public void onClick(View v) {
if (benchmarkTask == null) {

View file

@ -31,7 +31,6 @@ import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import com.google.zxing.integration.android.IntentIntegrator;
import com.google.zxing.integration.android.IntentResult;
@ -116,7 +115,7 @@ public final class ZXingTestActivity extends Activity {
}
private final Button.OnClickListener getCameraParameters = new Button.OnClickListener() {
private final View.OnClickListener getCameraParameters = new View.OnClickListener() {
@Override
public void onClick(View v) {
String stats = collectStats();
@ -129,7 +128,7 @@ public final class ZXingTestActivity extends Activity {
}
};
private final Button.OnClickListener runBenchmark = new Button.OnClickListener() {
private final View.OnClickListener runBenchmark = new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Intent.ACTION_VIEW);
@ -138,7 +137,7 @@ public final class ZXingTestActivity extends Activity {
}
};
private final Button.OnClickListener scanProduct = new Button.OnClickListener() {
private final View.OnClickListener scanProduct = new View.OnClickListener() {
@Override
public void onClick(View v) {
IntentIntegrator integrator = new IntentIntegrator(ZXingTestActivity.this);
@ -150,7 +149,7 @@ public final class ZXingTestActivity extends Activity {
}
};
private final Button.OnClickListener scanQRCode = new Button.OnClickListener() {
private final View.OnClickListener scanQRCode = new View.OnClickListener() {
@Override
public void onClick(View v) {
IntentIntegrator integrator = new IntentIntegrator(ZXingTestActivity.this);
@ -158,7 +157,7 @@ public final class ZXingTestActivity extends Activity {
}
};
private final Button.OnClickListener scanAnything = new Button.OnClickListener() {
private final View.OnClickListener scanAnything = new View.OnClickListener() {
@Override
public void onClick(View v) {
IntentIntegrator integrator = new IntentIntegrator(ZXingTestActivity.this);
@ -166,7 +165,7 @@ public final class ZXingTestActivity extends Activity {
}
};
private final Button.OnClickListener searchBookContents = new Button.OnClickListener() {
private final View.OnClickListener searchBookContents = new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent("com.google.zxing.client.android.SEARCH_BOOK_CONTENTS");
@ -176,35 +175,35 @@ public final class ZXingTestActivity extends Activity {
}
};
private final Button.OnClickListener encodeURL = new Button.OnClickListener() {
private final View.OnClickListener encodeURL = new View.OnClickListener() {
@Override
public void onClick(View v) {
encodeBarcode("TEXT_TYPE", "http://www.nytimes.com");
}
};
private final Button.OnClickListener encodeEmail = new Button.OnClickListener() {
private final View.OnClickListener encodeEmail = new View.OnClickListener() {
@Override
public void onClick(View v) {
encodeBarcode("EMAIL_TYPE", "foo@example.com");
}
};
private final Button.OnClickListener encodePhone = new Button.OnClickListener() {
private final View.OnClickListener encodePhone = new View.OnClickListener() {
@Override
public void onClick(View v) {
encodeBarcode("PHONE_TYPE", "2125551212");
}
};
private final Button.OnClickListener encodeSMS = new Button.OnClickListener() {
private final View.OnClickListener encodeSMS = new View.OnClickListener() {
@Override
public void onClick(View v) {
encodeBarcode("SMS_TYPE", "2125551212");
}
};
private final Button.OnClickListener encodeContact = new Button.OnClickListener() {
private final View.OnClickListener encodeContact = new View.OnClickListener() {
@Override
public void onClick(View v) {
Bundle bundle = new Bundle();
@ -216,7 +215,7 @@ public final class ZXingTestActivity extends Activity {
}
};
private final Button.OnClickListener encodeLocation = new Button.OnClickListener() {
private final View.OnClickListener encodeLocation = new View.OnClickListener() {
@Override
public void onClick(View v) {
Bundle bundle = new Bundle();
@ -226,7 +225,7 @@ public final class ZXingTestActivity extends Activity {
}
};
private final Button.OnClickListener encodeHiddenData = new Button.OnClickListener() {
private final View.OnClickListener encodeHiddenData = new View.OnClickListener() {
@Override
public void onClick(View v) {
IntentIntegrator integrator = new IntentIntegrator(ZXingTestActivity.this);
@ -235,14 +234,14 @@ public final class ZXingTestActivity extends Activity {
}
};
private final Button.OnClickListener encodeBadData = new Button.OnClickListener() {
private final View.OnClickListener encodeBadData = new View.OnClickListener() {
@Override
public void onClick(View v) {
encodeBarcode(null, "bar");
}
};
private final Button.OnClickListener shareViaBarcode = new Button.OnClickListener() {
private final View.OnClickListener shareViaBarcode = new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent("com.google.zxing.client.android.SHARE"));

View file

@ -112,7 +112,7 @@ final class DecodedBitStreamParser {
}
} while (mode != Mode.PAD_ENCODE && bits.available() > 0);
if (resultTrailer.length() > 0) {
result.append(resultTrailer.toString());
result.append(resultTrailer);
}
return new DecoderResult(bytes, result.toString(), byteSegments.isEmpty() ? null : byteSegments, null);
}

View file

@ -74,7 +74,7 @@ public final class QRCode {
result.append("\n matrix: null\n");
} else {
result.append("\n matrix:\n");
result.append(matrix.toString());
result.append(matrix);
}
result.append(">>\n");
return result.toString();

View file

@ -147,10 +147,10 @@ final class DecodeWorker implements Callable<Integer> {
}
Result result = new MultiFormatReader().decode(bitmap, hints);
if (config.isBrief()) {
System.out.println(uri.toString() + ": Success");
System.out.println(uri + ": Success");
} else {
ParsedResult parsedResult = ResultParser.parseResult(result);
System.out.println(uri.toString() + " (format: " + result.getBarcodeFormat() + ", type: " +
System.out.println(uri + " (format: " + result.getBarcodeFormat() + ", type: " +
parsedResult.getType() + "):\nRaw result:\n" + result.getText() + "\nParsed result:\n" +
parsedResult.getDisplayResult());
@ -165,7 +165,7 @@ final class DecodeWorker implements Callable<Integer> {
return result;
} catch (NotFoundException ignored) {
System.out.println(uri.toString() + ": No barcode found");
System.out.println(uri + ": No barcode found");
return null;
}
}
@ -191,11 +191,11 @@ final class DecodeWorker implements Callable<Integer> {
Result[] results = reader.decodeMultiple(bitmap, hints);
if (config.isBrief()) {
System.out.println(uri.toString() + ": Success");
System.out.println(uri + ": Success");
} else {
for (Result result : results) {
ParsedResult parsedResult = ResultParser.parseResult(result);
System.out.println(uri.toString() + " (format: "
System.out.println(uri + " (format: "
+ result.getBarcodeFormat() + ", type: "
+ parsedResult.getType() + "):\nRaw result:\n"
+ result.getText() + "\nParsed result:\n"
@ -209,7 +209,7 @@ final class DecodeWorker implements Callable<Integer> {
}
return results;
} catch (NotFoundException ignored) {
System.out.println(uri.toString() + ": No barcode found");
System.out.println(uri + ": No barcode found");
return null;
}
}