--- a/src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolder2.java Thu Jul 05 13:26:50 2018 +0200
+++ b/src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolder2.java Thu Jul 05 19:05:08 2018 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -170,7 +170,7 @@
}
// Known Folder data
- static class KnownFolderDefinition {
+ static final class KnownFolderDefinition {
String guid;
int category;
String name;
@@ -187,7 +187,10 @@
String ftidType;
String path;
String saveLocation;
- static final List<KnownFolderDefinition> libraries = getLibraries();
+ }
+
+ static final class KnownLibraries {
+ static final List<KnownFolderDefinition> INSTANCE = getLibraries();
}
static class FolderDisposer implements sun.java2d.DisposerRecord {
@@ -625,7 +628,7 @@
// this is a temp fix until java.io starts support Libraries
if( path != null && path.startsWith("::{") &&
path.toLowerCase().endsWith(".library-ms")) {
- for (KnownFolderDefinition kf : KnownFolderDefinition.libraries) {
+ for (KnownFolderDefinition kf : KnownLibraries.INSTANCE) {
if (path.toLowerCase().endsWith(
"\\" + kf.relativePath.toLowerCase()) &&
path.toUpperCase().startsWith(