private void ensureDir(Map mysqldArgs, File expected, String key) { String dirString = (String) mysqldArgs.get(key); if (dirString != null) { File asConnonical = utils.files().validCononicalDir( new File(dirString)); if (!expected.equals(asConnonical)) { String msg = dirString + " not equal to " + expected; throw new IllegalArgumentException(msg); } } mysqldArgs.put(key, utils.files().getPath(expected)); }
private void ensureDir(Map mysqldArgs, File expected, String key) { String dirString = (String) mysqldArgs.get(key); if (dirString != null) { File asConnonical = utils.files().validCononicalDir( new File(dirString)); if (!expected.equals(asConnonical)) { String msg = dirString + " not equal to " + expected; throw new IllegalArgumentException(msg); } } mysqldArgs.put(key, utils.files().getPath(expected)); }
protected String[] constructArgs(Map mysqldArgs) { List strs = new ArrayList(); strs.add(utils.files().getPath(getMysqldFilePointer())); strs.add("--no-defaults"); if (isWindows()) { strs.add("--console"); } Iterator it = mysqldArgs.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); String key = (String) entry.getKey(); String value = (String) entry.getValue(); StringBuffer buf = new StringBuffer("--"); buf.append(key); if (value != null) { buf.append("="); buf.append(value); } strs.add(buf.toString()); } return utils.str().toStringArray(strs); }
String[] constructArgs(Map mysqldArgs) { List strs = new ArrayList(); strs.add(utils.files().getPath(getMysqldFilePointer())); strs.add("--no-defaults"); if (isWindows()) { strs.add("--console"); } Iterator it = mysqldArgs.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); String key = (String) entry.getKey(); String value = (String) entry.getValue(); StringBuffer buf = new StringBuffer("--"); buf.append(key); if (value != null) { buf.append("="); buf.append(value); } strs.add(buf.toString()); } return utils.str().toStringArray(strs); }