echauchot commented on a change in pull request #18544:
URL: https://github.com/apache/flink/pull/18544#discussion_r798389032
##########
File path:
flink-connectors/flink-connector-cassandra/src/test/java/org/apache/flink/streaming/connectors/cassandra/CassandraConnectorITCase.java
##########
@@ -206,6 +209,79 @@ protected Cluster buildCluster(Cluster.Builder builder) {
}
}
+ private static String setTableNameInPojo(Class<?> claz, String testName)
throws Exception {
+ Table clazTableAnnotation = claz.getAnnotation(Table.class);
+ final String newName = clazTableAnnotation.name() + testName;
+ // BEWARE it is JDK 8 specific
+ final Method annotationDataMethod =
Class.class.getDeclaredMethod("annotationData", null);
Review comment:
Actually my comment about java version in the code is not accurate, I
should have written `JDK8+ COMPLIANT` instead of `BEWARE it is JDK 8 specific`.
Indeed I tested it in JDK 11 and it works as well. I will just remove the
comment as the whole code is JDK8+. But anyway, using ByteBuddy seems less
error prone, I'll use it instead, thanks for the snippet.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]