/*
 * MIT License
 *
 * Copyright (c) 2017 JUAN CALVOPINA M
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

package com.jcalvopinam.api.utils;

import org.springframework.util.StringUtils;

/**
 * @author Juan Calvopina M. <juan.calvopina@gmail.com>
 *
 */
public class Commons {

    /**
     * @param valor
     * @return String
     */
    public String formatearResultado(long valor) {
        String resultado = "";
        if (!StringUtils.isEmpty(valor)) {
            resultado = String.valueOf(valor);
            resultado = resultado.substring(0, 2) + "." + resultado.substring(2, 5);
        } else {
            resultado = "0.0";
        }
        return resultado;
    }

}

@@ -1173,54 +1173,8 @@
 s;%0A%0A
-import org.springframework.util.StringUtils;%0A%0A
 /**%0A
@@ -1229,19 +1229,16 @@
 il.com%3E%0A
- *%0A
  */%0Apubl
@@ -1397,54 +1397,30 @@
 o = 
-%22%22;%0A        if (!StringUtils.isEmpty
+String.valueOf
 (valor)
-) %7B
+;
 %0A   
@@ -1416,36 +1416,36 @@
 valor);%0A        
-    
+if (
 resultado = Stri
@@ -1441,33 +1441,25 @@
 tado
- = String.valueOf(valor);
+.length() %3E= 5) %7B
 %0A   

Fix validation logic