Hi Stefan,
please don't sent bug reports to ops. Instead, this should have done to
swing-dev (cc:ed).
cheers,
dalibor topic
On 20.04.2017 20:53, Stefan Philippsen wrote:
Managed to make a reproduceable test for the crash (GodDirCrash on win10
1703!):
http://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8179014
--------
import javax.swing.*;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.Files;
import javax.swing.JFileChooser;
import javax.swing.filechooser.FileSystemView;
// Test works only win10 1703 and newer?
// http://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8179014
public class Test extends JFrame {
public static void main(String args[]) {
try{
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch(Exception e){
e.printStackTrace();
return;
}
final FileSystemView fsv = FileSystemView.getFileSystemView();
// works fine
System.out.println("Home:" +
FileSystemView.getFileSystemView().getHomeDirectory());
Path godDir =
Paths.get(FileSystemView.getFileSystemView().getHomeDirectory().toString(),
"GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}");
if (Files.exists(godDir))
{
System.out.println("deleting : " + godDir);
try
{
Files.delete(godDir);
}
catch (IOException e)
{
throw new AssertionError("could not delete: " + e.getMessage(),
e);
}
}
// if a dir "GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}" is
present on windows crash - else OK!
JFileChooser jfc = new
JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory(), fsv );
System.out.println("Works fine!");
try
{
Files.createDirectory(godDir);
}
catch (IOException e)
{
throw new AssertionError("should not happen: " + e.getMessage(),
e);
}
System.out.println("call with GodDir");
jfc = new
JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory(), fsv );
throw new AssertionError("should not reach this point!");
}
}
--
<http://www.oracle.com> Dalibor Topic | Principal Product Manager
Phone: +494089091214 <tel:+494089091214> | Mobile: +491737185961
<tel:+491737185961>
ORACLE Deutschland B.V. & Co. KG | Kühnehöfe 5 | 22761 Hamburg
ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603
Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
<http://www.oracle.com/commitment> Oracle is committed to developing
practices and products that help protect the environment