Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected Exception #1

Closed
jasyn opened this issue Jun 26, 2015 · 1 comment
Closed

Unexpected Exception #1

jasyn opened this issue Jun 26, 2015 · 1 comment
Assignees

Comments

@jasyn
Copy link

jasyn commented Jun 26, 2015

trying to refactor a this class I get "An unexpected exception occurred while creating a change object. See error log for more details."

in the error log:
Internal Error

Exception Stack Trace:

java.lang.reflect.InvocationTargetException
    at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:423)
    at org.eclipse.ui.internal.WorkbenchWindow$13.run(WorkbenchWindow.java:2157)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2153)
    at org.eclipse.ltk.ui.refactoring.RefactoringWizard.createChange(RefactoringWizard.java:663)
    at org.eclipse.ltk.ui.refactoring.RefactoringWizard.computeUserInputSuccessorPage(RefactoringWizard.java:502)
    at org.eclipse.ltk.ui.refactoring.RefactoringWizard.getStartingPage(RefactoringWizard.java:472)
    at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.createContents(RefactoringWizardDialog2.java:613)
    at org.eclipse.jface.window.Window.create(Window.java:435)
    at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1101)
    at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation$1.run(RefactoringWizardOpenOperation.java:178)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:202)
    at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:122)
    at gr.uom.java.jdeodorant.refactoring.views.TypeChecking$6.run(TypeChecking.java:599)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:519)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
    at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:462)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4454)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1388)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3799)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3409)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Caused by: java.lang.IllegalStateException: source not specified
    at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:807)
    at gr.uom.java.jdeodorant.refactoring.manipulators.ReplaceConditionalWithPolymorphism.modifyInheritanceHierarchy(ReplaceConditionalWithPolymorphism.java:271)
    at gr.uom.java.jdeodorant.refactoring.manipulators.ReplaceConditionalWithPolymorphism.apply(ReplaceConditionalWithPolymorphism.java:94)
    at gr.uom.java.jdeodorant.refactoring.manipulators.ReplaceConditionalWithPolymorphism.checkFinalConditions(ReplaceConditionalWithPolymorphism.java:973)
    at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:85)
    at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:121)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
    at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Root exception:
java.lang.IllegalStateException: source not specified
    at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:807)
    at gr.uom.java.jdeodorant.refactoring.manipulators.ReplaceConditionalWithPolymorphism.modifyInheritanceHierarchy(ReplaceConditionalWithPolymorphism.java:271)
    at gr.uom.java.jdeodorant.refactoring.manipulators.ReplaceConditionalWithPolymorphism.apply(ReplaceConditionalWithPolymorphism.java:94)
    at gr.uom.java.jdeodorant.refactoring.manipulators.ReplaceConditionalWithPolymorphism.checkFinalConditions(ReplaceConditionalWithPolymorphism.java:973)
    at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:85)
    at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:121)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
    at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)

Session Data:

eclipse.buildId=4.4.2.M20150204-1700
java.version=1.8.0_45
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=pl_PL
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os linux -ws gtk -arch x86 -product org.eclipse.epp.package.java.product
@tsantalis tsantalis self-assigned this Jun 26, 2015
@tsantalis
Copy link
Owner

Thank you for your bug report.
The problem was created because in the example you gave the classes of the inheritance hierarchy belong to the same CompilationUnit (Java file) with the code performing the Runtime Type Identification.
This issue has been fixed and will be included in the next release of JDeodorant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants