Skip to content

Conversation

@jlahoda
Copy link
Contributor

@jlahoda jlahoda commented Oct 18, 2020

-that have a name different from any source file in the source roots
-even while running in the editor

But neither of these seems to be working - fixing.

-that have a name different from any source file in the source roots
-even while running in the editor

But neither of these seems to be working - fixing.
@jlahoda jlahoda added the Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) label Oct 18, 2020
@jlahoda jlahoda added this to the 12.2 milestone Oct 18, 2020
@jlahoda jlahoda requested review from lkishalmi and tzezula October 18, 2020 10:22
if (activeRoot == null) {
activeRoot = getClassFolderForApt(l, sibling, baseName);
}
if (activeRoot == null && siblings.hasSibling()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the meat of the fix - the above attempts to compute the target class folder might have failed, because, if sibling is null, it will try to find the original source root based on "baseName" - but if the newly generated classfile's name does not correspond to any source file (which is valid, of course), this search fails. So adding a new layer, using the "siblings" utility.

Copy link
Contributor

@lkishalmi lkishalmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me.

@lkishalmi lkishalmi merged commit 43e625b into apache:delivery Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants