Skip to content

Fix #339 - In the Java 5-6 era, ECJ was patched to be bug-compatible …#340

Merged
stephan-herrmann merged 1 commit intoeclipse-jdt:masterfrom
gzsombor:fix-visibility-in-annotations-bug-339
Sep 11, 2022
Merged

Fix #339 - In the Java 5-6 era, ECJ was patched to be bug-compatible …#340
stephan-herrmann merged 1 commit intoeclipse-jdt:masterfrom
gzsombor:fix-visibility-in-annotations-bug-339

Conversation

@gzsombor
Copy link
Contributor

@gzsombor gzsombor commented Aug 24, 2022

…with Javac of that time.

Luckily, Javac fixed so the hack is not needed anymore - infact this makes ECJ not following JLS properly

What it does

Described in #339

How to test

Try compiling the code:

public class X {
	
	String z() { return Y.MSG; }

	@WithMsg(Y.MSG)
	static class Y {
		private final static String MSG = "msg";
	}
}
@interface WithMsg {
	String value();
}

Author checklist

@gzsombor gzsombor force-pushed the fix-visibility-in-annotations-bug-339 branch from e922e1f to cdaea2e Compare August 25, 2022 06:07
@gzsombor gzsombor force-pushed the fix-visibility-in-annotations-bug-339 branch from cdaea2e to 599299b Compare September 6, 2022 20:55
@gzsombor
Copy link
Contributor Author

gzsombor commented Sep 7, 2022

It's unclear for me, why the build failed, could anyone help with a clue?

@iloveeclipse iloveeclipse force-pushed the fix-visibility-in-annotations-bug-339 branch from 599299b to 5a54291 Compare September 9, 2022 12:03
@iloveeclipse
Copy link
Member

It's unclear for me, why the build failed, could anyone help with a clue?

Probably because we had 4.25 -> 4.26 version switch in the meantime. I've rebased the branch, please watch for the test results now (since github doesn't send mails on build finish).

@iloveeclipse
Copy link
Member

please watch for the test results now (since github doesn't send mails on build finish).

Need to wait till we have solution for #381.

…compatible with Javac of that time.

Luckily, Javac fixed so the hack is not needed anymore - infact this makes ECJ not following JLS properly
@iloveeclipse iloveeclipse force-pushed the fix-visibility-in-annotations-bug-339 branch from 5a54291 to 42fb4ea Compare September 9, 2022 14:57
@iloveeclipse
Copy link
Member

I've rebased the branch (it will have workaround for #381), please watch for the test results now (since github doesn't send mails on build finish).

@gzsombor
Copy link
Contributor Author

gzsombor commented Sep 9, 2022

Thanks for your help, you were right, that fixed the build!

@stephan-herrmann stephan-herrmann merged commit 1ae0e06 into eclipse-jdt:master Sep 11, 2022
jarthana pushed a commit to jarthana/eclipse.jdt.core that referenced this pull request Sep 21, 2022
…compatible with Javac of that time. (eclipse-jdt#340)

Luckily, Javac fixed so the hack is not needed anymore - infact this makes ECJ not following JLS properly
robstryker pushed a commit to robstryker/eclipse.jdt.core that referenced this pull request Jul 18, 2024
…compatible with Javac of that time. (eclipse-jdt#340)

Luckily, Javac fixed so the hack is not needed anymore - infact this makes ECJ not following JLS properly
@srikanth-sankaran
Copy link
Contributor

This PR is problematic and has resulted in #1216
This PR makes org.eclipse.jdt.core.tests.compiler.regression.AnnotationTest.test293() a conformance test rather than a negative test but that is wrong - it should stay a negative test.

I will address the problem comprehensively in #4828

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

Successfully merging this pull request may close these issues.

4 participants