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

ASF GitHub Bot commented on METRON-639:
---------------------------------------

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

    https://github.com/apache/incubator-metron/pull/402#discussion_r93672602
  
    --- Diff: 
metron-platform/metron-common/src/main/java/org/apache/metron/common/dsl/functions/NetworkFunctions.java
 ---
    @@ -182,8 +186,8 @@ public Object apply(List<Object> objects) {
       public static class URLToPath extends BaseStellarFunction {
    --- End diff --
    
    Can you add testing around this?  In particular, make sure that fragments 
are handled correctly (`URI` has a separate `getFragment()`, so I assume that 
they are not returned by `getPath()`.  I could be wrong about this, though, I 
haven't run a test on it.).  If this is the case, we may also want/need a 
`TO_FRAGMENT` function that handles this appropriately, although I'm fine with 
that being a separate conversation/jira.


> The Network Stellar functions need to have better unit testing
> --------------------------------------------------------------
>
>                 Key: METRON-639
>                 URL: https://issues.apache.org/jira/browse/METRON-639
>             Project: Metron
>          Issue Type: Bug
>            Reporter: Casey Stella
>
> We have very little unit test coverage around the Networking functions in 
> Stellar at the edge level.  When diving a bit deeper on real data, I found a 
> number of bugs around:
> * Domains with TLDs that are not part of the proper set of TLDs
> * URIs with schemes that Java doesn't know about.
> * IN_SUBNET takes multiple CIDRs, but only evaluates the first one.
> Generally calling validate on these methods can be unsafe because they do not 
> handle null arguments correctly.



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

Reply via email to