[ 
https://issues.apache.org/jira/browse/TIKA-4892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18115915#comment-18115915
 ] 

ASF GitHub Bot commented on TIKA-4892:
--------------------------------------

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)





> --list-met-models only prints Serializible
> ------------------------------------------
>
>                 Key: TIKA-4892
>                 URL: https://issues.apache.org/jira/browse/TIKA-4892
>             Project: Tika
>          Issue Type: Bug
>          Components: cli
>            Reporter: Tim Grein
>            Priority: Minor
>
> Currently 
> {code:java}
> java -jar tika-app/target/tika-app-*.jar --list-met-models {code}
> only prints
> {code:java}
> Serializible
> {code}
> as the Metadata class doesn't implement the model interfaces anymore.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to