public static String normalize(String line) {
        //System.out.println("before line=" + line + ";");
        // Normalize line
        line = line.trim();
        Matcher m = intPattern.matcher(line);
        if (m.matches()) {
            String formattedMax = new DecimalFormat("#.#").format(0x7fffffff);
            String formattedMin = new DecimalFormat("#.#").format(-0x80000000);
            line = line.replaceFirst("\\[,", "["+formattedMin+",");
            line = line.replaceFirst(",\\]", ","+formattedMax+"]");
        }
        m = doublePattern.matcher(line);
        if (m.matches()) {
            String formattedMax = new DecimalFormat("#.#").format(1e308);
            String formattedMin = new DecimalFormat("#.#").format(-1e308);
            line = line.replaceFirst("\\[,", "["+formattedMin+",");
            line = line.replaceFirst(",\\]", ","+formattedMax+"]");
        }
        line = removeComment(line);
        if (!line.isEmpty()) {
            line = stripSpaces(line);
            line = line.replaceAll("\\s,", ",");  // Remove space before comma (for enums)
            line += "\n";
        }
        //System.out.println("after line=" + line + ";");
        return line;
    }
Normalizes a config definition line. Each string is normalized according to the
rules of config and definition files before they are used:
<ul>
<li>Remove trailing space.<li>
<li>Remove trailing comments, and spaces before trailing comments.</li>
<li>Remove empty lines</li>
<li>Keep comment lines</li>
</ul>
The supplied list is changed in-place

@param line a config definition line
@return a normalized config definition line
configgen/src/main/java/com/yahoo/config/codegen/NormalizedDefinition.java