Skip to content

Commit

Permalink
FURNACE-95: Catch LinkageError when calling Class.forName
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Dec 1, 2015
1 parent 158dd68 commit 2fa0877
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public <T> ExportedInstance<T> getExportedInstance(String clazz)
{
return getExportedInstance((Class<T>) Class.forName(clazz, false, addon.getClassLoader()));
}
catch (ClassNotFoundException e)
catch (ClassNotFoundException | LinkageError e)
{
return null;
}
Expand Down Expand Up @@ -126,7 +126,7 @@ public boolean hasService(String clazz)
{
return hasService(Class.forName(clazz, false, addon.getClassLoader()));
}
catch (ClassNotFoundException e)
catch (ClassNotFoundException | LinkageError e)
{
return false;
}
Expand Down Expand Up @@ -154,7 +154,7 @@ public <T> Set<ExportedInstance<T>> getExportedInstances(String clazz)
{
return getExportedInstances((Class<T>) Class.forName(clazz, false, addon.getClassLoader()));
}
catch (ClassNotFoundException e)
catch (ClassNotFoundException | LinkageError e)
{
return Collections.emptySet();
}
Expand Down

0 comments on commit 2fa0877

Please sign in to comment.