Skip to content

Commit 68aa2cf

Browse files
committed
PDFBOX-6121: move new method and make it package local
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1930488 13f79535-47bb-0310-9956-ffa450edef68
1 parent 014f358 commit 68aa2cf

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

xmpbox/src/main/java/org/apache/xmpbox/schema/DublinCoreSchema.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import java.util.List;
2626

2727
import org.apache.xmpbox.XMPMetadata;
28-
import org.apache.xmpbox.type.AbstractField;
2928
import org.apache.xmpbox.type.ArrayProperty;
3029
import org.apache.xmpbox.type.BadFieldValueException;
3130
import org.apache.xmpbox.type.Cardinality;
@@ -781,10 +780,4 @@ public void removeType(String type)
781780
{
782781
removeUnqualifiedBagValue(TYPE, type);
783782
}
784-
785-
private <T> T getPropertyAs(String name, Class<T> type)
786-
{
787-
AbstractField property = getProperty(name);
788-
return type.isInstance(property) ? type.cast(property) : null;
789-
}
790783
}

xmpbox/src/main/java/org/apache/xmpbox/schema/XMPSchema.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,4 +1227,9 @@ protected AbstractSimpleProperty instanciateSimple(String propertyName, Object v
12271227
return tm.instanciateSimpleField(getClass(), null, getPrefix(), propertyName, value);
12281228
}
12291229

1230+
<T> T getPropertyAs(String name, Class<T> type)
1231+
{
1232+
AbstractField property = getProperty(name);
1233+
return type.isInstance(property) ? type.cast(property) : null;
1234+
}
12301235
}

0 commit comments

Comments
 (0)