mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
git-svn-id: https://zxing.googlecode.com/svn/trunk@574 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
56fa39f734
commit
67d139dadb
|
@ -36,7 +36,8 @@ import java.io.FilenameFilter;
|
|||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.Hashtable;
|
||||
import java.util.Vector;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* @author srowen@google.com (Sean Owen)
|
||||
|
@ -82,7 +83,7 @@ public abstract class AbstractBlackBoxTestCase extends TestCase {
|
|||
private final File testBase;
|
||||
private final Reader barcodeReader;
|
||||
private final BarcodeFormat expectedFormat;
|
||||
private Vector<TestResult> testResults;
|
||||
private final List<TestResult> testResults;
|
||||
|
||||
protected AbstractBlackBoxTestCase(File testBase,
|
||||
Reader barcodeReader,
|
||||
|
@ -90,7 +91,7 @@ public abstract class AbstractBlackBoxTestCase extends TestCase {
|
|||
this.testBase = testBase;
|
||||
this.barcodeReader = barcodeReader;
|
||||
this.expectedFormat = expectedFormat;
|
||||
testResults = new Vector<TestResult>();
|
||||
testResults = new ArrayList<TestResult>();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -26,7 +26,8 @@ import javax.imageio.ImageIO;
|
|||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Vector;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* This abstract class looks for negative results, i.e. it only allows a certain number of false
|
||||
|
@ -54,12 +55,12 @@ public abstract class AbstractNegativeBlackBoxTestCase extends AbstractBlackBoxT
|
|||
}
|
||||
}
|
||||
|
||||
private Vector<TestResult> testResults;
|
||||
private final List<TestResult> testResults;
|
||||
|
||||
// Use the multiformat reader to evaluate all decoders in the system.
|
||||
protected AbstractNegativeBlackBoxTestCase(File testBase) {
|
||||
super(testBase, new MultiFormatReader(), null);
|
||||
testResults = new Vector<TestResult>();
|
||||
testResults = new ArrayList<TestResult>();
|
||||
}
|
||||
|
||||
protected void addTest(int falsePositivesAllowed, float rotation) {
|
||||
|
|
|
@ -32,6 +32,7 @@ import javax.mail.MessagingException;
|
|||
import javax.mail.Session;
|
||||
import javax.mail.Store;
|
||||
import javax.mail.Transport;
|
||||
import javax.mail.Service;
|
||||
import javax.mail.internet.InternetAddress;
|
||||
import javax.mail.internet.MimeBodyPart;
|
||||
import javax.mail.internet.MimeMessage;
|
||||
|
@ -163,13 +164,13 @@ final class DecodeEmailTask extends TimerTask {
|
|||
}
|
||||
}
|
||||
|
||||
private static void closeResources(Store store, Folder inbox) {
|
||||
private static void closeResources(Service service, Folder inbox) {
|
||||
try {
|
||||
if (inbox != null) {
|
||||
inbox.close(true);
|
||||
}
|
||||
if (store != null) {
|
||||
store.close();
|
||||
if (service != null) {
|
||||
service.close();
|
||||
}
|
||||
} catch (MessagingException me) {
|
||||
// continue
|
||||
|
|
Loading…
Reference in a new issue