-
Bug
-
Resolution: Fixed
-
P4
-
9, 11, 17, 21
-
b24
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8333152 | 21.0.5-oracle | Manukumar V S | P4 | Resolved | Fixed | b01 |
JDK-8334049 | 21.0.5 | Sergey Bylokhov | P4 | Resolved | Fixed | b01 |
JDK-8333153 | 17.0.13-oracle | Manukumar V S | P4 | Resolved | Fixed | b01 |
JDK-8334203 | 17.0.13 | Sergey Bylokhov | P4 | Resolved | Fixed | b01 |
protected static boolean isAvailableLookAndFeel(String classname) {
try { // Try to create a L&F given a String
Class lnfClass = Class.forName(classname);
LookAndFeel newLAF = (LookAndFeel)(lnfClass.newInstance());
return newLAF.isSupportedLookAndFeel();
} catch(Exception e) { // If ANYTHING weird happens, return false
return false;
}
}
This is BAD and can't have worked since JDK 9 - the module system restricted access to these classes since they don't have any "opens ..." clause
But the right thing to do is make them instead call
UIManager.createLookAndFeel(name);
- backported by
-
JDK-8333152 Several Swing jtreg tests use class.forName on L&F classes
- Resolved
-
JDK-8333153 Several Swing jtreg tests use class.forName on L&F classes
- Resolved
-
JDK-8334049 Several Swing jtreg tests use class.forName on L&F classes
- Resolved
-
JDK-8334203 Several Swing jtreg tests use class.forName on L&F classes
- Resolved
- links to
-
Commit openjdk/jdk17u-dev/9056b3bf
-
Commit openjdk/jdk21u-dev/51d37baa
-
Commit openjdk/jdk/9d332e65
-
Review openjdk/jdk17u-dev/2563
-
Review openjdk/jdk21u-dev/689
-
Review openjdk/jdk/19341