File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
visualvm/jmx/src/org/graalvm/visualvm/jmx/impl Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 35
35
import java .lang .management .ThreadInfo ;
36
36
import java .lang .management .ThreadMXBean ;
37
37
import java .nio .file .Files ;
38
- import java .nio .file .LinkOption ;
39
38
import java .nio .file .Path ;
40
39
import java .nio .file .Paths ;
41
40
import java .text .SimpleDateFormat ;
@@ -370,19 +369,19 @@ private void printLock(StringBuilder sb,LockInfo lock) {
370
369
boolean takeHeapDump (String fileName ) {
371
370
HotSpotDiagnosticMXBean hsDiagnostic = getHotSpotDiagnostic ();
372
371
if (hsDiagnostic != null ) {
373
- Path f = Paths .get (fileName );
374
372
try {
375
373
hsDiagnostic .dumpHeap (fileName ,true );
376
374
} catch (IOException ex ) {
377
375
LOGGER .log (Level .INFO ,"takeHeapDump" , ex ); // NOI18N
378
376
try {
377
+ Path f = Paths .get (fileName );
379
378
Files .deleteIfExists (f );
380
379
} catch (IOException ex1 ) {
381
380
LOGGER .log (Level .INFO ,"takeHeapDump" , ex1 ); // NOI18N
382
381
}
383
382
return false ;
384
383
}
385
- return Files . isRegularFile ( f , LinkOption . NOFOLLOW_LINKS ) && Files . isReadable ( f ) ;
384
+ return true ;
386
385
}
387
386
return false ;
388
387
}
You can’t perform that action at this time.
0 commit comments