MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / replaceExt

Method replaceExt

src/converter/one/convert/Main.java:112–117  ·  view source on GitHub ↗
(String fileName, String output)

Source from the content-addressed store, hash-verified

110 }
111
112 private static String replaceExt(String fileName, String output) {
113 String ext = "heatmap".equals(output) ? "html" : output;
114 int slash = fileName.lastIndexOf(File.separatorChar);
115 int dot = fileName.lastIndexOf('.');
116 return dot > slash ? fileName.substring(slash + 1, dot + 1) + ext : fileName.substring(slash + 1) + '.' + ext;
117 }
118
119 private static boolean isJfr(String fileName) throws IOException {
120 if (fileName.endsWith(".jfr")) {

Callers 1

mainMethod · 0.95

Calls 1

equalsMethod · 0.45

Tested by

no test coverage detected