summaryrefslogtreecommitdiffstats
path: root/luni/src/main/java/javax/crypto
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2011-02-17 18:00:29 -0800
committerElliott Hughes <enh@google.com>2011-02-17 18:00:29 -0800
commit6aa068b481cc4cca7765ce90fdf32f3eb2b5a77c (patch)
tree922222d8b561e98cada975d917cfeed27fde74d3 /luni/src/main/java/javax/crypto
parent66e1a782c0ffafcb7c4226798d6ecc4cfc071916 (diff)
downloadlibcore-6aa068b481cc4cca7765ce90fdf32f3eb2b5a77c.zip
libcore-6aa068b481cc4cca7765ce90fdf32f3eb2b5a77c.tar.gz
libcore-6aa068b481cc4cca7765ce90fdf32f3eb2b5a77c.tar.bz2
Fix various FindBugs warnings.
Only the ChunkHandler and ZoneInfo ones were real bugs. The former is only called with one input value that doesn't exercise the bug, and the latter would cause us to think that a time zone that stopped using daylight time before 1970 was still using daylight time (which would defeat various optimizations, but should otherwise be harmless). The other stuff is trivia not worth individual changes. Change-Id: Ib0752560cd16edc6538d1fc2b234451a66d48171
Diffstat (limited to 'luni/src/main/java/javax/crypto')
-rw-r--r--luni/src/main/java/javax/crypto/CipherInputStream.java3
-rw-r--r--luni/src/main/java/javax/crypto/spec/SecretKeySpec.java3
2 files changed, 3 insertions, 3 deletions
diff --git a/luni/src/main/java/javax/crypto/CipherInputStream.java b/luni/src/main/java/javax/crypto/CipherInputStream.java
index 8ad0b84..d838205 100644
--- a/luni/src/main/java/javax/crypto/CipherInputStream.java
+++ b/luni/src/main/java/javax/crypto/CipherInputStream.java
@@ -35,8 +35,9 @@ import libcore.io.Streams;
*/
public class CipherInputStream extends FilterInputStream {
+ private static final int I_BUFFER_SIZE = 20;
+
private final Cipher cipher;
- private final int I_BUFFER_SIZE = 20;
private final byte[] i_buffer = new byte[I_BUFFER_SIZE];
private int index; // index of the bytes to return from o_buffer
private byte[] o_buffer;
diff --git a/luni/src/main/java/javax/crypto/spec/SecretKeySpec.java b/luni/src/main/java/javax/crypto/spec/SecretKeySpec.java
index cb70643..1868917 100644
--- a/luni/src/main/java/javax/crypto/spec/SecretKeySpec.java
+++ b/luni/src/main/java/javax/crypto/spec/SecretKeySpec.java
@@ -41,7 +41,6 @@ public class SecretKeySpec implements SecretKey, KeySpec, Serializable {
private final byte[] key;
private final String algorithm;
- private final String format = "RAW";
/**
* Creates a new <code>SecretKeySpec</code> for the specified key data and
@@ -127,7 +126,7 @@ public class SecretKeySpec implements SecretKey, KeySpec, Serializable {
* @return the format name "RAW".
*/
public String getFormat() {
- return format;
+ return "RAW";
}
/**