This issue has been created
There are 2 updates.
 
 
XWiki Commons / cid:jira-generated-image-avatar-53918a71-c740-448a-85a5-e163798bd781 XCOMMONS-3905 Open

The Spoon rule forbidding Files#createTempFile without a parent directory is not applied

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-4fec9020-4388-43d4-b7f9-312a38396d4f Thomas Mortagne created this issue on 16/Nov/26 17:39
 
Summary: The Spoon rule forbidding Files#createTempFile without a parent directory is not applied
Issue Type: cid:jira-generated-image-avatar-53918a71-c740-448a-85a5-e163798bd781 Bug
Affects Versions: 16.6.0-rc-1
Assignee: Unassigned
Components: Development Issues only
Created: 16/Nov/26 17:39
Priority: cid:jira-generated-image-static-major-1603d1cc-8a89-462e-886c-ee29fe6a1757 Major
Reporter: Thomas Mortagne
Description:

The Spoon ForbiddenInvocationProcessor configuration in xwiki-commons-pom is supposed to forbid, among others, Files#createTempFile(String, String, FileAttribute...), which creates the file in the standard Java temporary directory instead of the one allocated to XWiki (see XCOMMONS-3084).

But the entry was written as java.nio.file.Files#createTempDirectory(java.lang.String,java.lang.String,java.nio.file.attribute.FileAttribute[]), a method which does not exist in the JDK. Since the processor only compares signatures, the entry never matches anything and calling Files.createTempFile(prefix, suffix) is not reported.

The entry should be java.nio.file.Files#createTempFile(java.lang.String,java.lang.String,java.nio.file.attribute.FileAttribute[]).

 
 

2 updates

 
cid:jira-generated-image-avatar-4fec9020-4388-43d4-b7f9-312a38396d4f Changes by Thomas Mortagne on 16/Nov/26 17:39
 
Fix Version: 18.10.0-rc-1
Assignee: Thomas Mortagne