RFR: JDK-8065412: generated source to compile .properties file incorreectly includes the module name in the package name

Mandy Chung mandy.chung at oracle.com
Thu Nov 20 17:56:13 UTC 2014


On 11/20/14 3:19 AM, Erik Joelsson wrote:
> Hello,
>
> Please review this small fix, correcting the source generation from 
> properties when the properties files are in platform specific source 
> directories. The bug was introduced by me in JDK-8055191.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8065412
> Patch inline:
>
> diff --git a/make/gensrc/GensrcProperties.gmk 
> b/make/gensrc/GensrcProperties.gmk
> --- a/make/gensrc/GensrcProperties.gmk
> +++ b/make/gensrc/GensrcProperties.gmk
> @@ -58,13 +58,15 @@
>    $1_CLASS := $3
>
>    # Convert 
> .../src/<module>/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties
> -  # to 
> .../langtools/gensrc/<module>/com/sun/tools/javac/resources/javac_zh_CN.java
> +  # to 
> .../support/gensrc/<module>/com/sun/tools/javac/resources/javac_zh_CN.java
>    # Strip away prefix and suffix, leaving for example only:
>    # "<module>/share/classes/com/sun/tools/javac/resources/javac_zh_CN"
>    $1_JAVAS := $$(patsubst $(JDK_TOPDIR)/src/%, \
>        $(JDK_OUTPUTDIR)/gensrc/%, \
>        $$(patsubst %.properties, %.java, \
> -      $$(subst /share/classes,, $$($1_SRCS))))
> +      $$(subst /$(OPENJDK_TARGET_OS)/classes,, \
> +      $$(subst /$(OPENJDK_TARGET_OS_API_DIR)/classes,, \
> +      $$(subst /share/classes,, $$($1_SRCS))))))
>
>    # Generate the package dirs for the to be generated java files. 
> Sort to remove
>    # duplicates.

Looks good to me.

Phil - FYI.  JDK-8055191 was integrated in b36.  This bug impacts 
windows and macosx sun/awt resource bundles.  Perhaps catching this 
regression requires manual testing and not yet verified on those two 
platforms?  It may be good to include some basic sanity regression test 
for loading sun.awt resource bundles.

Mandy



More information about the build-dev mailing list