Color.java (getAlpha): Prevent sign-extended alpha values.

2003-08-12  Graydon Hoare  <graydon@redhat.com>

	* java/awt/Color.java (getAlpha):
	Prevent sign-extended alpha values.

From-SVN: r70401
This commit is contained in:
Graydon Hoare 2003-08-13 03:20:04 +00:00 committed by Graydon Hoare
parent 4717fcc7f7
commit 479f4325c8
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2003-08-12 Graydon Hoare <graydon@redhat.com>
* java/awt/Color.java (getAlpha):
Prevent sign-extended alpha values.
2003-08-12 Tom Tromey <tromey@redhat.com>
* gij.cc (main): Handle -? and -X.

View File

@ -496,7 +496,7 @@ public class Color implements Paint, Serializable
public int getAlpha()
{
// Do not inline getRGB() to value, because of SystemColor.
return (getRGB() & ALPHA_MASK) >> 24;
return (getRGB() & ALPHA_MASK) >>> 24;
}
/**