You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by sg...@apache.org on 2005/05/09 13:59:19 UTC
cvs commit: jakarta-turbine-fulcrum/yaafi/src/java/org/apache/fulcrum/jce/crypto CryptoUtil.java
sgoeschl 2005/05/09 04:59:19
Modified: yaafi/src/java/org/apache/fulcrum/jce/crypto CryptoUtil.java
Log:
Using constant instead of the string literal to get rid of PMD warnings
Revision Changes Path
1.3 +5 -2 jakarta-turbine-fulcrum/yaafi/src/java/org/apache/fulcrum/jce/crypto/CryptoUtil.java
Index: CryptoUtil.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-fulcrum/yaafi/src/java/org/apache/fulcrum/jce/crypto/CryptoUtil.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CryptoUtil.java 1 Mar 2005 10:41:06 -0000 1.2
+++ CryptoUtil.java 9 May 2005 11:59:19 -0000 1.3
@@ -38,7 +38,10 @@
*/
public final class CryptoUtil
-{
+{
+ /** the size of the internal buffer to copy streams */
+ private static final int BUFFER_SIZE = 1024;
+
/**
* Copies from a source to a target object using encryption
*
@@ -290,7 +293,7 @@
public static void copy( InputStream is, OutputStream os )
throws IOException
{
- byte[] buf = new byte[1024];
+ byte[] buf = new byte[BUFFER_SIZE];
int n = 0;
int total = 0;
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org