matthiasblaesing commented on code in PR #5655:
URL: https://github.com/apache/netbeans/pull/5655#discussion_r1134587277


##########
java/maven.indexer/src/org/netbeans/modules/maven/indexer/NexusRepositoryIndexerImpl.java:
##########
@@ -585,45 +594,33 @@ private void indexLoadedRepo(final RepositoryInfo repo, 
boolean updateLocal) thr
                     }
                 }
             }
-        } catch (IOException e) {            
+        } catch (IOException e) {
             if(e.getCause() instanceof ResourceDoesNotExistException) {
                 fireChange(repo, () -> repo.fireNoIndex());
             }
-            File tmpFolder = Places.getCacheDirectory();
-            // see also issue #250365
-            String noSpaceLeftMsg = null;
-            if(e.getMessage() != null && e.getMessage().contains("No space 
left on device")) {
-                noSpaceLeftMsg = 
Bundle.MSG_NoSpace(tmpFolder.getAbsolutePath(), repo.getName());
-            }
-            
-            long downloaded = listener != null ? listener.getUnits() * 1024 : 
-1;
-            long usableSpace = -1;
-            try {
-                FileStore store = Files.getFileStore(tmpFolder.toPath());
-                usableSpace = store.getUsableSpace();                    
-            } catch (IOException ex) {
-                Exceptions.printStackTrace(ex);
-            }
-            LOGGER.log(Level.INFO, "Downloaded maven index file has size {0} 
(zipped). The usable space in {1} is {2}.", new Object[]{downloaded, tmpFolder, 
usableSpace});
+            Path tmpFolder = Paths.get(System.getProperty("java.io.tmpdir"));

Review Comment:
   At a later time we might allow people to choose a different path for the 
temp files. If here the `tmpFolder` is initialized from `tmpStorage`, this 
would be easier to update and kept consistent. The variable might not yet 
initalized though or intialized to `null`. 



-- 
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