Skip to content

Commit 469d0cb

Browse files
committed
PDFBOX-6111: exclude "getHistory()" from Schema test
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1930128 13f79535-47bb-0310-9956-ffa450edef68
1 parent 190882d commit 469d0cb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

xmpbox/src/test/java/org/apache/xmpbox/schema/XMPSchemaTester.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,12 @@ else if (pt.type() == Types.Version && pt.card() == Cardinality.Seq)
222222
assertNull(getMethod.invoke(schema), getNameProperty + " should return null when testing " + property);
223223
// value test
224224
String getNameValue = "get" + prepareName(field.get(schema).toString(), spt);
225+
if (schemaClass == XMPMediaManagementSchema.class && "getHistory".equals(getNameValue))
226+
{
227+
// PDFBOX-6111: getHistory() has been removed because it doesn't work
228+
// because it's an array of a structured type and not of a text value
229+
continue;
230+
}
225231
getMethod = schemaClass.getMethod(getNameValue);
226232
assertNotNull(getMethod, getNameValue + " method should exist");
227233
assertNull(getMethod.invoke(schema), getNameValue + " should return null when testing " + property);
@@ -440,6 +446,12 @@ protected void testGetSetTextListValue(String tp) throws ReflectiveOperationExce
440446
setMethod.invoke(schema, string);
441447
}
442448
// retrieve
449+
if (schemaClass == XMPMediaManagementSchema.class && "getHistory".equals(getName))
450+
{
451+
// PDFBOX-6111: getHistory() has been removed because it doesn't work
452+
// because it's an array of a structured type and not of a text value
453+
return;
454+
}
443455
Method getMethod = schemaClass.getMethod(getName);
444456
List<String> fields = (List<String>) getMethod.invoke(schema);
445457
for (String field : fields)

0 commit comments

Comments
 (0)