From rocky.sloan at oracle.com Mon Nov 2 18:47:27 2015 From: rocky.sloan at oracle.com (Rocky Sloan) Date: Mon, 2 Nov 2015 10:47:27 -0800 Subject: Review Request for test bug JDK-813711 - Two java.beans tests need to be updated to work with JDK 9 modularized filesystem In-Reply-To: <56334118.4070807@oracle.com> References: <562A9306.9090204@oracle.com> <562F8A68.1010307@oracle.com> <56329E85.2080507@oracle.com> <56334118.4070807@oracle.com> Message-ID: <5637AFBF.401@oracle.com> Hi Yuri, I have updated the code in these tests to replace the System.exit calls with RuntimeException(). Webrev attached. Files modified at this point: Task.java TestConstructorFinder.java TestMethodFinder.java Thanks! Rocky On 10/30/2015 3:06 AM, Yuri Nesterenko wrote: > Yes, Rocky, I guess you better change these exits to RuntimeExceptions > and send the webrev to me. I'll post it as > http://cr.openjdk.java.net/~yan/8137113/webrev.01, and you'll send > a message to this list. That is the procedure here. > Thank you! > > -yan > > On 10/30/2015 01:32 AM, Rocky Sloan wrote: >> Hi Sergey, >> >> Thanks for the feedback. >> >> I changed it to catch the filesystem error(s) and throw a >> RuntimeException() and tested it. >> >> The new version of the webrev is attached. >> >> I used System.exit() because it was used in other files included in this >> test. >> >> Example in other files: >> >> Task.print(working + " out of " + alive + " threads are working"); >> if ((working == 0) && (++alarm == 10)) { >> Task.print("DEADLOCK DETECTED"); >> System.exit(100); >> } >> >> Should I change the other files to throw a RuntimeException() in a >> similar fashion? >> >> Regards, >> >> Rocky >> >> On 10/27/2015 7:30 AM, Sergey Bylokhov wrote: >>> Hi, Rocky. >>> Please do not use System.exit() in the tests, just throw runtime >>> exception if some unexpected errors occurred. >>> >>> On 23.10.15 23:05, Rocky Sloan wrote: >>>> Hello, >>>> >>>> Please review the test fix for JDK9: >>>> >>>> bug: https://bugs.openjdk.java.net/browse/JDK-8137113 >>>> webrev: http://cr.openjdk.java.net/~yan/8137113/webrev.00 >>>> >>>> Updated to use the new run-time modular filesystem in JDK9. Removed >>>> JDK8 compatible code which accesses rt.jar. >>>> >>>> The test originally used the set of classes in rt.jar. These classes >>>> are now spread throughout the new filesystem in JDK9, so the updated >>>> code will access a representation of these classes from their new >>>> locations. >>>> >>>> Thanks, >>>> >>>> Rocky >>> >>> >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: XMLDecoder-8028054-00005.zip Type: application/x-zip-compressed Size: 83093 bytes Desc: not available URL: From rocky.sloan at oracle.com Wed Nov 4 23:52:08 2015 From: rocky.sloan at oracle.com (Rocky Sloan) Date: Wed, 4 Nov 2015 15:52:08 -0800 Subject: Review Request for test bug JDK-813711 - Two java.beans tests need to be updated to work with JDK 9 modularized filesystem In-Reply-To: <562A9306.9090204@oracle.com> References: <562A9306.9090204@oracle.com> Message-ID: <563A9A28.1040903@oracle.com> Hello, Please review the test fix for JDK9: bug: https://bugs.openjdk.java.net/browse/JDK-8137113 webrev: http://cr.openjdk.java.net/~yan/8137113/webrev.01/ Updated to use the new run-time modular filesystem in JDK9. Removed JDK8 compatible code which accesses rt.jar. The test originally used the set of classes in rt.jar. These classes are now spread throughout the new filesystem in JDK9, so the updated code will access a representation of these classes from their new locations. Removed calls to System.exit() and replaced with calls to RuntimeException(). Thanks, Rocky From Sergey.Bylokhov at oracle.com Thu Nov 5 13:11:12 2015 From: Sergey.Bylokhov at oracle.com (Sergey Bylokhov) Date: Thu, 5 Nov 2015 16:11:12 +0300 Subject: Review Request for test bug JDK-813711 - Two java.beans tests need to be updated to work with JDK 9 modularized filesystem In-Reply-To: <563A9A28.1040903@oracle.com> References: <562A9306.9090204@oracle.com> <563A9A28.1040903@oracle.com> Message-ID: <563B5570.2010506@oracle.com> The fix looks fine. On 05.11.15 2:52, Rocky Sloan wrote: > Hello, > > Please review the test fix for JDK9: > > bug: https://bugs.openjdk.java.net/browse/JDK-8137113 > webrev: http://cr.openjdk.java.net/~yan/8137113/webrev.01/ > > Updated to use the new run-time modular filesystem in JDK9. Removed > JDK8 compatible code which accesses rt.jar. > > The test originally used the set of classes in rt.jar. These classes > are now spread throughout the new filesystem in JDK9, so the updated > code will access a representation of these classes from their new > locations. > > Removed calls to System.exit() and replaced with calls to > RuntimeException(). > > Thanks, > > Rocky -- Best regards, Sergey. From alexandr.scherbatiy at oracle.com Thu Nov 5 13:34:37 2015 From: alexandr.scherbatiy at oracle.com (Alexander Scherbatiy) Date: Thu, 05 Nov 2015 16:34:37 +0300 Subject: Review Request for test bug JDK-813711 - Two java.beans tests need to be updated to work with JDK 9 modularized filesystem In-Reply-To: <563B5570.2010506@oracle.com> References: <562A9306.9090204@oracle.com> <563A9A28.1040903@oracle.com> <563B5570.2010506@oracle.com> Message-ID: <563B5AED.3090709@oracle.com> The fix looks good to me. Thanks, Alexandr. On 11/5/2015 4:11 PM, Sergey Bylokhov wrote: > The fix looks fine. > > On 05.11.15 2:52, Rocky Sloan wrote: >> Hello, >> >> Please review the test fix for JDK9: >> >> bug: https://bugs.openjdk.java.net/browse/JDK-8137113 >> webrev: http://cr.openjdk.java.net/~yan/8137113/webrev.01/ >> >> Updated to use the new run-time modular filesystem in JDK9. Removed >> JDK8 compatible code which accesses rt.jar. >> >> The test originally used the set of classes in rt.jar. These classes >> are now spread throughout the new filesystem in JDK9, so the updated >> code will access a representation of these classes from their new >> locations. >> >> Removed calls to System.exit() and replaced with calls to >> RuntimeException(). >> >> Thanks, >> >> Rocky > > From Sergey.Bylokhov at oracle.com Mon Nov 9 18:19:27 2015 From: Sergey.Bylokhov at oracle.com (Sergey Bylokhov) Date: Mon, 9 Nov 2015 21:19:27 +0300 Subject: [9] Review Request: 8131754 AquaTreeUI.getCollapsedIcon() issue reported in java beans tests with a modular build Message-ID: <5640E3AF.5000902@oracle.com> Hello. Please review the "small" fix for jdk9. Description of the problem: When the XMLEncoder writes the object to the stream it does not save the whole object as is(like the usual serialization). But it creates the object of the same class with default parameters and then saves only the difference between the two objects. Encoder checks recursively for difference the public fields and public properties(setters+getters) on current object and so on. Only transient fields and @Transient properties are skipped by encoder. The tests from the bug causes an exception when running on the OSX, because it serialize the platform-specific data (part of Aqua L&F). This occurs because XMLEncoder tries to save the ui property of JComponent. Scheme of objects: JComponent-A (non-default component orientation) UI-a JComponent-B (default component orientation) UI-b Note that components A and B have different orientation, this indirectly changes some properties of UI-a, these changes are not important because they can be(and will be) restored from the component itself, but XMLEncoder treats ui as sensible fields and tries to save them to the stream. As a fix I suggest to mark getUI() method as @Transient, this will allow the encoder to skip the changes in UI property. Note that the ui field in JComponent is transient already, but it affects the usual serialization only. Bug: https://bugs.openjdk.java.net/browse/JDK-8131754 Webrev can be found at: http://cr.openjdk.java.net/~serb/8131754/webrev.00 -- Best regards, Sergey. From alexandr.scherbatiy at oracle.com Thu Nov 19 08:34:33 2015 From: alexandr.scherbatiy at oracle.com (Alexander Scherbatiy) Date: Thu, 19 Nov 2015 11:34:33 +0300 Subject: [9] Review Request: 8131754 AquaTreeUI.getCollapsedIcon() issue reported in java beans tests with a modular build In-Reply-To: <5640E3AF.5000902@oracle.com> References: <5640E3AF.5000902@oracle.com> Message-ID: <564D8999.3080203@oracle.com> The fix looks good to me. Thanks, Alexandr. On 11/9/2015 9:19 PM, Sergey Bylokhov wrote: > Hello. > Please review the "small" fix for jdk9. > > Description of the problem: > When the XMLEncoder writes the object to the stream it does not > save the whole object as is(like the usual serialization). But it > creates the object of the same class with default parameters and then > saves only the difference between the two objects. Encoder checks > recursively for difference the public fields and public > properties(setters+getters) on current object and so on. Only > transient fields and @Transient properties are skipped by encoder. > > The tests from the bug causes an exception when running on the > OSX, because it serialize the platform-specific data (part of Aqua > L&F). This occurs because XMLEncoder tries to save the ui property of > JComponent. > > Scheme of objects: > JComponent-A (non-default component orientation) > UI-a > > JComponent-B (default component orientation) > UI-b > > Note that components A and B have different orientation, this > indirectly changes some properties of UI-a, these changes are not > important because they can be(and will be) restored from the component > itself, but XMLEncoder treats ui as sensible fields and tries to save > them to the stream. > > As a fix I suggest to mark getUI() method as @Transient, this will > allow the encoder to skip the changes in UI property. Note that the ui > field in JComponent is transient already, but it affects the usual > serialization only. > > > Bug: https://bugs.openjdk.java.net/browse/JDK-8131754 > Webrev can be found at: > http://cr.openjdk.java.net/~serb/8131754/webrev.00 > From malenkov at gmail.com Thu Nov 19 20:07:37 2015 From: malenkov at gmail.com (Sergey Malenkov) Date: Thu, 19 Nov 2015 23:07:37 +0300 Subject: [9] Review Request: 8131754 AquaTreeUI.getCollapsedIcon() issue reported in java beans tests with a modular build In-Reply-To: <564D8999.3080203@oracle.com> References: <5640E3AF.5000902@oracle.com> <564D8999.3080203@oracle.com> Message-ID: The fix looks OK to me, because nobody expects that UI is a property to store in XML. On Thu, Nov 19, 2015 at 11:34 AM, Alexander Scherbatiy wrote: > > The fix looks good to me. > > Thanks, > Alexandr. > > > On 11/9/2015 9:19 PM, Sergey Bylokhov wrote: >> >> Hello. >> Please review the "small" fix for jdk9. >> >> Description of the problem: >> When the XMLEncoder writes the object to the stream it does not save >> the whole object as is(like the usual serialization). But it creates the >> object of the same class with default parameters and then saves only the >> difference between the two objects. Encoder checks recursively for >> difference the public fields and public properties(setters+getters) on >> current object and so on. Only transient fields and @Transient properties >> are skipped by encoder. >> >> The tests from the bug causes an exception when running on the OSX, >> because it serialize the platform-specific data (part of Aqua L&F). This >> occurs because XMLEncoder tries to save the ui property of JComponent. >> >> Scheme of objects: >> JComponent-A (non-default component orientation) >> UI-a >> >> JComponent-B (default component orientation) >> UI-b >> >> Note that components A and B have different orientation, this >> indirectly changes some properties of UI-a, these changes are not important >> because they can be(and will be) restored from the component itself, but >> XMLEncoder treats ui as sensible fields and tries to save them to the >> stream. >> >> As a fix I suggest to mark getUI() method as @Transient, this will >> allow the encoder to skip the changes in UI property. Note that the ui field >> in JComponent is transient already, but it affects the usual serialization >> only. >> >> >> Bug: https://bugs.openjdk.java.net/browse/JDK-8131754 >> Webrev can be found at: http://cr.openjdk.java.net/~serb/8131754/webrev.00 >> > -- Best regards, Sergey A. Malenkov