sdedic commented on code in PR #7698:
URL: https://github.com/apache/netbeans/pull/7698#discussion_r1734853857


##########
enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/assets/OCIPropertiesProvider.java:
##########
@@ -62,16 +44,12 @@ public class OCIPropertiesProvider implements 
CommandProvider {
     private static final Logger LOG = 
Logger.getLogger(OCIPropertiesProvider.class.getName());
     private static final String  GET_DB_CONNECTION = "nbls.db.connection"; 
//NOI18N
 
-    private static final boolean POSIX = 
FileSystems.getDefault().supportedFileAttributeViews().contains("posix");  // 
NOI18N
-    private static final EnumSet<PosixFilePermission> readWritePosix = 
EnumSet.of(OWNER_READ, OWNER_WRITE);
-    private static final EnumSet<AclEntryPermission> readOnlyAcl = 
EnumSet.of(READ_ACL, READ_ATTRIBUTES, WRITE_ATTRIBUTES, READ_DATA, 
READ_NAMED_ATTRS, DELETE, SYNCHRONIZE);
-
-    // temporary directory location
-    private static final Path tmpdir = 
Path.of(System.getProperty("java.io.tmpdir"));       // NOI18N
+    private final ConfigFileGenerator configFileGenerator;
 
     public OCIPropertiesProvider() {
+        this.configFileGenerator = new ConfigFileGenerator("db-", 
".properties", GET_DB_CONNECTION, true); // NOI18N
         try {
-            deleteOldFiles(generateDirPath());
+            configFileGenerator.deleteOldFiles();

Review Comment:
   I'd give each NBLS process its own (random) temporary dir under 
java.io.tmpdir to play within. `deleteOnExit` is nice fallback, should also 
work on directories.
   
   Hm! We can possibly use `org.openide.modules.Places.getCacheSubdirectory()` 
-- this is inside NBLS/NB userdir, unique for each process, can even use a 
fixed name there.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to