]> source.dussan.org Git - poi.git/commitdiff
fix eclipse warnings
authorAndreas Beeker <kiwiwings@apache.org>
Sun, 20 Mar 2016 13:36:56 +0000 (13:36 +0000)
committerAndreas Beeker <kiwiwings@apache.org>
Sun, 20 Mar 2016 13:36:56 +0000 (13:36 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1735881 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/poifs/crypt/agile/AgileDecryptor.java
src/ooxml/java/org/apache/poi/poifs/crypt/agile/AgileEncryptionInfoBuilder.java

index 9ce0a2b74a828ca6fbfa25ab20948d2273271759..f8c9bb551cfae48e177494baae2dcef52c70ac70 100644 (file)
@@ -278,6 +278,7 @@ public class AgileDecryptor extends Decryptor {
         }
     }
 
+    @SuppressWarnings("resource")
     public InputStream getDataStream(DirectoryNode dir) throws IOException, GeneralSecurityException {
         DocumentInputStream dis = dir.createDocumentInputStream(DEFAULT_POIFS_ENTRY);
         _length = dis.readLong();
index 39c6acf7422e2452a3a46646124e4352d873b464..ecf7fe8e69ed8c59f01fae89cb6e36c56b132768 100644 (file)
@@ -41,21 +41,23 @@ public class AgileEncryptionInfoBuilder implements EncryptionInfoBuilder {
     AgileDecryptor decryptor;\r
     AgileEncryptor encryptor;\r
 \r
-    public void initialize(EncryptionInfo info, LittleEndianInput dis) throws IOException {\r
-        this.info = info;\r
+    @Override\r
+    public void initialize(EncryptionInfo ei, LittleEndianInput dis) throws IOException {\r
+        this.info = ei;\r
         \r
         EncryptionDocument ed = parseDescriptor((InputStream)dis);\r
         header = new AgileEncryptionHeader(ed);\r
         verifier = new AgileEncryptionVerifier(ed);\r
-        if (info.getVersionMajor() == EncryptionMode.agile.versionMajor\r
-            && info.getVersionMinor() == EncryptionMode.agile.versionMinor) {\r
+        if (ei.getVersionMajor() == EncryptionMode.agile.versionMajor\r
+            && ei.getVersionMinor() == EncryptionMode.agile.versionMinor) {\r
             decryptor = new AgileDecryptor(this);\r
             encryptor = new AgileEncryptor(this);\r
         }\r
     }\r
 \r
-    public void initialize(EncryptionInfo info, CipherAlgorithm cipherAlgorithm, HashAlgorithm hashAlgorithm, int keyBits, int blockSize, ChainingMode chainingMode) {\r
-        this.info = info;\r
+    @Override\r
+    public void initialize(EncryptionInfo ei, CipherAlgorithm cipherAlgorithm, HashAlgorithm hashAlgorithm, int keyBits, int blockSize, ChainingMode chainingMode) {\r
+        this.info = ei;\r
 \r
         if (cipherAlgorithm == null) {\r
             cipherAlgorithm = CipherAlgorithm.aes128;\r