@@ -340,7 +340,8 @@ protected Map<String, DomAttr> getAttributesFor(final HtmlImage image) {
340340 private static String getSuffix (final WebResponse response ) {
341341 // first try to take the one from the requested file
342342 final String url = response .getWebRequest ().getUrl ().toString ();
343- final String fileName = StringUtils .substringAfterLast (StringUtils .substringBefore (url , "?" ), "/" );
343+ final String fileName =
344+ StringUtils .substringAfterLast (org .htmlunit .util .StringUtils .substringBefore (url , "?" ), "/" );
344345 // if there is a suffix with 2-4 letters, the take it
345346 final String suffix = StringUtils .substringAfterLast (fileName , "." );
346347 if (suffix .length () > 1 && suffix .length () < 5 ) {
@@ -387,8 +388,8 @@ protected boolean isExcluded(final DomElement element) {
387388 private File createFile (final String url , final String extension ) throws IOException {
388389 String name = url .replaceFirst ("/$" , "" );
389390 name = CREATE_FILE_PATTERN .matcher (name ).replaceAll ("" );
390- name = StringUtils .substringBefore (name , "?" ); // remove query
391- name = StringUtils .substringBefore (name , ";" ); // remove additional info
391+ name = org . htmlunit . util . StringUtils .substringBefore (name , "?" ); // remove query
392+ name = org . htmlunit . util . StringUtils .substringBefore (name , ";" ); // remove additional info
392393 name = StringUtils .substring (name , 0 , 30 ); // many file systems have a limit at 255, let's limit it
393394 name = org .htmlunit .util .StringUtils .sanitizeForFileName (name );
394395 if (!name .endsWith (extension )) {
0 commit comments