afedulov commented on code in PR #23491:
URL: https://github.com/apache/flink/pull/23491#discussion_r1354896196
##########
flink-architecture-tests/flink-architecture-tests-base/src/main/java/org/apache/flink/architecture/common/Predicates.java:
##########
@@ -157,6 +166,35 @@ public static <T> DescribedPredicate<T> exactlyOneOf(
t -> Arrays.stream(other).map(dp -> dp.test(t)).reduce(false,
Boolean::logicalXor));
}
+ /**
+ * Extracts the class name from the given fully qualified class name.
+ *
+ * <p>Example:
+ *
+ * <pre>
+ * getClassFromFqName("com.example.MyClass"); // Returns: "MyClass"
+ * </pre>
+ */
+ public static String getClassSimpleNameFromFqName(String fqClassName) {
Review Comment:
Thanks for pointing this out. I changed the approach to handle both cases
and added test coverage for this method:
https://github.com/apache/flink/pull/23491/commits/fbea7c9382bd9d3f6a7d80c81e05e8491a137612
##########
flink-architecture-tests/flink-architecture-tests-base/src/main/java/org/apache/flink/architecture/common/Predicates.java:
##########
@@ -157,6 +166,35 @@ public static <T> DescribedPredicate<T> exactlyOneOf(
t -> Arrays.stream(other).map(dp -> dp.test(t)).reduce(false,
Boolean::logicalXor));
}
+ /**
+ * Extracts the class name from the given fully qualified class name.
+ *
+ * <p>Example:
+ *
+ * <pre>
+ * getClassFromFqName("com.example.MyClass"); // Returns: "MyClass"
+ * </pre>
+ */
+ public static String getClassSimpleNameFromFqName(String fqClassName) {
Review Comment:
Thanks for pointing this out. I changed the approach to handle both cases
and added test coverage for this method:
https://github.com/apache/flink/pull/23491/commits/fbea7c9382bd9d3f6a7d80c81e05e8491a137612
--
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]