@Test public void parseEmptyParameters() { assertTrue(ParserUtil.parseGeneratorParameters("").isEmpty()); }
public static Map<String, String> parseGeneratorParameters(String parameter) { if (parameter == null || parameter.isEmpty()) return Collections.emptyMap(); HashMap<String, String> map = new HashMap<>(); String[] parts = parameter.split(","); for (String part : parts) { int equalsIndex = part.indexOf("="); if (equalsIndex == -1) { map.put(part, ""); } else { String key = part.substring(0, equalsIndex); String value = part.substring(equalsIndex + 1); map.put(key, value); } } return map; }
ParserUtil { public static Map<String, String> parseGeneratorParameters(String parameter) { if (parameter == null || parameter.isEmpty()) return Collections.emptyMap(); HashMap<String, String> map = new HashMap<>(); String[] parts = parameter.split(","); for (String part : parts) { int equalsIndex = part.indexOf("="); if (equalsIndex == -1) { map.put(part, ""); } else { String key = part.substring(0, equalsIndex); String value = part.substring(equalsIndex + 1); map.put(key, value); } } return map; } }
ParserUtil { public static Map<String, String> parseGeneratorParameters(String parameter) { if (parameter == null || parameter.isEmpty()) return Collections.emptyMap(); HashMap<String, String> map = new HashMap<>(); String[] parts = parameter.split(","); for (String part : parts) { int equalsIndex = part.indexOf("="); if (equalsIndex == -1) { map.put(part, ""); } else { String key = part.substring(0, equalsIndex); String value = part.substring(equalsIndex + 1); map.put(key, value); } } return map; }  }
ParserUtil { public static Map<String, String> parseGeneratorParameters(String parameter) { if (parameter == null || parameter.isEmpty()) return Collections.emptyMap(); HashMap<String, String> map = new HashMap<>(); String[] parts = parameter.split(","); for (String part : parts) { int equalsIndex = part.indexOf("="); if (equalsIndex == -1) { map.put(part, ""); } else { String key = part.substring(0, equalsIndex); String value = part.substring(equalsIndex + 1); map.put(key, value); } } return map; }  static Map<String, String> getGeneratorParameters(CodeGeneratorRequest request); static Map<String, String> parseGeneratorParameters(String parameter); static CodeGeneratorResponse asErrorWithStackTrace(Exception e); static CodeGeneratorResponse asError(String errorMessage); }
ParserUtil { public static Map<String, String> parseGeneratorParameters(String parameter) { if (parameter == null || parameter.isEmpty()) return Collections.emptyMap(); HashMap<String, String> map = new HashMap<>(); String[] parts = parameter.split(","); for (String part : parts) { int equalsIndex = part.indexOf("="); if (equalsIndex == -1) { map.put(part, ""); } else { String key = part.substring(0, equalsIndex); String value = part.substring(equalsIndex + 1); map.put(key, value); } } return map; }  static Map<String, String> getGeneratorParameters(CodeGeneratorRequest request); static Map<String, String> parseGeneratorParameters(String parameter); static CodeGeneratorResponse asErrorWithStackTrace(Exception e); static CodeGeneratorResponse asError(String errorMessage);  }