Fix a few small app bugs from stack traces, and update plugins

This commit is contained in:
Sean Owen 2015-08-17 09:52:57 +01:00
parent 4dd053a919
commit 7ee719b613
4 changed files with 33 additions and 30 deletions

View file

@ -377,8 +377,7 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
@Override
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
if (resultCode == RESULT_OK) {
if (requestCode == HISTORY_REQUEST_CODE) {
if (resultCode == RESULT_OK && requestCode == HISTORY_REQUEST_CODE && historyManager != null) {
int itemNumber = intent.getIntExtra(Intents.History.ITEM_NUMBER, -1);
if (itemNumber >= 0) {
HistoryItem historyItem = historyManager.buildHistoryItem(itemNumber);
@ -386,7 +385,6 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
}
}
}
}
private void decodeOrStoreSavedBitmap(Bitmap bitmap, Result result) {
// Bitmap isn't used yet -- will be used soon

View file

@ -30,6 +30,7 @@ import java.io.IOException;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Collection;
import java.util.concurrent.RejectedExecutionException;
import com.google.zxing.client.android.history.HistoryManager;
import com.google.zxing.client.result.ISBNParsedResult;
@ -45,6 +46,7 @@ public abstract class SupplementalInfoRetriever extends AsyncTask<Object,Object,
ParsedResult result,
HistoryManager historyManager,
Context context) {
try {
if (result instanceof URIParsedResult) {
SupplementalInfoRetriever uriRetriever =
new URIResultInfoRetriever(textView, (URIParsedResult) result, historyManager, context);
@ -67,6 +69,9 @@ public abstract class SupplementalInfoRetriever extends AsyncTask<Object,Object,
new BookResultInfoRetriever(textView, isbn, historyManager, context);
bookInfoRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
} catch (RejectedExecutionException ree) {
// do nothing
}
}
private final WeakReference<TextView> textViewRef;

View file

@ -407,7 +407,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.1</version>
<version>3.0.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>

View file

@ -61,7 +61,7 @@
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.3.0.v20150612</version>
<version>9.3.2.v20150730</version>
</plugin>
</plugins>
</build>