Skip to content

Commit 269778f

Browse files
committed
PDFBOX-5660: refactor
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1930836 13f79535-47bb-0310-9956-ffa450edef68
1 parent 7add096 commit 269778f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

xmpbox/src/main/java/org/apache/xmpbox/xml/DomXmpParser.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,17 +1107,17 @@ private PropertyType checkPropertyDefinition(XMPMetadata xmp, QName prop) throws
11071107
{
11081108
TypeMapping tm = xmp.getTypeMapping();
11091109
// test if namespace is set in xml
1110-
if (!nsFinder.containsNamespace(prop.getNamespaceURI()))
1110+
String nsuri = prop.getNamespaceURI();
1111+
if (!nsFinder.containsNamespace(nsuri))
11111112
{
11121113
throw new XmpParsingException(ErrorType.NoSchema, "Schema is not set in this document : "
1113-
+ prop.getNamespaceURI() + ", property: " + prop.getPrefix() + ":" + prop.getLocalPart());
1114+
+ nsuri + ", property: " + prop.getPrefix() + ":" + prop.getLocalPart());
11141115
}
11151116
// test if namespace is defined
1116-
String nsuri = prop.getNamespaceURI();
11171117
if (!tm.isDefinedNamespace(nsuri))
11181118
{
11191119
throw new XmpParsingException(ErrorType.NoSchema, "Cannot find a definition for the namespace "
1120-
+ prop.getNamespaceURI() + ", property: " + prop.getPrefix() + ":" + prop.getLocalPart());
1120+
+ nsuri + ", property: " + prop.getPrefix() + ":" + prop.getLocalPart());
11211121
}
11221122
try
11231123
{

0 commit comments

Comments
 (0)