@Test public void testSetExtraProtocols(){ assertEquals("^(jar|war|war-i|warref|webbundle|wrap|spring|blueprint):.*$", DownloadManagerHelper.getIgnoredProtocolPattern().toString()); List<String> extraProtocols = new ArrayList<>(); extraProtocols.add( "extra1" ); extraProtocols.add( "extra2" ); DownloadManagerHelper.setExtraProtocols( extraProtocols ); assertEquals("^(jar|war|war-i|warref|webbundle|wrap|spring|blueprint|extra1|extra2):.*$", DownloadManagerHelper.getIgnoredProtocolPattern().toString()); }
public static void setExtraProtocols( Collection<String> protocols ){ StringBuilder sb = new StringBuilder( DEFAULT_IGNORED_PROTOCOL_PATTERN ); for (String proto : protocols) { sb.append("|").append(proto); } setIgnoredProtocolPattern(sb.toString()); }
DownloadManagerHelper { public static void setExtraProtocols( Collection<String> protocols ){ StringBuilder sb = new StringBuilder( DEFAULT_IGNORED_PROTOCOL_PATTERN ); for (String proto : protocols) { sb.append("|").append(proto); } setIgnoredProtocolPattern(sb.toString()); } }
DownloadManagerHelper { public static void setExtraProtocols( Collection<String> protocols ){ StringBuilder sb = new StringBuilder( DEFAULT_IGNORED_PROTOCOL_PATTERN ); for (String proto : protocols) { sb.append("|").append(proto); } setIgnoredProtocolPattern(sb.toString()); } private  DownloadManagerHelper(); }
DownloadManagerHelper { public static void setExtraProtocols( Collection<String> protocols ){ StringBuilder sb = new StringBuilder( DEFAULT_IGNORED_PROTOCOL_PATTERN ); for (String proto : protocols) { sb.append("|").append(proto); } setIgnoredProtocolPattern(sb.toString()); } private  DownloadManagerHelper(); static Pattern getIgnoredProtocolPattern(); static void setExtraProtocols( Collection<String> protocols ); static String stripUrl(String url); static String stripStartLevel(String url); static String stripInlinedMavenRepositoryUrl(String url); static String removeInlinedMavenRepositoryUrl(String url); }
DownloadManagerHelper { public static void setExtraProtocols( Collection<String> protocols ){ StringBuilder sb = new StringBuilder( DEFAULT_IGNORED_PROTOCOL_PATTERN ); for (String proto : protocols) { sb.append("|").append(proto); } setIgnoredProtocolPattern(sb.toString()); } private  DownloadManagerHelper(); static Pattern getIgnoredProtocolPattern(); static void setExtraProtocols( Collection<String> protocols ); static String stripUrl(String url); static String stripStartLevel(String url); static String stripInlinedMavenRepositoryUrl(String url); static String removeInlinedMavenRepositoryUrl(String url);  }