8159374: Taskbar.setIconBadge() spec omits mention of exception for ICON_BADGE_TEXT feature

Reviewed-by: alexsch, ssadetsky
This commit is contained in:
Alexander Zvegintsev 2016-07-12 14:13:48 +03:00
parent 3083fc3bb2
commit bc3d4d72ac
2 changed files with 4 additions and 1 deletions

View File

@ -364,7 +364,8 @@ public class Taskbar {
* @throws SecurityException if a security manager exists and it denies the
* {@code AWTPermission("showWindowWithoutWarningBanner")} permission.
* @throws UnsupportedOperationException if the current platform
* does not support the {@link Taskbar.Feature#ICON_BADGE_NUMBER} feature
* does not support the {@link Taskbar.Feature#ICON_BADGE_NUMBER}
* or {@link Taskbar.Feature#ICON_BADGE_TEXT} feature
*/
public void setIconBadge(final String badge) {
checkAWTPermission();

View File

@ -107,6 +107,8 @@ final class XTaskbarPeer implements TaskbarPeer {
val = Long.parseLong(badge);
visible = true;
} catch (NumberFormatException e) {
throw new UnsupportedOperationException("The " + Feature.ICON_BADGE_TEXT
+ " feature is not supported on the current platform!");
}
}
setBadge(val, visible);