<AWT Dev> RfR JDK-8055160

Mandy Chung mandy.chung at oracle.com
Mon Mar 23 21:41:43 UTC 2015

On 3/19/2015 6:03 PM, Pete Brunet wrote:
> A new webrev is available at
> http://cr.openjdk.java.net/~ptbrunet/JDK-8055160/webrev.01/

line 820-821: this comment is incorrect.

line 831-838: what happens if ServiceConfigurationException thrown or 
any exception is thrown by the activate method?  This should wrap with 
AWTError as I mentioned in my previous review comment.  This was hidden 
with the test (see below).

line 891-901: this example may not be necessary as the service loader 
documentation should cover it.

> The changes to the tests are:
> - added an unused provider
> - added a test activating two providers
> Mandy, Regarding the last bullet I'm not sure I resolved your comment, 
> "For the test, since you support multiple providers, perhaps good to 
> add one more test case to activate two providers and load two 
> providers but only one is activated."  If not, please let me know.

Almost.   For Foo, Bar providers, their activate method throwing 
RuntimeException actually stops loading the second provider.  The 
activate method could perhaps update some static field defined in the 
Load class if it's called (perhaps adding its name) so that you can tell 
whether the expected providers are activated. UnusedProvider throwing 
RuntimeException is good since you don't expect it's activated.

Otherwise, looks good.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20150323/f567c06a/attachment.html>

More information about the awt-dev mailing list