In JDK 7, the Java development team has dropped the strict backwards compatibility policy known from previous releases in favor of small improvements to JDK tools and class library. Unfortunately, the incompatible behavior changes of two of these "improvements" may result in exceptions when using yFiles for Java layout algorithms.
The sorting algorithm used by
Arrays.sort has been changed to an implementation that cannot handle (i.e. throws an uncaught
IllegalArgumentException for) some of the
Comparator implementations used in yFiles for Java's layout algorithms. The affected algorithms are
SmartOrganicLayouter, the algorithms in package
y.layout.orthogonal as well as the edge routing algorithms
The problem was fixed in yFiles for Java version 22.214.171.124, 126.96.36.199, 2.9, and newer. For older versions, the system property
java.util.Arrays.useLegacyMergeSort may be used to force JDK 7 to use the previous, unproblematic sorting algorithm.
See Java SE 7 and JDK 7 Compatibility for additional information.
ClassCastExceptionwhen inserting first element
TreeMap has been changed to validate the first element inserted into the map with respect to the map's associated
Comparator by comparing the element to itself. This new behavior may trigger an uncaught
ClassCastException in yFiles for Java's
PartialLayouter for some input graphs.
This problem was fixed in yFiles for Java version 188.8.131.52, 184.108.40.206, 2.9, and newer. No workaround is available.
See Java SE 7 Features and Enhancements for additional information.
JDK 7's HotSpot virtual machine has broken optimization options enabled by default. These optimizations may result in erroneous results or even JVM crashes for computation intense algorithms (such as yFiles for Java's layout algorithms). Therefore, it is strongly recommended to refrain from using yFiles for Java with JDK 1.7.0 or JDK 1.7.0_01 in production environments.
These problems have been fixed for JDK 1.7.0_02 and newer.
See The real story behind the Java 7 GA bugs affecting Apache Lucene / Solr and Java SE 7 Features and Enhancements: Known Issues for additional information.