-
Notifications
You must be signed in to change notification settings - Fork 163
Open
Labels
bugSomething isn't workingSomething isn't workingcompilerEclipse Java Compiler (ecj) related issuesEclipse Java Compiler (ecj) related issuesregressionSomething was broken by a previous changeSomething was broken by a previous change
Milestone
Description
Since Eclipse 2025-12 (JDT 3.20.400), I have a compile error with the following class:
package testing;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import testing.Test.JsonProperties;
@JsonPropertyOrder({
JsonProperties.CONSTANT_ONE,
JsonProperties.CONSTANT_TWO,
})
public record Test(
@JsonProperty(JsonProperties.CONSTANT_ONE) String attributeOne, // Error in this line
@JsonProperty(JsonProperties.CONSTANT_TWO) String attributeTwo) {
class JsonProperties {
public static final String CONSTANT_ONE = "one";
public static final String CONSTANT_TWO = "two";
}
}
I have a dependency to com.fasterxml.jackson.core:jackson-annotations:2.20
In line 13, JsonProperties.CONSTANT_ONE is not recognized as a constant value.
The error message is: The value for annotation attribute JsonProperty.value must be a constant expression
With Eclipse 2025-09 (JDT 3.20.300), the exact same code works without error.
The OpenJDK 21 compiler can also compile this class.
Do you have any ideas, what's wrong here? Thank you very much!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcompilerEclipse Java Compiler (ecj) related issuesEclipse Java Compiler (ecj) related issuesregressionSomething was broken by a previous changeSomething was broken by a previous change