You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by "Joseph Witt (JIRA)" <ji...@apache.org> on 2014/12/30 17:09:13 UTC

[jira] [Commented] (NIFI-181) ListenHTTP Max Data rate doesn't work due to bug in LeakyBucketStreamThrottler

    [ https://issues.apache.org/jira/browse/NIFI-181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14261207#comment-14261207 ] 

Joseph Witt commented on NIFI-181:
----------------------------------

"Seems legit" +1

> ListenHTTP Max Data rate doesn't work due to bug in LeakyBucketStreamThrottler
> ------------------------------------------------------------------------------
>
>                 Key: NIFI-181
>                 URL: https://issues.apache.org/jira/browse/NIFI-181
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 0.0.1
>            Reporter: Michael Moser
>            Assignee: Mark Payne
>            Priority: Minor
>             Fix For: 0.0.1
>
>
> ListenHTTP throws ArrayIndexOutOfBoundsException when the property Max Data to Receive per Second is set.  This was traced to a bug in LeakyBucketStreamThrottler.
> {code:title=commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/LeakyBucketStreamThrottler.java Line 114}
>             public int read(byte[] b, int off, int len) throws IOException {
> +               if ( len < 0 ) {
> +                   throw new IllegalArgumentException();
> +               }
> +               if ( len == 0 ) {
> +                   return 0;
> +               }
>                 baos.reset();
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)