File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
qulice-checkstyle/src/main/java/com/qulice/checkstyle Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 4747import java .net .URI ;
4848import java .net .URISyntaxException ;
4949import java .net .URL ;
50+ import java .nio .file .Path ;
51+ import java .nio .file .Paths ;
5052import java .util .Collection ;
5153import java .util .LinkedList ;
5254import java .util .List ;
@@ -241,11 +243,9 @@ private URL toUrl(final String name) {
241243 final URL url ;
242244 if (name .startsWith ("file:" )) {
243245 try {
244- url = new URI (name ).toURL ();
246+ url = Paths . get (name . substring ( 5 )). toUri ( ).toURL ();
245247 } catch (final MalformedURLException ex ) {
246248 throw new IllegalStateException ("Invalid URL" , ex );
247- } catch (final URISyntaxException ex ) {
248- throw new IllegalStateException ("Invalid URI" , ex );
249249 }
250250 } else {
251251 url = this .env .classloader ().getResource (name );
You can’t perform that action at this time.
0 commit comments