Github user mattyb149 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1650#discussion_r113245854
  
    --- Diff: 
nifi-nar-bundles/nifi-enrich-bundle/nifi-enrich-processors/src/main/java/org/apache/nifi/processors/GeoEnrichIP.java
 ---
    @@ -208,6 +120,8 @@ public void onTrigger(final ProcessContext context, 
final ProcessSession session
                 attrs.put(new 
StringBuilder(ipAttributeName).append(".geo.longitude").toString(), 
longitude.toString());
             }
     
    +        attrs.put(new 
StringBuilder(ipAttributeName).append(".accuracy").toString(), 
response.getLocation().getAccuracyRadius().toString() );
    --- End diff --
    
    The javadoc for getAccuracyRadius() says "This attribute is only available 
from the Insights end point." Are we guaranteed for that to be the case? 
Perhaps add some defensive code here to only add the attribute if we can 
successfully get the radius (to avoid NPEs, e.g.)


---
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