Skip to content

Commit 0e504af

Browse files
author
emmanue1
committed
Fix ClassCastException
1 parent ee820d1 commit 0e504af

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/src/main/java/org/jd/gui/service/extension/ExtensionService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ protected ExtensionService() {
3737
searchJarAndMetaInf(urls, extDirectory);
3838

3939
if (!urls.isEmpty()) {
40-
URL[] array = (URL[])urls.toArray();
40+
URL[] array = urls.toArray(new URL[urls.size()]);
4141
Arrays.sort(array, URL_COMPARATOR);
4242
extensionClassLoader = new URLClassLoader(array, ExtensionService.class.getClassLoader());
4343
}
4444
}
4545
} catch (Exception e) {
46-
ExceptionUtil.printStackTrace(e);
46+
assert ExceptionUtil.printStackTrace(e);
4747
}
4848

4949
extensionClassLoader = ExtensionService.class.getClassLoader();

app/src/main/java/org/jd/gui/util/net/UriUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public static URI createURI(API api, Collection<Indexes> collectionOfIndexes, Co
3737
try {
3838
return new URI(uri.getScheme(), uri.getHost(), path, query, fragment);
3939
} catch (URISyntaxException e) {
40-
ExceptionUtil.printStackTrace(e);
40+
assert ExceptionUtil.printStackTrace(e);
4141
}
4242
}
4343
}

0 commit comments

Comments
 (0)