You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2022/09/06 19:48:28 UTC

[GitHub] [calcite] exceptionfactory commented on a diff in pull request #2892: [CALCITE-5263] Improve XmlFunctions by using an XML DocumentBuilder

exceptionfactory commented on code in PR #2892:
URL: https://github.com/apache/calcite/pull/2892#discussion_r964108841


##########
core/src/test/java/org/apache/calcite/test/SqlXmlFunctionsTest.java:
##########
@@ -36,6 +39,23 @@
  */
 class SqlXmlFunctionsTest {
 
+  private static final String XML = "<document>string</document>";
+  private static final String XSLT =
+      "<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"></xsl:stylesheet>";
+  private static final String DOCUMENT_PATH = "/document";
+  private static @Nullable String xmlExternalEntity = null;
+  private static @Nullable String xsltExternalEntity = null;
+
+  @BeforeAll public static void setup() throws Exception {
+    final File testFile = File.createTempFile("foo", "temp");

Review Comment:
   Although this is a temporary test file, the documentation for [java.io.File.createTempFile()](https://docs.oracle.com/javase/7/docs/api/java/io/File.html#createTempFile(java.lang.String,%20java.lang.String)) notes that the [java.nio.Files.createTempFile()](https://docs.oracle.com/javase/8/docs/api/java/nio/file/Files.html#createTempFile-java.nio.file.Path-java.lang.String-java.lang.String-java.nio.file.attribute.FileAttribute...-) method creates the file with more restrictive permissions.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org