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)
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,
this.testBase = testBase;
this.barcodeReader = barcodeReader;
this.expectedFormat = expectedFormat;
- testResults = new Vector<TestResult>();
+ testResults = new ArrayList<TestResult>();
}
/**
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
}
}
- 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) {
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;
}
}
- 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