You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2020/10/06 17:20:04 UTC
svn commit: r1882278 -
/pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/StreamPane.java
Author: tilman
Date: Tue Oct 6 17:20:04 2020
New Revision: 1882278
URL: http://svn.apache.org/viewvc?rev=1882278&view=rev
Log:
PDFBOX-4980: replace constant that doesn't exist in jdk 1.6, as suggested by Simon Steiner
Modified:
pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/StreamPane.java
Modified: pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/StreamPane.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/StreamPane.java?rev=1882278&r1=1882277&r2=1882278&view=diff
==============================================================================
--- pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/StreamPane.java (original)
+++ pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/StreamPane.java Tue Oct 6 17:20:04 2020
@@ -406,8 +406,10 @@ public class StreamPane implements Actio
Document doc = XMLUtil.parse(inputStream);
TransformerFactory transformerFactory = TransformerFactory.newInstance();
transformerFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
- transformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "");
- transformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, "");
+ // XMLConstants.ACCESS_EXTERNAL_DTD in jdk 1.7
+ transformerFactory.setAttribute("http://javax.xml.XMLConstants/property/accessExternalDTD", "");
+ // XMLConstants.ACCESS_EXTERNAL_STYLESHEET in jdk 1.7
+ transformerFactory.setAttribute("http://javax.xml.XMLConstants/property/accessExternalStylesheet", "");
Transformer transformer = transformerFactory.newTransformer();
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "1");