poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kiwiwi...@apache.org
Subject svn commit: r1735881 - in /poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/agile: AgileDecryptor.java AgileEncryptionInfoBuilder.java
Date Sun, 20 Mar 2016 13:36:56 GMT
Author: kiwiwings
Date: Sun Mar 20 13:36:56 2016
New Revision: 1735881

URL: http://svn.apache.org/viewvc?rev=1735881&view=rev
Log:
fix eclipse warnings

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

Modified: poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/agile/AgileDecryptor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/agile/AgileDecryptor.java?rev=1735881&r1=1735880&r2=1735881&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/agile/AgileDecryptor.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/agile/AgileDecryptor.java Sun Mar
20 13:36:56 2016
@@ -278,6 +278,7 @@ public class AgileDecryptor extends Decr
         }
     }
 
+    @SuppressWarnings("resource")
     public InputStream getDataStream(DirectoryNode dir) throws IOException, GeneralSecurityException
{
         DocumentInputStream dis = dir.createDocumentInputStream(DEFAULT_POIFS_ENTRY);
         _length = dis.readLong();

Modified: poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/agile/AgileEncryptionInfoBuilder.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/agile/AgileEncryptionInfoBuilder.java?rev=1735881&r1=1735880&r2=1735881&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/agile/AgileEncryptionInfoBuilder.java
(original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/agile/AgileEncryptionInfoBuilder.java
Sun Mar 20 13:36:56 2016
@@ -41,21 +41,23 @@ public class AgileEncryptionInfoBuilder
     AgileDecryptor decryptor;
     AgileEncryptor encryptor;
 
-    public void initialize(EncryptionInfo info, LittleEndianInput dis) throws IOException
{
-        this.info = info;
+    @Override
+    public void initialize(EncryptionInfo ei, LittleEndianInput dis) throws IOException {
+        this.info = ei;
         
         EncryptionDocument ed = parseDescriptor((InputStream)dis);
         header = new AgileEncryptionHeader(ed);
         verifier = new AgileEncryptionVerifier(ed);
-        if (info.getVersionMajor() == EncryptionMode.agile.versionMajor
-            && info.getVersionMinor() == EncryptionMode.agile.versionMinor) {
+        if (ei.getVersionMajor() == EncryptionMode.agile.versionMajor
+            && ei.getVersionMinor() == EncryptionMode.agile.versionMinor) {
             decryptor = new AgileDecryptor(this);
             encryptor = new AgileEncryptor(this);
         }
     }
 
-    public void initialize(EncryptionInfo info, CipherAlgorithm cipherAlgorithm, HashAlgorithm
hashAlgorithm, int keyBits, int blockSize, ChainingMode chainingMode) {
-        this.info = info;
+    @Override
+    public void initialize(EncryptionInfo ei, CipherAlgorithm cipherAlgorithm, HashAlgorithm
hashAlgorithm, int keyBits, int blockSize, ChainingMode chainingMode) {
+        this.info = ei;
 
         if (cipherAlgorithm == null) {
             cipherAlgorithm = CipherAlgorithm.aes128;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message