core/src/main/java/io/fabric8/jube/util/InstallHelper.java
public static void writePorts(File portFile, Map<String, String> portMap) throws IOException {
        // lets add the old ports if there were any
        Map<String, String> oldPorts = readPorts(portFile);

        // new ports should override the old
        Map<String, String> fullPortMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
        fullPortMap.putAll(oldPorts);
        fullPortMap.putAll(portMap);

        PrintStream writer = new PrintStream(new FileOutputStream(portFile));
        try {
            writer.println();

            Set<Map.Entry<String, String>> entries = fullPortMap.entrySet();
            for (Map.Entry<String, String> entry : entries) {
                String name = entry.getKey();
                String value = entry.getValue();

                writer.println(name.toUpperCase() + " = " + value);
            }
            writer.println();
        } finally {
            Closeables.closeQuietly(writer);
        }
    }
/**
     * Writes the ports to the ports.properties file
     */
Writes the ports to the ports.properties file
Writes the ports to the ports . properties file
public static void writePorts(File portFile, Map<String, String> portMap) throws IOException {
        Map<String, String> oldPorts = readPorts(portFile);
        Map<String, String> fullPortMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
        fullPortMap.putAll(oldPorts);
        fullPortMap.putAll(portMap);
        PrintStream writer = new PrintStream(new FileOutputStream(portFile));
        try {
            writer.println();
            Set<Map.Entry<String, String>> entries = fullPortMap.entrySet();
            for (Map.Entry<String, String> entry : entries) {
                String name = entry.getKey();
                String value = entry.getValue();
                writer.println(name.toUpperCase() + " = " + value);
            }
            writer.println();
        } finally {
            Closeables.closeQuietly(writer);
        }
    }
public static void writePorts ( File portFile , Map < String , String > portMap ) throws IOException { Map < String , String > oldPorts = readPorts ( portFile ) ; Map < String , String > fullPortMap = new TreeMap < > ( String . CASE_INSENSITIVE_ORDER ) ; fullPortMap . putAll ( oldPorts ) ; fullPortMap . putAll ( portMap ) ; PrintStream writer = new PrintStream ( new FileOutputStream ( portFile ) ) ; try { writer . println ( ) ; Set < Map . Entry < String , String > > entries = fullPortMap . entrySet ( ) ; for ( Map . Entry < String , String > entry : entries ) { String name = entry . getKey ( ) ; String value = entry . getValue ( ) ; writer . println ( name . toUpperCase ( ) + " = " + value ) ; } writer . println ( ) ; } finally { Closeables . closeQuietly ( writer ) ; } }
Writes the ports to the ports.properties file
Writes the ports to the ports . properties file
// lets add the old ports if there were any // new ports should override the old