@Test public void should_normalize_filename_prefix() { AgentConfig config = AgentConfigFactory.createTemplateConfig().toBuilder() .appName(" Some funky App name#'** ") .appVersion("literal =)(%1.2./()¤%&3-Beta4+.RELEASE") .build(); assertThat( config.getFilenamePrefix("prefix---"), is("prefix-somefunkyappname-1.2.3-beta4+.release-")); }
public String getFilenamePrefix(@NonNull String prefix) { String result = String.format("%s-%s-%s-", prefix.replaceAll("-+$", ""), appName, getResolvedAppVersion()); return result.toLowerCase().replaceAll("[^a-z0-9._+-]", ""); }
AgentConfig implements Serializable { public String getFilenamePrefix(@NonNull String prefix) { String result = String.format("%s-%s-%s-", prefix.replaceAll("-+$", ""), appName, getResolvedAppVersion()); return result.toLowerCase().replaceAll("[^a-z0-9._+-]", ""); } }
AgentConfig implements Serializable { public String getFilenamePrefix(@NonNull String prefix) { String result = String.format("%s-%s-%s-", prefix.replaceAll("-+$", ""), appName, getResolvedAppVersion()); return result.toLowerCase().replaceAll("[^a-z0-9._+-]", ""); }  }
AgentConfig implements Serializable { public String getFilenamePrefix(@NonNull String prefix) { String result = String.format("%s-%s-%s-", prefix.replaceAll("-+$", ""), appName, getResolvedAppVersion()); return result.toLowerCase().replaceAll("[^a-z0-9._+-]", ""); }  List<String> getNormalizedPackages(); List<String> getNormalizedExcludePackages(); List<File> getCodeBaseFiles(); MethodAnalyzer getMethodAnalyzer(); String getPollConfigRequestEndpoint(); String getCodeBaseUploadEndpoint(); String getInvocationDataUploadEndpoint(); String getResolvedAppVersion(); OkHttpClient getHttpClient(); String getFilenamePrefix(@NonNull String prefix); CommonPublicationData2 commonPublicationData(); }
AgentConfig implements Serializable { public String getFilenamePrefix(@NonNull String prefix) { String result = String.format("%s-%s-%s-", prefix.replaceAll("-+$", ""), appName, getResolvedAppVersion()); return result.toLowerCase().replaceAll("[^a-z0-9._+-]", ""); }  List<String> getNormalizedPackages(); List<String> getNormalizedExcludePackages(); List<File> getCodeBaseFiles(); MethodAnalyzer getMethodAnalyzer(); String getPollConfigRequestEndpoint(); String getCodeBaseUploadEndpoint(); String getInvocationDataUploadEndpoint(); String getResolvedAppVersion(); OkHttpClient getHttpClient(); String getFilenamePrefix(@NonNull String prefix); CommonPublicationData2 commonPublicationData(); static final String INVOCATIONS_BASENAME; static final String JVM_BASENAME; }