Github user arina-ielchiieva commented on a diff in the pull request:

    https://github.com/apache/drill/pull/971#discussion_r146223706
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/NetworkFunctions.java
 ---
    @@ -563,13 +513,13 @@ public void setup() {
     
         public void eval() {
           String ipString = 
org.apache.drill.exec.expr.fn.impl.StringFunctionHelpers.toStringFromUTF8(inputIP.start,
 inputIP.end, inputIP.buffer);
    -      if( ipString == null || ipString.isEmpty() || ipString.length() == 0 
){
    +      if (ipString == null || ipString.isEmpty()) {
             out.value = 0;
           } else {
             org.apache.commons.validator.routines.InetAddressValidator 
validator = 
org.apache.commons.validator.routines.InetAddressValidator.getInstance();
     
             boolean result = validator.isValidInet4Address(ipString);
    -        if( result == true ){
    +        if (result == true) {
    --- End diff --
    
    1. `if (result) {`
    2. we can rename the variable to `valid` -> `if (valid) {`


---

Reply via email to