Reviewer needed - allow the package com.sun.awt to be used by Java compiler (but with warning)

Dr Andrew John Hughes ahughes at redhat.com
Wed Feb 23 05:43:29 PST 2011


On 17:56 Tue 22 Feb     , Pavel Tisnovsky wrote:
> Hi all,
> 
> can anybody please review simple patch I'd like to add to IcedTea6 HEAD?
> 
> This patch allows programmers to properly compile applications which use
> com.sun.awt.AWTUtilities (one new regression test
> com/sun/awt/Translucency/WindowOpacity.java uses this package btw).
> 
> Because this package is not part of standard API, warning should be
> printed by Java compiler in following way:
> 
> javac Test.java
> Test.java:1: warning: com.sun.awt.AWTUtilities is Sun proprietary API
> and may be removed in a future release
> import com.sun.awt.AWTUtilities;
>                   ^
> 1 warning
> 
> (Proprietary Oracle JDK 6 prints the same message btw)
> 
> PS: This change is already included in OpenJDK 7.
> 

Is this a backport of an OpenJDK7 changeset?  If so, which one?  And why
does the patch not include a bug ID?

> Thank you in advance,
> Pavel

> --- openjdk-old/langtools/src/share/classes/com/sun/tools/javac/resources/legacy.properties	2011-01-21 00:55:18.000000000 +0100
> +++ openjdk/langtools/src/share/classes/com/sun/tools/javac/resources/legacy.properties	2011-02-22 15:28:53.010912000 +0100
> @@ -24,6 +24,7 @@
>  #
>  
>  com.sun.accessibility.internal.resources = tiger legacy
> +com.sun.awt = tiger legacy
>  com.sun.beans = tiger legacy
>  com.sun.corba.se.impl.activation = tiger legacy
>  com.sun.corba.se.impl.copyobject = tiger legacy

> diff -r 9ea6e67710b1 ChangeLog
> --- a/ChangeLog	Tue Feb 22 15:57:42 2011 +0000
> +++ b/ChangeLog	Tue Feb 22 17:15:12 2011 +0100
> @@ -1,3 +1,11 @@
> +2011-02-22  Pavel Tisnovsky  <ptisnovs at redhat.com>
> +
> +	* Makefile.am:
> +	Added new patch.
> +	* patches/com-sun-awt.patch
> +	Patched used for updating file legacy.properties
> +	containing packages with non-standardized API
> +
>  2011-02-22  Andrew John Hughes  <ahughes at redhat.com>
>  
>  	PR586: Classes missing from src.zip
> diff -r 9ea6e67710b1 Makefile.am
> --- a/Makefile.am	Tue Feb 22 15:57:42 2011 +0000
> +++ b/Makefile.am	Tue Feb 22 17:15:12 2011 +0100
> @@ -326,7 +326,8 @@
>  	patches/openjdk/6749060-bad-lcd-aa-non-opaque-dest.patch \
>  	patches/openjdk/6896068-sg2d.patch \
>  	patches/pr633-no_javaws_man_page.patch \
> -	patches/pr586-include_all_srcs.patch
> +	patches/pr586-include_all_srcs.patch \
> +	patches/com-sun-awt.patch
>  
>  if !WITH_ALT_HSBUILD
>  ICEDTEA_PATCHES += \
> diff -r 9ea6e67710b1 patches/com-sun-awt.patch
> --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
> +++ b/patches/com-sun-awt.patch	Tue Feb 22 17:15:12 2011 +0100
> @@ -0,0 +1,10 @@
> +--- openjdk-old/langtools/src/share/classes/com/sun/tools/javac/resources/legacy.properties	2011-01-21 00:55:18.000000000 +0100
> ++++ openjdk/langtools/src/share/classes/com/sun/tools/javac/resources/legacy.properties	2011-02-22 15:28:53.010912000 +0100
> +@@ -24,6 +24,7 @@
> + #
> + 
> + com.sun.accessibility.internal.resources = tiger legacy
> ++com.sun.awt = tiger legacy
> + com.sun.beans = tiger legacy
> + com.sun.corba.se.impl.activation = tiger legacy
> + com.sun.corba.se.impl.copyobject = tiger legacy


-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

Support Free Java!
Contribute to GNU Classpath and IcedTea
http://www.gnu.org/software/classpath
http://icedtea.classpath.org
PGP Key: F5862A37 (https://keys.indymedia.org/)
Fingerprint = EA30 D855 D50F 90CD F54D  0698 0713 C3ED F586 2A37



More information about the distro-pkg-dev mailing list