Copilot commented on code in PR #3173:
URL: https://github.com/apache/tika/pull/3173#discussion_r4016079137


##########
tika-app/src/main/java/org/apache/tika/cli/TikaCLI.java:
##########
@@ -1051,21 +1147,15 @@ private void configure() throws TikaException, 
IOException, SAXException {
     }
 
     private void displayMetModels() {
-        Class<?>[] modelClasses = Metadata.class.getInterfaces();
-        Arrays.sort(modelClasses, Comparator.comparing(Class::getName));
-
-        for (Class<?> modelClass : modelClasses) {
-            // we don't care about internal Tika met classes
-            // if we do, then we can take this conditional out
-            if (!modelClass
-                    .getSimpleName()
-                    .contains("Tika")) {
-                System.out.println(modelClass.getSimpleName());
-                Field[] keyFields = modelClass.getFields();
-                Arrays.sort(keyFields, Comparator.comparing(Field::getName));
-                for (Field keyField : keyFields) {
-                    System.out.println(" " + keyField.getName());
-                }
+        Class<?>[] sorted = Arrays.copyOf(METADATA_CLASSES, 
METADATA_CLASSES.length);
+        Arrays.sort(sorted, Comparator.comparing(Class::getSimpleName));
+
+        for (Class<?> modelClass : sorted) {

Review Comment:
   This changes the source of the model list, but 
`TikaCLITest.testListMetModels` still only asserts `text/plain`, which comes 
from the `-x` parse and does not verify this output. Add assertions for 
representative models and keys (for example, `AccessPermissions`/`CAN_MODIFY` 
and `Zip`/`COMMENT`) so omissions from this hard-coded array fail CI.



-- 
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]

Reply via email to