You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the latest LTS Java 17 has been released, it's better to support
building ShardingSphere with JDK 17. I've upgraded some plugins to
support Java 17, but there are still some issues.
In some unit tests, we changes the modifiers of Field by reflection
like the following codes, which is not allowed since Java 12. It will
cause java.lang.NoSuchFieldException: modifiers.
private static void setFinalStatic(final Field field, final Object
newValue) throws NoSuchFieldException, IllegalAccessException {
field.setAccessible(true);
Field modifiersField = Field.class.getDeclaredField("modifiers");
modifiersField.setAccessible(true);
modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL);
field.set(null, newValue);
}
The temporary solution is ignoring tests which changed Field's
modifiers when using Java 12 or later:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all
Since the latest LTS Java 17 has been released, it's better to support
building ShardingSphere with JDK 17. I've upgraded some plugins to
support Java 17, but there are still some issues.
In some unit tests, we changes the modifiers of Field by reflection
like the following codes, which is not allowed since Java 12. It will
cause
java.lang.NoSuchFieldException: modifiers
.The temporary solution is ignoring tests which changed Field's
modifiers when using Java 12 or later:
shardingsphere/shardingsphere-infra/shardingsphere-infra-executor/pom.xml
Lines 64 to 85 in ebe58d2
I have 2 ideas about this issue:
I want to ask for advice about this issue.
An email about this discussion has been sent:
https://lists.apache.org/thread.html/r944c3deb27755cb3e0314fea40aa366b7e7c4ea5c6388cd5fa5febcd%40%3Cdev.shardingsphere.apache.org%3E
Beta Was this translation helpful? Give feedback.
All reactions