Github user steveyh25 commented on the pull request:

    https://github.com/apache/nifi/pull/305#issuecomment-202630454
  
    @olegz,
    
    Please see latest commit. The try-catch block has been removed and I've 
changed the validation slightly like was spoken about. It appears as though we 
don't need to worry about NPE, because if no value is provided for the flow 
attribute then it appears to be ignored anyway (i.e it is not a part of 
flowFile.getAttributes()).
    
    I couldn't find any great way of dealing with the parsing of values other 
than catching the NumberFormatException - things like StringUtils.isNumeric() 
are nice but we can still be in a situation where a number is deemed to be 
numeric but parseInt will throw an exception anyway because the number's too 
big to store - I hope this solution is ok, unless there is a specific way of 
validating this that you would like?
    
    I've made specific warnings occur if a property fails validation, including 
out of range values.
    
    Let me know what you think,
    Thanks


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to