-
Task
-
Resolution: Unresolved
-
P4
-
None
-
None
-
None
Even though Nashorn targets Java 11 as its minimum version, it needs to be forward compatible with newer versions of Java as well. For this reason, we must ensure it compiles on newer Java versions too. Newer versions of Java do introduce some stricter checks that we address here:
* we had some `lossy-conversions` warnings that got fixed
* There was a lot of `serial` warnings. Even though the value of Nashorn classes being serializable is a bit dubious, for now we'll play along. The strategy for fixing was to either ensure relevant types are serializable, or to add warning suppressions, especially for fields declared as `List` or `Map` in serializable classes; we don't want to narrow those down to `ArrayList` or `HashMap` etc. (which wouldn't trigger the warning.)
* The causes for `this-escape` warnings were reviewed and considered to be okay. I added suppressions.
* we had some `lossy-conversions` warnings that got fixed
* There was a lot of `serial` warnings. Even though the value of Nashorn classes being serializable is a bit dubious, for now we'll play along. The strategy for fixing was to either ensure relevant types are serializable, or to add warning suppressions, especially for fields declared as `List` or `Map` in serializable classes; we don't want to narrow those down to `ArrayList` or `HashMap` etc. (which wouldn't trigger the warning.)
* The causes for `this-escape` warnings were reviewed and considered to be okay. I added suppressions.