metron-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ottobackwards <...@git.apache.org>
Subject [GitHub] incubator-metron pull request #333: METRON-249: Field Transformation functio...
Date Mon, 31 Oct 2016 20:10:01 GMT
Github user ottobackwards commented on a diff in the pull request:

    https://github.com/apache/incubator-metron/pull/333#discussion_r85822162
  
    --- Diff: metron-platform/metron-common/src/main/java/org/apache/metron/common/dsl/functions/NetworkFunctions.java
---
    @@ -232,10 +237,15 @@ private static URL toUrl(Object urlObj) {
         if(urlObj == null) {
           return null;
         }
    -    try {
    -      return new URL(urlObj.toString());
    -    } catch (MalformedURLException e) {
    -      return null;
    +    if(urlObj instanceof String) {
    +      try {
    +        return new URL(urlObj.toString());
    +      } catch (MalformedURLException e) {
    --- End diff --
    
    Why would Malformed Url not be an exception as well?   It would be much better to get
a detailed error than null.


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