8159374: Taskbar.setIconBadge() spec omits mention of exception for ICON_BADGE_TEXT feature
Reviewed-by: alexsch, ssadetsky
This commit is contained in:
parent
3083fc3bb2
commit
bc3d4d72ac
@ -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();
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user