6955707: Correct addNotices.sh logic in Makefiles
6949590: exes(java.exe, javaws.exe) show Copyright Year as 2004, COMPANY as Sun
Reviewed-by: weijun, alanb
--- a/jdk/make/common/Release.gmk Wed May 26 20:28:04 2010 -0700
+++ b/jdk/make/common/Release.gmk Fri May 28 11:09:24 2010 -0700
@@ -648,7 +648,9 @@
JAR_MANIFEST_FILE=$(ABS_TEMPDIR)/manifest.tmp
$(JAR_MANIFEST_FILE): $(MAINMANIFEST) $(BEANMANIFEST)
$(prep-target)
- $(SED) -e "s/@@RELEASE@@/$(RELEASE)/" $(MAINMANIFEST) >> $@
+ $(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
+ -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
+ $(MAINMANIFEST) >> $@
$(ECHO) >> $@
$(CAT) $(BEANMANIFEST) >> $@
--- a/jdk/make/common/shared/Defs.gmk Wed May 26 20:28:04 2010 -0700
+++ b/jdk/make/common/shared/Defs.gmk Fri May 28 11:09:24 2010 -0700
@@ -214,7 +214,7 @@
PRODUCT_NAME = Java(TM)
PRODUCT_SUFFIX = SE Runtime Environment
JDK_RC_PLATFORM_NAME = Platform SE
- COMPANY_NAME = Sun Microsystems, Inc.
+ COMPANY_NAME = Oracle
endif
RUNTIME_NAME = $(PRODUCT_NAME) $(PRODUCT_SUFFIX)
--- a/jdk/make/java/nio/Makefile Wed May 26 20:28:04 2010 -0700
+++ b/jdk/make/java/nio/Makefile Fri May 28 11:09:24 2010 -0700
@@ -818,7 +818,7 @@
GENSOR_EXE = $(TEMPDIR)/genSocketOptionRegistry$(EXE_SUFFIX)
SOR_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSOR_SRC) | \
- $(NAWK) '/^.*Copyright.*Sun/ { print $$3 }')
+ $(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
$(TEMPDIR)/$(GENSOR_SRC) : $(GENSOR_SRC)
$(install-non-module-file)
@@ -830,7 +830,7 @@
$(SCH_GEN)/SocketOptionRegistry.java: $(GENSOR_EXE)
$(prep-target)
- NAWK="$(NAWK)" SH="$(SH)" $(SH) -e addNotices.sh $(SOR_COPYRIGHT_YEARS) > $@
+ NAWK="$(NAWK)" SH="$(SH)" $(SH) -e addNotices.sh "$(SOR_COPYRIGHT_YEARS)" > $@
$(GENSOR_EXE) >> $@
#
@@ -852,7 +852,7 @@
GENUC_EXE = $(TEMPDIR)/genUnixConstants
GENUC_COPYRIGHT_YEARS = $(shell $(CAT) $(GENUC_SRC) | \
- $(NAWK) '/^.*Copyright.*Sun/ { print $$3 }')
+ $(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
$(GENUC_EXE) : $(GENUC_SRC)
$(prep-target)
@@ -860,7 +860,7 @@
$(SFS_GEN)/UnixConstants.java: $(GENUC_EXE)
$(prep-target)
- NAWK="$(NAWK)" SH="$(SH)" $(SH) -e addNotices.sh $(GENUC_COPYRIGHT_YEARS) > $@
+ NAWK="$(NAWK)" SH="$(SH)" $(SH) -e addNotices.sh "$(GENUC_COPYRIGHT_YEARS)" > $@
$(GENUC_EXE) >> $@
GENSC_SRC = $(PLATFORM_SRC)/native/sun/nio/fs/genSolarisConstants.c
@@ -868,7 +868,7 @@
GENSC_EXE = $(TEMPDIR)/genSolarisConstants
GENSC_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSC_SRC) | \
- $(NAWK) '/^.*Copyright.*Sun/ { print $$3 }')
+ $(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
$(GENSC_EXE) : $(GENSC_SRC)
$(prep-target)
@@ -876,7 +876,7 @@
$(SFS_GEN)/SolarisConstants.java: $(GENSC_EXE)
$(prep-target)
- NAWK="$(NAWK)" SH="$(SH)" $(SH) -e addNotices.sh $(GENSC_COPYRIGHT_YEARS) > $@
+ NAWK="$(NAWK)" SH="$(SH)" $(SH) -e addNotices.sh "$(GENSC_COPYRIGHT_YEARS)" > $@
$(GENSC_EXE) >> $@
.PHONY: sources
--- a/jdk/make/java/nio/addNotices.sh Wed May 26 20:28:04 2010 -0700
+++ b/jdk/make/java/nio/addNotices.sh Fri May 28 11:09:24 2010 -0700
@@ -28,7 +28,7 @@
# a java comment block. If this script is invoked with a copyright
# year/year range, the java comment block will contain a Sun copyright.
-COPYRIGHT_YEARS=$1
+COPYRIGHT_YEARS="$1"
cat <<__END__
/*
@@ -36,10 +36,10 @@
if [ "x$COPYRIGHT_YEARS" != x ]; then
cat <<__END__
- * Copyright $COPYRIGHT_YEARS Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright (c) $COPYRIGHT_YEARS Oracle and/or its affiliates. All rights reserved.
__END__
fi
-$NAWK ' /^#.*Copyright.*Sun/ { next }
+$NAWK ' /^#.*Copyright.*Oracle/ { next }
/^#([^!]|$)/ { sub(/^#/, " *"); print }
/^$/ { print " */"; exit } ' $0
--- a/jdk/make/java/nio/genCharsetProvider.sh Wed May 26 20:28:04 2010 -0700
+++ b/jdk/make/java/nio/genCharsetProvider.sh Fri May 28 11:09:24 2010 -0700
@@ -36,7 +36,7 @@
DST=$1; shift
eval `$NAWK <$SPEC '
- /^[ \t]*copyright / { printf "COPYRIGHT_YEARS=%s\n", $2; }
+ /^[ \t]*copyright / { printf "COPYRIGHT_YEARS=\"%s %s\"\n", $2, $3; }
/^[ \t]*package / { printf "PKG=%s\n", $2; }
/^[ \t]*class / { printf "CLASS=%s\n", $2; }
'`
--- a/jdk/make/tools/manifest.mf Wed May 26 20:28:04 2010 -0700
+++ b/jdk/make/tools/manifest.mf Fri May 28 11:09:24 2010 -0700
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Specification-Title: Java Platform API Specification
Specification-Version: 1.6
-Specification-Vendor: Sun Microsystems, Inc.
+Specification-Vendor: Oracle
Implementation-Title: Java Runtime Environment
Implementation-Version: @@RELEASE@@
-Implementation-Vendor: Sun Microsystems, Inc.
+Implementation-Vendor: @@COMPANY_NAME@@
--- a/jdk/src/share/classes/java/nio/channels/exceptions Wed May 26 20:28:04 2010 -0700
+++ b/jdk/src/share/classes/java/nio/channels/exceptions Fri May 28 11:09:24 2010 -0700
@@ -28,7 +28,7 @@
SINCE=1.4
PACKAGE=java.nio.channels
# This year should only change if the generated source is modified.
-COPYRIGHT_YEARS=2000-2007
+COPYRIGHT_YEARS="2000, 2007,"
SUPER=java.io.IOException
--- a/jdk/src/share/classes/java/nio/charset/exceptions Wed May 26 20:28:04 2010 -0700
+++ b/jdk/src/share/classes/java/nio/charset/exceptions Fri May 28 11:09:24 2010 -0700
@@ -28,7 +28,7 @@
SINCE=1.4
PACKAGE=java.nio.charset
# This year should only change if the generated source is modified.
-COPYRIGHT_YEARS=2000-2007
+COPYRIGHT_YEARS="2000, 2007,"
SUPER=java.io.IOException
--- a/jdk/src/share/classes/java/nio/exceptions Wed May 26 20:28:04 2010 -0700
+++ b/jdk/src/share/classes/java/nio/exceptions Fri May 28 11:09:24 2010 -0700
@@ -28,7 +28,7 @@
SINCE=1.4
PACKAGE=java.nio
# This year should only change if the generated source is modified.
-COPYRIGHT_YEARS=2000-2007
+COPYRIGHT_YEARS="2000, 2007,"
SUPER=RuntimeException
--- a/jdk/src/share/classes/sun/nio/cs/standard-charsets Wed May 26 20:28:04 2010 -0700
+++ b/jdk/src/share/classes/sun/nio/cs/standard-charsets Fri May 28 11:09:24 2010 -0700
@@ -35,7 +35,7 @@
# which is lazy initialized.
# This year should only change if the generated source is modified.
-copyright 2000
+copyright 2000, 2007,
package sun.nio.cs
class StandardCharsets