Merge pull request #6649 from eed3si9n/wip/cast

Fix ClassCastException
This commit is contained in:
eugene yokota 2021-09-05 10:55:58 -04:00 committed by GitHub
commit 776fb8b786
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -22,7 +22,8 @@ import xsbti.*;
* we can avoid loading any classes from the old scala provider.
*/
public class XMainConfiguration {
public xsbti.MainResult run(String moduleName, xsbti.AppConfiguration configuration) {
public xsbti.MainResult run(String moduleName, xsbti.AppConfiguration configuration)
throws Throwable {
try {
ClassLoader topLoader = configuration.provider().scalaProvider().launcher().topLoader();
xsbti.AppConfiguration updatedConfiguration = null;
@ -56,7 +57,7 @@ public class XMainConfiguration {
return (xsbti.MainResult) runMethod.invoke(instance, updatedConfiguration);
} catch (InvocationTargetException e) {
// This propogates xsbti.FullReload to the launcher
throw (xsbti.FullReload) e.getCause();
throw e.getCause();
}
} catch (ReflectiveOperationException e) {
throw new RuntimeException(e);