diff --git a/core/test/src/com/google/zxing/common/AbstractBlackBoxTestCase.java b/core/test/src/com/google/zxing/common/AbstractBlackBoxTestCase.java index 826369d08..b66ef9cc8 100644 --- a/core/test/src/com/google/zxing/common/AbstractBlackBoxTestCase.java +++ b/core/test/src/com/google/zxing/common/AbstractBlackBoxTestCase.java @@ -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 testResults; + private final List 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(); + testResults = new ArrayList(); } /** diff --git a/core/test/src/com/google/zxing/common/AbstractNegativeBlackBoxTestCase.java b/core/test/src/com/google/zxing/common/AbstractNegativeBlackBoxTestCase.java index db55393c8..ec14f7f14 100644 --- a/core/test/src/com/google/zxing/common/AbstractNegativeBlackBoxTestCase.java +++ b/core/test/src/com/google/zxing/common/AbstractNegativeBlackBoxTestCase.java @@ -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 testResults; + private final List testResults; // Use the multiformat reader to evaluate all decoders in the system. protected AbstractNegativeBlackBoxTestCase(File testBase) { super(testBase, new MultiFormatReader(), null); - testResults = new Vector(); + testResults = new ArrayList(); } protected void addTest(int falsePositivesAllowed, float rotation) { diff --git a/zxingorg/src/com/google/zxing/web/DecodeEmailTask.java b/zxingorg/src/com/google/zxing/web/DecodeEmailTask.java index fda4853bf..1b8babd26 100644 --- a/zxingorg/src/com/google/zxing/web/DecodeEmailTask.java +++ b/zxingorg/src/com/google/zxing/web/DecodeEmailTask.java @@ -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