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

bug: comment not attached to element (error message in log) #2209

Closed
surli opened this issue Jul 12, 2018 · 0 comments · Fixed by #2587
Closed

bug: comment not attached to element (error message in log) #2209

surli opened this issue Jul 12, 2018 · 0 comments · Fixed by #2587
Labels

Comments

@surli
Copy link
Collaborator

surli commented Jul 12, 2018

I see the following stack trace in the logs:

2018-07-12 17:41:16,176 ERROR spoon.support.compiler.jdt.JDTCommentBuilder - // prevent users from disabling is not added into the AST
spoon.reflect.declaration.ParentNotInitializedException: parent not initialized for class spoon.support.reflect.code.CtCommentImpl (/Users/urli/Github/runelite/runelite-client/src/main/java/net/runelite/client/plugins/config/ConfigPlugin.java:46)
	at spoon.support.reflect.declaration.CtElementImpl.getParent(CtElementImpl.java:365)
	at spoon.support.compiler.jdt.JDTCommentBuilder.insertCommentInAST(JDTCommentBuilder.java:485)
	at spoon.support.compiler.jdt.JDTCommentBuilder.buildComment(JDTCommentBuilder.java:156)
	at spoon.support.compiler.jdt.JDTCommentBuilder.build(JDTCommentBuilder.java:112)
	at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildModel(JDTBasedSpoonCompiler.java:480)
	at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildUnitsAndModel(JDTBasedSpoonCompiler.java:391)
	at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildSources(JDTBasedSpoonCompiler.java:340)
	at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.build(JDTBasedSpoonCompiler.java:129)
	at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.build(JDTBasedSpoonCompiler.java:113)
	at spoon.Launcher.buildModel(Launcher.java:769)
	at Main.main(Main.java:10)

Reproduction steps:

git clone https://github.com/runelite/runelite
git checkout runelite-parent-1.4.7
cd runelite/runelite-client
mvn dependency:build-classpath
Launcher launcher = new Launcher();
        launcher.addInputResource("runelite/runelite-client/src/main/java");
        launcher.getEnvironment().setSourceClasspath(CLASSPATH.split(":"));
        CtModel model = launcher.buildModel();
@surli surli added the bug label Jul 12, 2018
@monperrus monperrus changed the title bug: ParentNotInitializedException with comments bug: comment not attached to element (error message in log) Oct 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant