nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markap14 <...@git.apache.org>
Subject [GitHub] nifi pull request #1214: NIFI-2876 refactored demarcators into a common abst...
Date Thu, 23 Feb 2017 14:40:36 GMT
Github user markap14 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1214#discussion_r102725986
  
    --- Diff: nifi-commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/util/TextLineDemarcator.java
---
    @@ -95,52 +71,61 @@ public OffsetInfo nextOffsetInfo() {
          *
          * @return offset info
          */
    -    public OffsetInfo nextOffsetInfo(byte[] startsWith) {
    +    public OffsetInfo nextOffsetInfo(byte[] startsWith) throws IOException {
    --- End diff --
    
    I'm not sure that i understand the concept here of passing in a `byte[] startsWith`. The
method returns an OffsetInfo regardless. Whether or not it starts with some arbitrary byte
array seems like a very separate concern. Seems like that should be externalized and let the
caller check if it starts with some pattern... or offering a `startsWith(byte[])` method on
OffsetInfo?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message