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


##########
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:
   Addressed with [Assert a few 
models](https://github.com/apache/tika/pull/3173/commits/ed3125a96b13289e86a5f3fe1a1b13b03e5d4d1d)



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