You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by pa...@apache.org on 2016/12/18 13:34:46 UTC
commons-io git commit: MessageDigestCalculatingInputStream: fix
javadoc warnings
Repository: commons-io
Updated Branches:
refs/heads/master 593de775b -> 4aebb1129
MessageDigestCalculatingInputStream: fix javadoc warnings
Project: http://git-wip-us.apache.org/repos/asf/commons-io/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-io/commit/4aebb112
Tree: http://git-wip-us.apache.org/repos/asf/commons-io/tree/4aebb112
Diff: http://git-wip-us.apache.org/repos/asf/commons-io/diff/4aebb112
Branch: refs/heads/master
Commit: 4aebb1129d397b20c8f911ccdf1e3595f020d127
Parents: 593de77
Author: pascalschumacher <pa...@gmx.net>
Authored: Sun Dec 18 14:34:23 2016 +0100
Committer: pascalschumacher <pa...@gmx.net>
Committed: Sun Dec 18 14:34:39 2016 +0100
----------------------------------------------------------------------
.../io/input/MessageDigestCalculatingInputStream.java | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-io/blob/4aebb112/src/main/java/org/apache/commons/io/input/MessageDigestCalculatingInputStream.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/io/input/MessageDigestCalculatingInputStream.java b/src/main/java/org/apache/commons/io/input/MessageDigestCalculatingInputStream.java
index cfb345d..c360560 100644
--- a/src/main/java/org/apache/commons/io/input/MessageDigestCalculatingInputStream.java
+++ b/src/main/java/org/apache/commons/io/input/MessageDigestCalculatingInputStream.java
@@ -24,12 +24,13 @@ import java.security.NoSuchAlgorithmException;
/**
* This class is an example for using an {@link ObservableInputStream}. It
- * creates its own {@link Observer}, which calculates a checksum using a
- * MessageDigest, for example an MD5 sum.
- * {@em Note}: Neither {@link ObservableInputStream}, nor {@link MessageDigest},
+ * creates its own {@link org.apache.commons.io.input.ObservableInputStream.Observer},
+ * which calculates a checksum using a MessageDigest, for example an MD5 sum.
+ * <em>Note</em>: Neither {@link ObservableInputStream}, nor {@link MessageDigest},
* are thread safe. So is {@link MessageDigestCalculatingInputStream}.
*/
public class MessageDigestCalculatingInputStream extends ObservableInputStream {
+
public static class MessageDigestMaintainingObserver extends Observer {
private final MessageDigest md;
@@ -58,12 +59,14 @@ public class MessageDigestCalculatingInputStream extends ObservableInputStream {
messageDigest = pDigest;
add(new MessageDigestMaintainingObserver(pDigest));
}
+
/** Creates a new instance, which calculates a signature on the given stream,
* using a {@link MessageDigest} with the given algorithm.
*/
public MessageDigestCalculatingInputStream(InputStream pStream, String pAlgorithm) throws NoSuchAlgorithmException {
this(pStream, MessageDigest.getInstance(pAlgorithm));
}
+
/** Creates a new instance, which calculates a signature on the given stream,
* using a {@link MessageDigest} with the "MD5" algorithm.
*/
@@ -73,7 +76,7 @@ public class MessageDigestCalculatingInputStream extends ObservableInputStream {
/** Returns the {@link MessageDigest}, which is being used for generating the
* checksum.
- * {@em Note}: The checksum will only reflect the data, which has been read so far.
+ * <em>Note</em>: The checksum will only reflect the data, which has been read so far.
* This is probably not, what you expect. Make sure, that the complete data has been
* read, if that is what you want. The easiest way to do so is by invoking
* {@link #consume()}.
Re: Fwd: commons-io git commit: MessageDigestCalculatingInputStream:
fix javadoc warnings
Posted by Pascal Schumacher <pa...@gmx.net>.
Was added with
https://github.com/apache/commons-io/commit/e180578289a5c65e19e430bd3300a72c9ba97a9b
which was not released yet. So it could be moved to codec.
Am 18.12.2016 um 18:16 schrieb Gary Gregory:
> Wait a sec. Why is this class in IO? We have Commons Codec which contains
> all things MessageDigest related already.
> Shouldn't this class be in Codec?
>
> Gary
> ---------- Forwarded message ----------
> From: <pa...@apache.org>
> Date: Dec 18, 2016 5:34 AM
> Subject: commons-io git commit: MessageDigestCalculatingInputStream: fix
> javadoc warnings
> To: <co...@commons.apache.org>
> Cc:
>
> Repository: commons-io
>> Updated Branches:
>> refs/heads/master 593de775b -> 4aebb1129
>>
>>
>> MessageDigestCalculatingInputStream: fix javadoc warnings
>>
>>
>> Project: http://git-wip-us.apache.org/repos/asf/commons-io/repo
>> Commit: http://git-wip-us.apache.org/repos/asf/commons-io/commit/4aebb112
>> Tree: http://git-wip-us.apache.org/repos/asf/commons-io/tree/4aebb112
>> Diff: http://git-wip-us.apache.org/repos/asf/commons-io/diff/4aebb112
>>
>> Branch: refs/heads/master
>> Commit: 4aebb1129d397b20c8f911ccdf1e3595f020d127
>> Parents: 593de77
>> Author: pascalschumacher <pa...@gmx.net>
>> Authored: Sun Dec 18 14:34:23 2016 +0100
>> Committer: pascalschumacher <pa...@gmx.net>
>> Committed: Sun Dec 18 14:34:39 2016 +0100
>>
>> ----------------------------------------------------------------------
>> .../io/input/MessageDigestCalculatingInputStream.java | 11 +++++++----
>> 1 file changed, 7 insertions(+), 4 deletions(-)
>> ----------------------------------------------------------------------
>>
>>
>> http://git-wip-us.apache.org/repos/asf/commons-io/blob/
>> 4aebb112/src/main/java/org/apache/commons/io/input/
>> MessageDigestCalculatingInputStream.java
>> ----------------------------------------------------------------------
>> diff --git a/src/main/java/org/apache/commons/io/input/
>> MessageDigestCalculatingInputStream.java b/src/main/java/org/apache/
>> commons/io/input/MessageDigestCalculatingInputStream.java
>> index cfb345d..c360560 100644
>> --- a/src/main/java/org/apache/commons/io/input/
>> MessageDigestCalculatingInputStream.java
>> +++ b/src/main/java/org/apache/commons/io/input/
>> MessageDigestCalculatingInputStream.java
>> @@ -24,12 +24,13 @@ import java.security.NoSuchAlgorithmException;
>>
>> /**
>> * This class is an example for using an {@link ObservableInputStream}. It
>> - * creates its own {@link Observer}, which calculates a checksum using a
>> - * MessageDigest, for example an MD5 sum.
>> - * {@em Note}: Neither {@link ObservableInputStream}, nor {@link
>> MessageDigest},
>> + * creates its own {@link org.apache.commons.io.input.
>> ObservableInputStream.Observer},
>> + * which calculates a checksum using a MessageDigest, for example an MD5
>> sum.
>> + * <em>Note</em>: Neither {@link ObservableInputStream}, nor {@link
>> MessageDigest},
>> * are thread safe. So is {@link MessageDigestCalculatingInputStream}.
>> */
>> public class MessageDigestCalculatingInputStream extends
>> ObservableInputStream {
>> +
>> public static class MessageDigestMaintainingObserver extends
>> Observer {
>> private final MessageDigest md;
>>
>> @@ -58,12 +59,14 @@ public class MessageDigestCalculatingInputStream
>> extends ObservableInputStream {
>> messageDigest = pDigest;
>> add(new MessageDigestMaintainingObserver(pDigest));
>> }
>> +
>> /** Creates a new instance, which calculates a signature on the given
>> stream,
>> * using a {@link MessageDigest} with the given algorithm.
>> */
>> public MessageDigestCalculatingInputStream(InputStream pStream,
>> String pAlgorithm) throws NoSuchAlgorithmException {
>> this(pStream, MessageDigest.getInstance(pAlgorithm));
>> }
>> +
>> /** Creates a new instance, which calculates a signature on the given
>> stream,
>> * using a {@link MessageDigest} with the "MD5" algorithm.
>> */
>> @@ -73,7 +76,7 @@ public class MessageDigestCalculatingInputStream
>> extends ObservableInputStream {
>>
>> /** Returns the {@link MessageDigest}, which is being used for
>> generating the
>> * checksum.
>> - * {@em Note}: The checksum will only reflect the data, which has
>> been read so far.
>> + * <em>Note</em>: The checksum will only reflect the data, which has
>> been read so far.
>> * This is probably not, what you expect. Make sure, that the
>> complete data has been
>> * read, if that is what you want. The easiest way to do so is by
>> invoking
>> * {@link #consume()}.
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Fwd: commons-io git commit: MessageDigestCalculatingInputStream: fix
javadoc warnings
Posted by Gary Gregory <ga...@gmail.com>.
Wait a sec. Why is this class in IO? We have Commons Codec which contains
all things MessageDigest related already.
Shouldn't this class be in Codec?
Gary
---------- Forwarded message ----------
From: <pa...@apache.org>
Date: Dec 18, 2016 5:34 AM
Subject: commons-io git commit: MessageDigestCalculatingInputStream: fix
javadoc warnings
To: <co...@commons.apache.org>
Cc:
Repository: commons-io
> Updated Branches:
> refs/heads/master 593de775b -> 4aebb1129
>
>
> MessageDigestCalculatingInputStream: fix javadoc warnings
>
>
> Project: http://git-wip-us.apache.org/repos/asf/commons-io/repo
> Commit: http://git-wip-us.apache.org/repos/asf/commons-io/commit/4aebb112
> Tree: http://git-wip-us.apache.org/repos/asf/commons-io/tree/4aebb112
> Diff: http://git-wip-us.apache.org/repos/asf/commons-io/diff/4aebb112
>
> Branch: refs/heads/master
> Commit: 4aebb1129d397b20c8f911ccdf1e3595f020d127
> Parents: 593de77
> Author: pascalschumacher <pa...@gmx.net>
> Authored: Sun Dec 18 14:34:23 2016 +0100
> Committer: pascalschumacher <pa...@gmx.net>
> Committed: Sun Dec 18 14:34:39 2016 +0100
>
> ----------------------------------------------------------------------
> .../io/input/MessageDigestCalculatingInputStream.java | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/commons-io/blob/
> 4aebb112/src/main/java/org/apache/commons/io/input/
> MessageDigestCalculatingInputStream.java
> ----------------------------------------------------------------------
> diff --git a/src/main/java/org/apache/commons/io/input/
> MessageDigestCalculatingInputStream.java b/src/main/java/org/apache/
> commons/io/input/MessageDigestCalculatingInputStream.java
> index cfb345d..c360560 100644
> --- a/src/main/java/org/apache/commons/io/input/
> MessageDigestCalculatingInputStream.java
> +++ b/src/main/java/org/apache/commons/io/input/
> MessageDigestCalculatingInputStream.java
> @@ -24,12 +24,13 @@ import java.security.NoSuchAlgorithmException;
>
> /**
> * This class is an example for using an {@link ObservableInputStream}. It
> - * creates its own {@link Observer}, which calculates a checksum using a
> - * MessageDigest, for example an MD5 sum.
> - * {@em Note}: Neither {@link ObservableInputStream}, nor {@link
> MessageDigest},
> + * creates its own {@link org.apache.commons.io.input.
> ObservableInputStream.Observer},
> + * which calculates a checksum using a MessageDigest, for example an MD5
> sum.
> + * <em>Note</em>: Neither {@link ObservableInputStream}, nor {@link
> MessageDigest},
> * are thread safe. So is {@link MessageDigestCalculatingInputStream}.
> */
> public class MessageDigestCalculatingInputStream extends
> ObservableInputStream {
> +
> public static class MessageDigestMaintainingObserver extends
> Observer {
> private final MessageDigest md;
>
> @@ -58,12 +59,14 @@ public class MessageDigestCalculatingInputStream
> extends ObservableInputStream {
> messageDigest = pDigest;
> add(new MessageDigestMaintainingObserver(pDigest));
> }
> +
> /** Creates a new instance, which calculates a signature on the given
> stream,
> * using a {@link MessageDigest} with the given algorithm.
> */
> public MessageDigestCalculatingInputStream(InputStream pStream,
> String pAlgorithm) throws NoSuchAlgorithmException {
> this(pStream, MessageDigest.getInstance(pAlgorithm));
> }
> +
> /** Creates a new instance, which calculates a signature on the given
> stream,
> * using a {@link MessageDigest} with the "MD5" algorithm.
> */
> @@ -73,7 +76,7 @@ public class MessageDigestCalculatingInputStream
> extends ObservableInputStream {
>
> /** Returns the {@link MessageDigest}, which is being used for
> generating the
> * checksum.
> - * {@em Note}: The checksum will only reflect the data, which has
> been read so far.
> + * <em>Note</em>: The checksum will only reflect the data, which has
> been read so far.
> * This is probably not, what you expect. Make sure, that the
> complete data has been
> * read, if that is what you want. The easiest way to do so is by
> invoking
> * {@link #consume()}.
>
>