@Test public void userAgent() { String userAgent = VersionInfoUtils.userAgent(); assertNotNull(userAgent); }
static String userAgent() { String ua = InternalConfig.Factory.getInternalConfig() .getUserAgentTemplate(); if (ua == null) { return "aws-sdk-java"; } ua = ua .replace("aws","ibm-cos") .replace("{platform}", StringUtils.lowerCase(getPlatform())) .replace("{version}", getVersion()) .replace("{os.name}", replaceSpaces(System.getProperty("os.name"))) .replace("{os.version}", replaceSpaces(System.getProperty("os.version"))) .replace("{java.vm.name}", replaceSpaces(System.getProperty("java.vm.name"))) .replace("{java.vm.version}", replaceSpaces(System.getProperty("java.vm.version"))) .replace("{java.version}", replaceSpaces(System.getProperty("java.version"))) .replace("{additional.languages}", getAdditionalJvmLanguages()); String language = System.getProperty("user.language"); String region = System.getProperty("user.region"); String languageAndRegion = ""; if (language != null && region != null) { languageAndRegion = " " + replaceSpaces(language) + "_" + replaceSpaces(region); } ua = ua.replace("{language.and.region}", languageAndRegion); return ua; }
VersionInfoUtils { static String userAgent() { String ua = InternalConfig.Factory.getInternalConfig() .getUserAgentTemplate(); if (ua == null) { return "aws-sdk-java"; } ua = ua .replace("aws","ibm-cos") .replace("{platform}", StringUtils.lowerCase(getPlatform())) .replace("{version}", getVersion()) .replace("{os.name}", replaceSpaces(System.getProperty("os.name"))) .replace("{os.version}", replaceSpaces(System.getProperty("os.version"))) .replace("{java.vm.name}", replaceSpaces(System.getProperty("java.vm.name"))) .replace("{java.vm.version}", replaceSpaces(System.getProperty("java.vm.version"))) .replace("{java.version}", replaceSpaces(System.getProperty("java.version"))) .replace("{additional.languages}", getAdditionalJvmLanguages()); String language = System.getProperty("user.language"); String region = System.getProperty("user.region"); String languageAndRegion = ""; if (language != null && region != null) { languageAndRegion = " " + replaceSpaces(language) + "_" + replaceSpaces(region); } ua = ua.replace("{language.and.region}", languageAndRegion); return ua; } }
VersionInfoUtils { static String userAgent() { String ua = InternalConfig.Factory.getInternalConfig() .getUserAgentTemplate(); if (ua == null) { return "aws-sdk-java"; } ua = ua .replace("aws","ibm-cos") .replace("{platform}", StringUtils.lowerCase(getPlatform())) .replace("{version}", getVersion()) .replace("{os.name}", replaceSpaces(System.getProperty("os.name"))) .replace("{os.version}", replaceSpaces(System.getProperty("os.version"))) .replace("{java.vm.name}", replaceSpaces(System.getProperty("java.vm.name"))) .replace("{java.vm.version}", replaceSpaces(System.getProperty("java.vm.version"))) .replace("{java.version}", replaceSpaces(System.getProperty("java.version"))) .replace("{additional.languages}", getAdditionalJvmLanguages()); String language = System.getProperty("user.language"); String region = System.getProperty("user.region"); String languageAndRegion = ""; if (language != null && region != null) { languageAndRegion = " " + replaceSpaces(language) + "_" + replaceSpaces(region); } ua = ua.replace("{language.and.region}", languageAndRegion); return ua; }  }
VersionInfoUtils { static String userAgent() { String ua = InternalConfig.Factory.getInternalConfig() .getUserAgentTemplate(); if (ua == null) { return "aws-sdk-java"; } ua = ua .replace("aws","ibm-cos") .replace("{platform}", StringUtils.lowerCase(getPlatform())) .replace("{version}", getVersion()) .replace("{os.name}", replaceSpaces(System.getProperty("os.name"))) .replace("{os.version}", replaceSpaces(System.getProperty("os.version"))) .replace("{java.vm.name}", replaceSpaces(System.getProperty("java.vm.name"))) .replace("{java.vm.version}", replaceSpaces(System.getProperty("java.vm.version"))) .replace("{java.version}", replaceSpaces(System.getProperty("java.version"))) .replace("{additional.languages}", getAdditionalJvmLanguages()); String language = System.getProperty("user.language"); String region = System.getProperty("user.region"); String languageAndRegion = ""; if (language != null && region != null) { languageAndRegion = " " + replaceSpaces(language) + "_" + replaceSpaces(region); } ua = ua.replace("{language.and.region}", languageAndRegion); return ua; }  static String getVersion(); static String getPlatform(); static String getUserAgent(); }
VersionInfoUtils { static String userAgent() { String ua = InternalConfig.Factory.getInternalConfig() .getUserAgentTemplate(); if (ua == null) { return "aws-sdk-java"; } ua = ua .replace("aws","ibm-cos") .replace("{platform}", StringUtils.lowerCase(getPlatform())) .replace("{version}", getVersion()) .replace("{os.name}", replaceSpaces(System.getProperty("os.name"))) .replace("{os.version}", replaceSpaces(System.getProperty("os.version"))) .replace("{java.vm.name}", replaceSpaces(System.getProperty("java.vm.name"))) .replace("{java.vm.version}", replaceSpaces(System.getProperty("java.vm.version"))) .replace("{java.version}", replaceSpaces(System.getProperty("java.version"))) .replace("{additional.languages}", getAdditionalJvmLanguages()); String language = System.getProperty("user.language"); String region = System.getProperty("user.region"); String languageAndRegion = ""; if (language != null && region != null) { languageAndRegion = " " + replaceSpaces(language) + "_" + replaceSpaces(region); } ua = ua.replace("{language.and.region}", languageAndRegion); return ua; }  static String getVersion(); static String getPlatform(); static String getUserAgent();  }