Make spotbugs happy

This commit is contained in:
Sylvia van Os committed 2021-10-06 19:58:29 +02:00
1 parent b26050b6bf
commit 5a88909cd2
2 files changed
+8 -3

No files matched your search

@@ -20,6 +20,7 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
@@ -405,6 +406,8 @@ public class ImportExportActivity extends CatimaAppCompatActivity
Log.e(TAG, "Starting file export with: " + uri.toString());
startExport(writer, uri);
writer.close();
}
else
{
@@ -421,9 +424,11 @@ public class ImportExportActivity extends CatimaAppCompatActivity
Log.e(TAG, "Starting file import with: " + uri.toString());
startImport(reader, uri, importDataFormat, password);
reader.close();
}
}
catch(FileNotFoundException e)
catch(IOException e)
{
Log.e(TAG, "Failed to import/export file: " + uri.toString(), e);
if (requestCode == CHOOSE_EXPORT_LOCATION)
@@ -116,14 +116,14 @@ public class StocardImporter implements Importer
.substring("/loyalty-card-providers/".length())
);
try {
if (jsonObject.has("input_barcode_format")) {
loyaltyCardHashMap = appendToLoyaltyCardHashMap(
loyaltyCardHashMap,
cardName,
"barcodeType",
jsonObject.getString("input_barcode_format")
);
} catch (JSONException ignored) {}
}
}
} else if (fileName.endsWith("notes/default.json")) {
loyaltyCardHashMap = appendToLoyaltyCardHashMap(