This commit is contained in:
Phil Race 2017-11-01 10:00:38 -07:00
commit aa96056b21
144 changed files with 2367 additions and 676 deletions

View file

@ -453,3 +453,4 @@ e5357aa85dadacc6562175ff74714fecfb4470cf jdk-10+22
1129253d3bc728a2963ba411ab9dd1adf358fb6b jdk-10+26
b87d7b5d5dedc1185e5929470f945b7378cdb3ad jdk-10+27
92f08900cb3c0d694e5c529a676c1c9e5909193f jdk-10+28
a6e591e12f122768f675428e1e5a838fd0e9c7ec jdk-10+29

View file

@ -64,7 +64,7 @@ MODULES_SOURCE_PATH := $(call PathList, $(call GetModuleSrcPath) \
JAVADOC_BASE_URL := http://www.oracle.com/pls/topic/lookup?ctx=javase9&id=homepage
BUG_SUBMIT_URL := http://bugreport.java.com/bugreport/
COPYRIGHT_URL := {@docroot}/../legal/copyright.html
LICENSE_URL := http://www.oracle.com/technetwork/java/javase/terms/license/java9speclicense.html
LICENSE_URL := http://www.oracle.com/technetwork/java/javase/terms/license/java10speclicense.html
REDISTRIBUTION_URL := http://www.oracle.com/technetwork/java/redist-137594.html
# In order to get a specific ordering it's necessary to specify the total

View file

@ -432,8 +432,8 @@ $(eval $(call IncludeCustomExtension, Images-post.gmk))
$(JRE_TARGETS): $(TOOL_JRE_TARGETS)
$(JDK_TARGETS): $(TOOL_JDK_TARGETS)
jdk: $(JDK_TARGETS)
jre: $(JRE_TARGETS)
jdk: $(TOOL_JDK_TARGETS) $(JDK_TARGETS)
jre: $(TOOL_JRE_TARGETS) $(JRE_TARGETS)
symbols: $(SYMBOLS_TARGETS)
all: jdk jre symbols

View file

@ -223,9 +223,6 @@ else # HAS_SPEC=true
# Our helper functions.
include $(TOPDIR)/make/InitSupport.gmk
# Verify that the spec file we included seems okay.
$(eval $(call CheckSpecSanity))
# Parse COMPARE_BUILD (for makefile development)
$(eval $(call ParseCompareBuild))

View file

@ -359,23 +359,6 @@ else # $(HAS_SPEC)=true
BUILD_LOG_PIPE := > >($(TEE) -a $(BUILD_LOG)) 2> >($(TEE) -a $(BUILD_LOG) >&2) && wait
# Sanity check the spec file, so it matches this source code
define CheckSpecSanity
ifneq ($$(ACTUAL_TOPDIR), $$(TOPDIR))
ifneq ($$(ACTUAL_TOPDIR), $$(ORIGINAL_TOPDIR))
ifneq ($$(ACTUAL_TOPDIR), $$(CANONICAL_TOPDIR))
$$(info Error: SPEC mismatch! Current working directory)
$$(info $$(ACTUAL_TOPDIR))
$$(info does not match either TOPDIR, ORIGINAL_TOPDIR or CANONICAL_TOPDIR)
$$(info $$(TOPDIR))
$$(info $$(ORIGINAL_TOPDIR))
$$(info $$(CANONICAL_TOPDIR))
$$(error Cannot continue)
endif
endif
endif
endef
# Parse COMPARE_BUILD into COMPARE_BUILD_*
# Syntax: COMPARE_BUILD=CONF=<configure options>:PATCH=<patch file>:
# MAKE=<make targets>:COMP_OPTS=<compare script options>:

View file

@ -561,19 +561,10 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
AC_MSG_RESULT([$TOPDIR])
AC_SUBST(TOPDIR)
# Save the original version of TOPDIR for string comparisons
ORIGINAL_TOPDIR="$TOPDIR"
AC_SUBST(ORIGINAL_TOPDIR)
# We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
BASIC_FIXUP_PATH(CURDIR)
BASIC_FIXUP_PATH(TOPDIR)
# Calculate a canonical version of TOPDIR for string comparisons
CANONICAL_TOPDIR=$TOPDIR
BASIC_REMOVE_SYMBOLIC_LINKS([CANONICAL_TOPDIR])
AC_SUBST(CANONICAL_TOPDIR)
# Locate the directory of this script.
AUTOCONF_DIR=$TOPDIR/make/autoconf
@ -648,6 +639,14 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
SYSROOT="$DEVKIT_ROOT/$host/sys-root"
fi
if test "x$DEVKIT_ROOT" != x; then
DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib"
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib64"
fi
AC_SUBST(DEVKIT_LIB_DIR)
fi
]
)

View file

@ -1,5 +1,5 @@
SRC#
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -203,6 +203,9 @@ FLAGS_SETUP_COMPILER_FLAGS_MISC
JDKOPT_SETUP_DEBUG_SYMBOLS
JDKOPT_SETUP_CODE_COVERAGE
# AddressSanitizer
JDKOPT_SETUP_ADDRESS_SANITIZER
# Need toolchain to setup dtrace
HOTSPOT_SETUP_DTRACE
HOTSPOT_ENABLE_DISABLE_AOT

View file

@ -705,6 +705,7 @@ FIXPATH
BUILD_GTEST
ENABLE_CDS
ENABLE_AOT
ASAN_ENABLED
GCOV_ENABLED
ZIP_EXTERNAL_DEBUG_SYMBOLS
COPY_DEBUG_SYMBOLS
@ -959,6 +960,7 @@ CONF_NAME
SPEC
SDKROOT
XCODEBUILD
DEVKIT_LIB_DIR
JVM_VARIANT_MAIN
VALID_JVM_VARIANTS
JVM_VARIANTS
@ -966,8 +968,6 @@ DEBUG_LEVEL
HOTSPOT_DEBUG_LEVEL
JDK_VARIANT
USERNAME
CANONICAL_TOPDIR
ORIGINAL_TOPDIR
TOPDIR
PATH_SEP
HOTSPOT_BUILD_CPU_DEFINE
@ -1174,6 +1174,7 @@ with_native_debug_symbols
enable_debug_symbols
enable_zip_debug_info
enable_native_coverage
enable_asan
enable_dtrace
enable_aot
enable_cds
@ -1981,6 +1982,7 @@ Optional Features:
--enable-native-coverage
enable native compilation with code coverage
data[disabled]
--enable-asan enable AddressSanitizer if possible [disabled]
--enable-dtrace[=yes/no/auto]
enable dtrace. Default is auto, where dtrace is
enabled if all dependencies are present.
@ -4416,6 +4418,12 @@ VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
#
###############################################################################
#
# AddressSanitizer
#
################################################################################
#
# Static build support. When enabled will generate static
@ -5158,7 +5166,7 @@ VS_SDK_PLATFORM_NAME_2013=
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1508961024
DATE_WHEN_GENERATED=1509128484
###############################################################################
#
@ -16577,10 +16585,6 @@ $as_echo_n "checking for top-level directory... " >&6; }
$as_echo "$TOPDIR" >&6; }
# Save the original version of TOPDIR for string comparisons
ORIGINAL_TOPDIR="$TOPDIR"
# We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
# Only process if variable expands to non-empty
@ -16847,58 +16851,6 @@ $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid."
fi
# Calculate a canonical version of TOPDIR for string comparisons
CANONICAL_TOPDIR=$TOPDIR
if test "x$OPENJDK_BUILD_OS" != xwindows; then
# Follow a chain of symbolic links. Use readlink
# where it exists, else fall back to horribly
# complicated shell code.
if test "x$READLINK_TESTED" != yes; then
# On MacOSX there is a readlink tool with a different
# purpose than the GNU readlink tool. Check the found readlink.
ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
if test "x$ISGNU" = x; then
# A readlink that we do not know how to use.
# Are there other non-GNU readlinks out there?
READLINK_TESTED=yes
READLINK=
fi
fi
if test "x$READLINK" != x; then
CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
else
# Save the current directory for restoring afterwards
STARTDIR=$PWD
COUNTER=0
sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
cd $sym_link_dir
# Use -P flag to resolve symlinks in directories.
cd `$THEPWDCMD -P`
sym_link_dir=`$THEPWDCMD -P`
# Resolve file symlinks
while test $COUNTER -lt 20; do
ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
if test "x$ISLINK" == x; then
# This is not a symbolic link! We are done!
break
fi
# Again resolve directory symlinks since the target of the just found
# link could be in a different directory
cd `$DIRNAME $ISLINK`
sym_link_dir=`$THEPWDCMD -P`
sym_link_file=`$BASENAME $ISLINK`
let COUNTER=COUNTER+1
done
cd $STARTDIR
CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
fi
fi
# Locate the directory of this script.
AUTOCONF_DIR=$TOPDIR/make/autoconf
@ -17372,6 +17324,14 @@ $as_echo "$DEVKIT_ROOT" >&6; }
SYSROOT="$DEVKIT_ROOT/$host/sys-root"
fi
if test "x$DEVKIT_ROOT" != x; then
DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib"
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib64"
fi
fi
fi
@ -54268,6 +54228,49 @@ $as_echo "no" >&6; }
# AddressSanitizer
# Check whether --enable-asan was given.
if test "${enable_asan+set}" = set; then :
enableval=$enable_asan;
fi
ASAN_ENABLED="no"
if test "x$enable_asan" = "xyes"; then
case $TOOLCHAIN_TYPE in
gcc | clang)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if asan is enabled" >&5
$as_echo_n "checking if asan is enabled... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
ASAN_CFLAGS="-fsanitize=address -fno-omit-frame-pointer"
ASAN_LDFLAGS="-fsanitize=address"
JVM_CFLAGS="$JVM_CFLAGS $ASAN_CFLAGS"
JVM_LDFLAGS="$JVM_LDFLAGS $ASAN_LDFLAGS"
CFLAGS_JDKLIB="$CFLAGS_JDKLIB $ASAN_CFLAGS"
CFLAGS_JDKEXE="$CFLAGS_JDKEXE $ASAN_CFLAGS"
CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $ASAN_CFLAGS"
CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $ASAN_CFLAGS"
LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $ASAN_LDFLAGS"
LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $ASAN_LDFLAGS"
ASAN_ENABLED="yes"
;;
*)
as_fn_error $? "--enable-asan only works with toolchain type gcc or clang" "$LINENO" 5
;;
esac
elif test "x$enable_asan" = "xno"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if asan is enabled" >&5
$as_echo_n "checking if asan is enabled... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
elif test "x$enable_asan" != "x"; then
as_fn_error $? "--enable-asan can only be assigned \"yes\" or \"no\"" "$LINENO" 5
fi
# Need toolchain to setup dtrace
# Test for dtrace dependencies

View file

@ -399,6 +399,46 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_CODE_COVERAGE],
AC_SUBST(GCOV_ENABLED)
])
###############################################################################
#
# AddressSanitizer
#
AC_DEFUN_ONCE([JDKOPT_SETUP_ADDRESS_SANITIZER],
[
AC_ARG_ENABLE(asan, [AS_HELP_STRING([--enable-asan],
[enable AddressSanitizer if possible @<:@disabled@:>@])])
ASAN_ENABLED="no"
if test "x$enable_asan" = "xyes"; then
case $TOOLCHAIN_TYPE in
gcc | clang)
AC_MSG_CHECKING([if asan is enabled])
AC_MSG_RESULT([yes])
ASAN_CFLAGS="-fsanitize=address -fno-omit-frame-pointer"
ASAN_LDFLAGS="-fsanitize=address"
JVM_CFLAGS="$JVM_CFLAGS $ASAN_CFLAGS"
JVM_LDFLAGS="$JVM_LDFLAGS $ASAN_LDFLAGS"
CFLAGS_JDKLIB="$CFLAGS_JDKLIB $ASAN_CFLAGS"
CFLAGS_JDKEXE="$CFLAGS_JDKEXE $ASAN_CFLAGS"
CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $ASAN_CFLAGS"
CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $ASAN_CFLAGS"
LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $ASAN_LDFLAGS"
LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $ASAN_LDFLAGS"
ASAN_ENABLED="yes"
;;
*)
AC_MSG_ERROR([--enable-asan only works with toolchain type gcc or clang])
;;
esac
elif test "x$enable_asan" = "xno"; then
AC_MSG_CHECKING([if asan is enabled])
AC_MSG_RESULT([no])
elif test "x$enable_asan" != "x"; then
AC_MSG_ERROR([--enable-asan can only be assigned "yes" or "no"])
fi
AC_SUBST(ASAN_ENABLED)
])
################################################################################
#
# Static build support. When enabled will generate static

View file

@ -127,9 +127,6 @@ SYSROOT_LDFLAGS := @SYSROOT_LDFLAGS@
# The top-level directory of the source repository
TOPDIR:=@TOPDIR@
# These two versions of TOPDIR are used in string comparisons
ORIGINAL_TOPDIR:=@ORIGINAL_TOPDIR@
CANONICAL_TOPDIR:=@CANONICAL_TOPDIR@
IMPORT_MODULES_CLASSES:=@IMPORT_MODULES_CLASSES@
@ -315,6 +312,16 @@ UNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@
GCOV_ENABLED=@GCOV_ENABLED@
# AddressSanitizer
export ASAN_ENABLED:=@ASAN_ENABLED@
export DEVKIT_LIB_DIR:=@DEVKIT_LIB_DIR@
ifeq ($(ASAN_ENABLED), yes)
export ASAN_OPTIONS="handle_segv=0 detect_leaks=0"
ifneq ($(DEVKIT_LIB_DIR),)
export LD_LIBRARY_PATH:=$(LD_LIBRARY_PATH):$(DEVKIT_LIB_DIR)
endif
endif
# Necessary additional compiler flags to compile X11
X_CFLAGS:=@X_CFLAGS@
X_LIBS:=@X_LIBS@

View file

@ -249,10 +249,10 @@ SPEC_SUBDIRS += share/specs
# configuration.
# Param 1 - Module to find for, set to * for finding all
FindAllModuleInfos = \
$(wildcard \
$(sort $(wildcard \
$(foreach sub, $(SRC_SUBDIRS), \
$(patsubst %,%/$(strip $1)/$(sub)/module-info.java, $(TOP_SRC_DIRS))) \
$(patsubst %,%/$(strip $1)/module-info.java, $(IMPORT_MODULES_SRC)))
$(patsubst %,%/$(strip $1)/module-info.java, $(IMPORT_MODULES_SRC))))
# Find module-info.java files in the specific source dir
# Param 1 - Src dir to find module-info.java files in

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -36,6 +36,7 @@ import java.util.*;
import java.util.ResourceBundle.Control;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.xml.sax.SAXNotRecognizedException;
@ -217,6 +218,7 @@ public class CLDRConverter {
List<Bundle> bundles = readBundleList();
convertBundles(bundles);
convertBundles(addedBundles);
}
private static void usage() {
@ -293,14 +295,7 @@ public class CLDRConverter {
if (fileName.endsWith(".xml")) {
String id = fileName.substring(0, fileName.indexOf('.'));
Locale cldrLoc = Locale.forLanguageTag(toLanguageTag(id));
List<Locale> candList = applyParentLocales("", defCon.getCandidateLocales("", cldrLoc));
StringBuilder sb = new StringBuilder();
for (Locale loc : candList) {
if (!loc.equals(Locale.ROOT)) {
sb.append(toLocaleName(loc.toLanguageTag()));
sb.append(",");
}
}
StringBuilder sb = getCandLocales(cldrLoc);
if (sb.indexOf("root") == -1) {
sb.append("root");
}
@ -319,6 +314,23 @@ public class CLDRConverter {
}
private static final Map<String, Map<String, Object>> cldrBundles = new HashMap<>();
// this list will contain additional bundles to be generated for Region dependent Data.
private static List<Bundle> addedBundles = new ArrayList<>();
private static Map<String, SortedSet<String>> metaInfo = new HashMap<>();
static {
// For generating information on supported locales.
metaInfo.put("LocaleNames", new TreeSet<>());
metaInfo.put("CurrencyNames", new TreeSet<>());
metaInfo.put("TimeZoneNames", new TreeSet<>());
metaInfo.put("CalendarData", new TreeSet<>());
metaInfo.put("FormatData", new TreeSet<>());
metaInfo.put("AvailableLocales", new TreeSet<>());
}
private static Set<String> calendarDataFields = Set.of("firstDayOfWeek", "minimalDaysInFirstWeek");
static Map<String, Object> getCLDRBundle(String id) throws Exception {
Map<String, Object> bundle = cldrBundles.get(id);
@ -411,16 +423,85 @@ public class CLDRConverter {
parserLikelySubtags.parse(fileLikelySubtags, handlerLikelySubtags);
}
private static void convertBundles(List<Bundle> bundles) throws Exception {
// For generating information on supported locales.
Map<String, SortedSet<String>> metaInfo = new HashMap<>();
metaInfo.put("LocaleNames", new TreeSet<>());
metaInfo.put("CurrencyNames", new TreeSet<>());
metaInfo.put("TimeZoneNames", new TreeSet<>());
metaInfo.put("CalendarData", new TreeSet<>());
metaInfo.put("FormatData", new TreeSet<>());
metaInfo.put("AvailableLocales", new TreeSet<>());
/**
* This method will check if a new region dependent Bundle needs to be
* generated for this Locale id and targetMap. New Bundle will be generated
* when Locale id has non empty script and country code and targetMap
* contains region dependent data. This method will also remove region
* dependent data from this targetMap after candidate locales check. E.g. It
* will call genRegionDependentBundle() in case of az_Latn_AZ locale and
* remove region dependent data from this targetMap so that az_Latn_AZ
* bundle will not be created. For az_Cyrl_AZ, new Bundle will be generated
* but region dependent data will not be removed from targetMap as its candidate
* locales are [az_Cyrl_AZ, az_Cyrl, root], which does not include az_AZ for
* fallback.
*
*/
private static void checkRegionDependentBundle(Map<String, Object> targetMap, String id) {
if ((CLDRConverter.getScript(id) != "")
&& (CLDRConverter.getCountryCode(id) != "")) {
Map<String, Object> regionDepDataMap = targetMap
.keySet()
.stream()
.filter(calendarDataFields::contains)
.collect(Collectors.toMap(k -> k, targetMap::get));
if (!regionDepDataMap.isEmpty()) {
Locale cldrLoc = new Locale(CLDRConverter.getLanguageCode(id),
CLDRConverter.getCountryCode(id));
genRegionDependentBundle(regionDepDataMap, cldrLoc);
if (checkCandidateLocales(id, cldrLoc)) {
// Remove matchedKeys from this targetMap only if checkCandidateLocales() returns true.
regionDepDataMap.keySet().forEach(targetMap::remove);
}
}
}
}
/**
* This method will generate a new Bundle for region dependent data,
* minimalDaysInFirstWeek and firstDayOfWeek. Newly generated Bundle will be added
* to addedBundles list.
*/
private static void genRegionDependentBundle(Map<String, Object> targetMap, Locale cldrLoc) {
String localeId = cldrLoc.toString();
StringBuilder sb = getCandLocales(cldrLoc);
if (sb.indexOf(localeId) == -1) {
sb.append(localeId);
}
Bundle bundle = new Bundle(localeId, sb.toString(), null, null);
cldrBundles.put(localeId, targetMap);
addedBundles.add(bundle);
}
private static StringBuilder getCandLocales(Locale cldrLoc) {
List<Locale> candList = getCandidateLocales(cldrLoc);
StringBuilder sb = new StringBuilder();
for (Locale loc : candList) {
if (!loc.equals(Locale.ROOT)) {
sb.append(toLocaleName(loc.toLanguageTag()));
sb.append(",");
}
}
return sb;
}
private static List<Locale> getCandidateLocales(Locale cldrLoc) {
List<Locale> candList = new ArrayList<>();
candList = applyParentLocales("", defCon.getCandidateLocales("", cldrLoc));
return candList;
}
/**
* This method will return true, if for a given locale, its language and
* country specific locale will exist in runtime lookup path. E.g. it will
* return true for bs_Latn_BA.
*/
private static boolean checkCandidateLocales(String id, Locale cldrLoc) {
return(getCandidateLocales(Locale.forLanguageTag(id.replaceAll("_", "-")))
.contains(cldrLoc));
}
private static void convertBundles(List<Bundle> bundles) throws Exception {
// parent locales map. The mappings are put in base metaInfo file
// for now.
if (isBaseModule) {
@ -433,6 +514,8 @@ public class CLDRConverter {
Map<String, Object> targetMap = bundle.getTargetMap();
// check if new region DependentBundle needs to be generated for this Locale.
checkRegionDependentBundle(targetMap, bundle.getID());
EnumSet<Bundle.Type> bundleTypes = bundle.getBundleTypes();
if (bundle.isRoot()) {
@ -573,6 +656,14 @@ public class CLDRConverter {
return Locale.forLanguageTag(id.replaceAll("_", "-")).getCountry();
}
/*
* Returns the script portion of the given id.
* If id is "root", "" is returned.
*/
static String getScript(String id) {
return "root".equals(id) ? "" : Locale.forLanguageTag(id.replaceAll("_", "-")).getScript();
}
private static class KeyComparator implements Comparator<String> {
static KeyComparator INSTANCE = new KeyComparator();

View file

@ -385,7 +385,8 @@ class FileInputStream extends InputStream
synchronized (this) {
fc = this.channel;
if (fc == null) {
this.channel = fc = FileChannelImpl.open(fd, path, true, false, this);
this.channel = fc = FileChannelImpl.open(fd, path, true,
false, false, this);
if (closed) {
try {
// possible race with close(), benign since

View file

@ -410,7 +410,8 @@ class FileOutputStream extends OutputStream
synchronized (this) {
fc = this.channel;
if (fc == null) {
this.channel = fc = FileChannelImpl.open(fd, path, false, true, this);
this.channel = fc = FileChannelImpl.open(fd, path, false,
true, false, this);
if (closed) {
try {
// possible race with close(), benign since

View file

@ -698,7 +698,7 @@ public final class FilePermission extends Permission implements Serializable {
if (p2.equals(EMPTY_PATH)) {
return 0;
} else if (p2.getName(0).equals(DOTDOT_PATH)) {
// "." contains p2 iif p2 has no "..". Since a
// "." contains p2 iff p2 has no "..". Since
// a normalized path can only have 0 or more
// ".." at the beginning. We only need to look
// at the head.
@ -711,7 +711,7 @@ public final class FilePermission extends Permission implements Serializable {
} else if (p2.equals(EMPTY_PATH)) {
int c1 = p1.getNameCount();
if (!p1.getName(c1 - 1).equals(DOTDOT_PATH)) {
// "." is inside p1 iif p1 is 1 or more "..".
// "." is inside p1 iff p1 is 1 or more "..".
// For the same reason above, we only need to
// look at the tail.
return -1;

View file

@ -298,7 +298,8 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
synchronized (this) {
fc = this.channel;
if (fc == null) {
this.channel = fc = FileChannelImpl.open(fd, path, true, rw, this);
this.channel = fc = FileChannelImpl.open(fd, path, true,
rw, false, this);
if (closed.get()) {
try {
fc.close();

View file

@ -2664,6 +2664,7 @@ public final class String
* point</a> is passed through uninterpreted.
*
* @return an IntStream of char values from this sequence
* @since 9
*/
@Override
public IntStream chars() {
@ -2683,6 +2684,7 @@ public final class String
* {@code int} values which are then passed to the stream.
*
* @return an IntStream of Unicode code points from this sequence
* @since 9
*/
@Override
public IntStream codePoints() {

View file

@ -1937,7 +1937,7 @@ public final class System {
// initialization. So make sure the "props" is available at the
// very beginning of the initialization and all system properties to
// be put into it directly.
props = new Properties();
props = new Properties(84);
initProperties(props); // initialized by the VM
// There are certain system configurations that may be controlled by

View file

@ -88,7 +88,7 @@ final class WeakPairMap<K1, K2, V> {
* Maps the specified key pair to the specified value in this WeakPairMap.
* Neither the keys nor the value can be null.
* <p>The value can be retrieved by calling the {@link #get} method
* with the the same keys (compared by identity).
* with the same keys (compared by identity).
*
* @param k1 the 1st of the pair of keys with which the specified value is to
* be associated

View file

@ -765,7 +765,7 @@ public abstract class MethodHandle {
* In every other case, all conversions are applied <em>pairwise</em>,
* which means that each argument or return value is converted to
* exactly one argument or return value (or no return value).
* The applied conversions are defined by consulting the
* The applied conversions are defined by consulting
* the corresponding component types of the old and new
* method handle types.
* <p>

View file

@ -1196,7 +1196,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
static
MethodHandle bindCaller(MethodHandle mh, Class<?> hostClass) {
// Code in the the boot layer should now be careful while creating method handles or
// Code in the boot layer should now be careful while creating method handles or
// functional interface instances created from method references to @CallerSensitive methods,
// it needs to be ensured the handles or interface instances are kept safe and are not passed
// from the boot layer to untrusted code.

View file

@ -194,8 +194,8 @@ public final class StringConcatFactory {
static {
// In case we need to double-back onto the StringConcatFactory during this
// static initialization, make sure we have the reasonable defaults to complete
// the static initialization properly. After that, actual users would use the
// the proper values we have read from the the properties.
// the static initialization properly. After that, actual users would use
// the proper values we have read from the properties.
STRATEGY = DEFAULT_STRATEGY;
// CACHE_ENABLE = false; // implied
// CACHE = null; // implied
@ -398,8 +398,8 @@ public final class StringConcatFactory {
* <p>Then the following linkage invariants must hold:
*
* <ul>
* <li>The parameter count in {@code concatType} is less than or equal to 200</li>
*
* <li>The number of parameter slots in {@code concatType} is
* less than or equal to 200</li>
* <li>The return type in {@code concatType} is assignable from {@link java.lang.String}</li>
* </ul>
*
@ -487,8 +487,8 @@ public final class StringConcatFactory {
* <p>Then the following linkage invariants must hold:
*
* <ul>
* <li>The parameter count in {@code concatType} is less than or equal to
* 200</li>
* <li>The number of parameter slots in {@code concatType} is less than
* or equal to 200</li>
*
* <li>The parameter count in {@code concatType} equals to number of \1 tags
* in {@code recipe}</li>
@ -613,9 +613,9 @@ public final class StringConcatFactory {
concatType.returnType());
}
if (concatType.parameterCount() > MAX_INDY_CONCAT_ARG_SLOTS) {
if (concatType.parameterSlotCount() > MAX_INDY_CONCAT_ARG_SLOTS) {
throw new StringConcatException("Too many concat argument slots: " +
concatType.parameterCount() +
concatType.parameterSlotCount() +
", can only accept " +
MAX_INDY_CONCAT_ARG_SLOTS);
}

View file

@ -205,7 +205,7 @@ import static java.lang.invoke.MethodHandleStatics.newInternalError;
* and {@code double} on 32-bit platforms.
*
* <p>Access modes will override any memory ordering effects specified at
* the declaration site of a variable. For example, a VarHandle accessing a
* the declaration site of a variable. For example, a VarHandle accessing
* a field using the {@code get} access mode will access the field as
* specified <em>by its access mode</em> even if that field is declared
* {@code volatile}. When mixed access is performed extreme care should be
@ -423,7 +423,7 @@ import static java.lang.invoke.MethodHandleStatics.newInternalError;
* {@link java.lang.invoke.MethodHandles#varHandleInvoker}.
*
* <h1>Interoperation between VarHandles and Java generics</h1>
* A VarHandle can be obtained for a variable, such as a a field, which is
* A VarHandle can be obtained for a variable, such as a field, which is
* declared with Java generic types. As with the Core Reflection API, the
* VarHandle's variable type will be constructed from the erasure of the
* source-level type. When a VarHandle access mode method is invoked, the

View file

@ -988,7 +988,7 @@ class DatagramSocket implements java.io.Closeable {
/**
* Sets the SO_RCVBUF option to the specified value for this
* {@code DatagramSocket}. The SO_RCVBUF option is used by the
* {@code DatagramSocket}. The SO_RCVBUF option is used by
* the network implementation as a hint to size the underlying
* network I/O buffers. The SO_RCVBUF setting may also be used
* by the network implementation to determine the maximum size

View file

@ -143,7 +143,7 @@ class Inet4Address extends InetAddress {
/**
* Prior to 1.4 an InetAddress was created with a family
* based on the platform AF_INET value (usually 2).
* For compatibility reasons we must therefore write the
* For compatibility reasons we must therefore write
* the InetAddress with this family.
*/
inet.holder().family = 2;

View file

@ -333,7 +333,7 @@ public abstract class SocketImpl implements SocketOptions {
* latency, and low latency above short connection time, then it could
* invoke this method with the values {@code (0, 1, 2)}.
*
* By default, this method does nothing, unless it is overridden in a
* By default, this method does nothing, unless it is overridden in
* a sub-class.
*
* @param connectionTime

View file

@ -657,7 +657,7 @@ class SocksSocketImpl extends PlainSocketImpl implements SocksConsts {
/**
* Sends the Bind request to the SOCKS proxy. In the SOCKS protocol, bind
* means "accept incoming connection from", so the SocketAddress is the
* means "accept incoming connection from", so the SocketAddress is
* the one of the host we do accept connection from.
*
* @param saddr the Socket address of the remote host.

View file

@ -785,7 +785,7 @@ public abstract class URLConnection {
* required to make the connection. By default, this method
* returns {@code java.security.AllPermission}. Subclasses
* should override this method and return the permission
* that best represents the permission required to make a
* that best represents the permission required to make
* a connection to the URL. For example, a {@code URLConnection}
* representing a {@code file:} URL would return a
* {@code java.io.FilePermission} object.

View file

@ -165,7 +165,7 @@ public abstract class AsynchronousFileChannel
* <tr>
* <th scope="row" > {@link StandardOpenOption#DELETE_ON_CLOSE DELETE_ON_CLOSE} </th>
* <td> When this option is present then the implementation makes a
* <em>best effort</em> attempt to delete the file when closed by the
* <em>best effort</em> attempt to delete the file when closed by
* the {@link #close close} method. If the {@code close} method is not
* invoked then a <em>best effort</em> attempt is made to delete the file
* when the Java virtual machine terminates. </td>

View file

@ -216,7 +216,7 @@ public abstract class FileChannel
* <tr>
* <th scope="row" > {@link StandardOpenOption#DELETE_ON_CLOSE DELETE_ON_CLOSE} </th>
* <td> When this option is present then the implementation makes a
* <em>best effort</em> attempt to delete the file when closed by the
* <em>best effort</em> attempt to delete the file when closed by
* the {@link #close close} method. If the {@code close} method is not
* invoked then a <em>best effort</em> attempt is made to delete the file
* when the Java virtual machine terminates. </td>

View file

@ -3301,7 +3301,7 @@ public final class Files {
}
/**
* Writes bytes to a file. The {@code options} parameter specifies how the
* Writes bytes to a file. The {@code options} parameter specifies how
* the file is created or opened. If no options are present then this method
* works as if the {@link StandardOpenOption#CREATE CREATE}, {@link
* StandardOpenOption#TRUNCATE_EXISTING TRUNCATE_EXISTING}, and {@link

View file

@ -84,7 +84,7 @@ import sun.security.util.Debug;
* exists (e.g., so-called <i>community parameters</i> in DSA), there are two
* {@link #initialize(java.security.spec.AlgorithmParameterSpec)
* initialize} methods that have an {@code AlgorithmParameterSpec}
* argument. One also has a {@code SecureRandom} argument, while the
* argument. One also has a {@code SecureRandom} argument, while
* the other uses the {@code SecureRandom}
* implementation of the highest-priority installed provider as the source
* of randomness. (If none of the installed providers supply an implementation

View file

@ -4775,7 +4775,7 @@ public final class DateTimeFormatterBuilder {
//-----------------------------------------------------------------------
/**
* Prints or parses a localized pattern from a localized field.
* The specific formatter and parameters is not selected until the
* The specific formatter and parameters is not selected until
* the field is to be printed or parsed.
* The locale is needed to select the proper WeekFields from which
* the field for day-of-week, week-of-month, or week-of-year is selected.

View file

@ -311,7 +311,7 @@ public final class WeekFields implements Serializable {
* the new month or year.
* <p>
* WeekFields instances are singletons; for each unique combination
* of {@code firstDayOfWeek} and {@code minimalDaysInFirstWeek} the
* of {@code firstDayOfWeek} and {@code minimalDaysInFirstWeek}
* the same instance will be returned.
*
* @param firstDayOfWeek the first day of the week, not null

View file

@ -56,7 +56,7 @@ import java.nio.charset.StandardCharsets;
* base64 alphabet.</p></li>
*
* <li><a id="mime"><b>MIME</b></a>
* <p> Uses the "The Base64 Alphabet" as specified in Table 1 of
* <p> Uses "The Base64 Alphabet" as specified in Table 1 of
* RFC 2045 for encoding and decoding operation. The encoded output
* must be represented in lines of no more than 76 characters each
* and uses a carriage return {@code '\r'} followed immediately by

View file

@ -48,8 +48,8 @@ public class EventObject implements java.io.Serializable {
/**
* Constructs a prototypical Event.
*
* @param source The object on which the Event initially occurred.
* @exception IllegalArgumentException if source is null.
* @param source the object on which the Event initially occurred
* @throws IllegalArgumentException if source is null
*/
public EventObject(Object source) {
if (source == null)
@ -61,7 +61,7 @@ public class EventObject implements java.io.Serializable {
/**
* The object on which the Event initially occurred.
*
* @return The object on which the Event initially occurred.
* @return the object on which the Event initially occurred
*/
public Object getSource() {
return source;
@ -70,7 +70,7 @@ public class EventObject implements java.io.Serializable {
/**
* Returns a String representation of this EventObject.
*
* @return A a String representation of this EventObject.
* @return a String representation of this EventObject
*/
public String toString() {
return getClass().getName() + "[source=" + source + "]";

View file

@ -26,7 +26,7 @@
package java.util;
/**
* FomattableFlags are passed to the {@link Formattable#formatTo
* FormattableFlags are passed to the {@link Formattable#formatTo
* Formattable.formatTo()} method and modify the output format for {@linkplain
* Formattable Formattables}. Implementations of {@link Formattable} are
* responsible for interpreting and validating any flags.

View file

@ -1909,7 +1909,7 @@ public final class Locale implements Cloneable, Serializable {
* Returns a name for the locale that is appropriate for display to the
* user. This will be the values returned by getDisplayLanguage(),
* getDisplayScript(), getDisplayCountry(), and getDisplayVariant() assembled
* into a single string. The the non-empty values are used in order,
* into a single string. The non-empty values are used in order,
* with the second and subsequent names in parentheses. For example:
* <blockquote>
* language (script, country, variant)<br>

View file

@ -122,6 +122,10 @@ import jdk.internal.util.xml.PropertiesDefaultHandler;
* <p>This class is thread-safe: multiple threads can share a single
* {@code Properties} object without the need for external synchronization.
*
* @apiNote
* The {@code Properties} class does not inherit the concept of a load factor
* from its superclass, {@code Hashtable}.
*
* @author Arthur van Hoff
* @author Michael McCloskey
* @author Xueming Shen
@ -148,25 +152,49 @@ class Properties extends Hashtable<Object,Object> {
* simple read operations. Writes and bulk operations remain synchronized,
* as in Hashtable.
*/
private transient ConcurrentHashMap<Object, Object> map =
new ConcurrentHashMap<>(8);
private transient ConcurrentHashMap<Object, Object> map;
/**
* Creates an empty property list with no default values.
*
* @implNote The initial capacity of a {@code Properties} object created
* with this constructor is unspecified.
*/
public Properties() {
this(null);
this(null, 8);
}
/**
* Creates an empty property list with no default values, and with an
* initial size accommodating the specified number of elements without the
* need to dynamically resize.
*
* @param initialCapacity the {@code Properties} will be sized to
* accommodate this many elements
* @throws IllegalArgumentException if the initial capacity is less than
* zero.
*/
public Properties(int initialCapacity) {
this(null, initialCapacity);
}
/**
* Creates an empty property list with the specified defaults.
*
* @implNote The initial capacity of a {@code Properties} object created
* with this constructor is unspecified.
*
* @param defaults the defaults.
*/
public Properties(Properties defaults) {
this(defaults, 8);
}
private Properties(Properties defaults, int initialCapacity) {
// use package-private constructor to
// initialize unused fields with dummy values
super((Void) null);
map = new ConcurrentHashMap<>(initialCapacity);
this.defaults = defaults;
}

View file

@ -2743,7 +2743,7 @@ public abstract class ResourceBundle {
* of multiple subtags separated by underscore, generate candidate
* <code>Locale</code>s by omitting the variant subtags one by one, then
* insert them after every occurrence of <code> Locale</code>s with the
* full variant value in the original list. For example, if the
* full variant value in the original list. For example, if
* the variant consists of two subtags <em>V1</em> and <em>V2</em>:
*
* <ul>

View file

@ -1409,7 +1409,7 @@ public final class ServiceLoader<S>
*
* <p> To achieve laziness the actual work of locating providers is done
* when processing the stream. If a service provider cannot be loaded for any
* of the the reasons specified in the <a href="#errors">Errors</a> section
* of the reasons specified in the <a href="#errors">Errors</a> section
* above then {@link ServiceConfigurationError} is thrown by whatever method
* caused the service provider to be loaded. </p>
*

View file

@ -134,7 +134,7 @@ import sun.security.util.Debug;
* setting the value of the {@code auth.policy.provider} security property to
* the fully qualified name of the desired {@code Policy} implementation class.
*
* @deprecated as of JDK version 1.4 -- Replaced by java.security.Policy.
* @deprecated Replaced by java.security.Policy.
* java.security.Policy has a method:
* <pre>
* public PermissionCollection getPermissions
@ -152,11 +152,12 @@ import sun.security.util.Debug;
*
* These two APIs provide callers the means to query the
* Policy for Principal-based Permission entries.
* This class is subject to removal in a future version of Java SE.
*
* @since 1.4
* @see java.security.Security security properties
*/
@Deprecated(since="1.4")
@Deprecated(since="1.4", forRemoval=true)
public abstract class Policy {
private static Policy policy;

View file

@ -29,7 +29,6 @@ import java.security.AccessController;
import java.security.Permission;
import java.security.Permissions;
import java.security.PermissionCollection;
import java.security.Policy;
import java.security.Principal;
import java.security.PrivilegedAction;
import java.security.ProtectionDomain;
@ -57,7 +56,7 @@ public class SubjectDomainCombiner implements java.security.DomainCombiner {
sun.security.util.Debug.getInstance("combiner",
"\t[SubjectDomainCombiner]");
@SuppressWarnings("deprecation")
@SuppressWarnings({"deprecation", "removal"})
// Note: check only at classloading time, not dynamically during combine()
private static final boolean useJavaxPolicy =
javax.security.auth.Policy.isCustomPolicySet(debug);
@ -303,7 +302,7 @@ public class SubjectDomainCombiner implements java.security.DomainCombiner {
if (!allowCaching) {
java.security.AccessController.doPrivileged
(new PrivilegedAction<Void>() {
@SuppressWarnings("deprecation")
@SuppressWarnings({"deprecation", "removal"})
public Void run() {
// Call refresh only caching is disallowed
javax.security.auth.Policy.getPolicy().refresh();
@ -374,7 +373,7 @@ public class SubjectDomainCombiner implements java.security.DomainCombiner {
PermissionCollection newPerms =
java.security.AccessController.doPrivileged
(new PrivilegedAction<PermissionCollection>() {
@SuppressWarnings("deprecation")
@SuppressWarnings({"deprecation", "removal"})
public PermissionCollection run() {
return
javax.security.auth.Policy.getPolicy().getPermissions

View file

@ -238,7 +238,7 @@ public final class BootstrapLogger implements Logger, PlatformLogger.Bridge,
// This way we could simply do things like:
// push((logger) -> logger.log(level, msg));
// Unfortunately, if we come to here it means we are in the bootsraping
// phase where using lambdas is not safe yet - so we have to use a
// phase where using lambdas is not safe yet - so we have to use
// a data object instead...
//
static final class LogEvent {

View file

@ -66,7 +66,7 @@ import jdk.internal.perf.PerfCounter;
* -m and --add-modules options. The modules are located on a module path that
* is constructed from the upgrade module path, system modules, and application
* module path. The Configuration is instantiated as the boot layer with each
* module in the the configuration defined to a class loader.
* module in the configuration defined to a class loader.
*/
public final class ModuleBootstrap {

View file

@ -74,7 +74,7 @@ public class ModuleHashesBuilder {
* the outgoing edges from M to non-candidate modules.
*/
public Map<String, ModuleHashes> computeHashes(Set<String> roots) {
// build a graph containing the the packaged modules and
// build a graph containing the packaged modules and
// its transitive dependences matching --hash-modules
Graph.Builder<String> builder = new Graph.Builder<>();
Deque<ResolvedModule> deque = new ArrayDeque<>(configuration.modules());

View file

@ -56,7 +56,7 @@ public final class Resources {
/**
* Derive a <em>package name</em> for a resource. The package name
* returned by this method may not be a legal package name. This method
* returns null if the the resource name ends with a "/" (a directory)
* returns null if the resource name ends with a "/" (a directory)
* or the resource name does not contain a "/".
*/
public static String toPackageName(String name) {

View file

@ -192,7 +192,7 @@ final class Frame {
private static final int LOCAL = 0x2000000;
/**
* Kind of the the types that are relative to the stack of an input stack
* Kind of the types that are relative to the stack of an input stack
* map frame. The value of such types is a position relatively to the top of
* this stack.
*/

View file

@ -2888,7 +2888,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
/*
* If we have an input stream this means we received a response
* from the server. That stream may have been read to EOF and
* dependening on the stream type may already be closed or the
* depending on the stream type may already be closed or
* the http client may be returned to the keep-alive cache.
* If the http client has been returned to the keep-alive cache
* it may be closed (idle timeout) or may be allocated to

View file

@ -140,13 +140,6 @@ public class FileChannelImpl
// Used by FileInputStream.getChannel(), FileOutputStream.getChannel
// and RandomAccessFile.getChannel()
public static FileChannel open(FileDescriptor fd, String path,
boolean readable, boolean writable,
Object parent)
{
return new FileChannelImpl(fd, path, readable, writable, false, parent);
}
public static FileChannel open(FileDescriptor fd, String path,
boolean readable, boolean writable,
boolean direct, Object parent)

View file

@ -66,7 +66,7 @@ public class ParameterizedTypeImpl implements ParameterizedType {
/**
* Static factory. Given a (generic) class, actual type arguments
* and an owner type, creates a parameterized type.
* This class can be instantiated with a a raw type that does not
* This class can be instantiated with a raw type that does not
* represent a generic type, provided the list of actual type
* arguments is empty.
* If the ownerType argument is null, the declaring class of the

View file

@ -65,6 +65,7 @@ import sun.security.util.PropertyExpander;
* This class is entirely deprecated.
*/
@Deprecated
@SuppressWarnings("removal")
public class AuthPolicyFile extends javax.security.auth.Policy {
static final ResourceBundle rb =
@ -410,7 +411,7 @@ public class AuthPolicyFile extends javax.security.auth.Policy {
certs = null;
}
// only add if we had no signer or we had a
// only add if we had no signer or we had
// a signer and found the keys for it.
if (certs != null || pe.signedBy == null) {
Permission perm = new UnresolvedPermission(

View file

@ -789,7 +789,7 @@ public class PolicyFile extends java.security.Policy {
certs = null;
}
// only add if we had no signer or we had a
// only add if we had no signer or we had
// a signer and found the keys for it.
if (certs != null || pe.signedBy == null) {
Permission perm = new UnresolvedPermission(

View file

@ -154,7 +154,7 @@ class SubjectCodeSource extends CodeSource implements java.io.Serializable {
*
* @param codesource the <code>CodeSource</code> to compare against.
*
* @return true if this <code>SubjectCodeSource</code> implies the
* @return true if this <code>SubjectCodeSource</code> implies
* the specified <code>CodeSource</code>.
*/
public boolean implies(CodeSource codesource) {

View file

@ -119,7 +119,7 @@ public final class ResponderId {
* When encoded in DER this object will use the byKey option, a
* SHA-1 hash of the responder's public key.
*
* @param pubKey the the OCSP responder's public key
* @param pubKey the OCSP responder's public key
*
* @throws IOException if the internal DER-encoding of the
* {@code KeyIdentifier} fails.

View file

@ -94,7 +94,7 @@ public class SunCertPathBuilderException extends CertPathBuilderException {
}
/**
* Creates a <code>SunCertPathBuilderException</code> withe the specified
* Creates a <code>SunCertPathBuilderException</code> with the specified
* detail message and adjacency list.
*
* @param msg the detail message

View file

@ -145,7 +145,7 @@ final class CertStatusReqItemV2 {
* @return the encoded length of this {@code CertStatusReqItemV2}
*/
int length() {
// The length is the the status type (1 byte) + the request length
// The length is the status type (1 byte) + the request length
// field (2 bytes) + the StatusRequest data length.
return request.length() + 3;
}

View file

@ -539,7 +539,7 @@ final class DTLSInputRecord extends InputRecord implements DTLSRecord {
// Should be repacked for suitable fragment length.
//
// Note that the acquiring processes will reassemble the
// Note that the acquiring processes will reassemble
// the fragments later.
return compareToSequence(o.recordEpoch, o.recordSeq);
}

View file

@ -188,7 +188,7 @@ final class MAC extends Authenticator {
* @param type record type
* @param bb a ByteBuffer in which the position and limit
* demarcate the data to be MAC'd.
* @param isSimulated if true, simulate the the MAC computation
* @param isSimulated if true, simulate the MAC computation
*
* @return the MAC result
*/

View file

@ -333,7 +333,7 @@ final class TrustStoreManager {
}
/**
* Load the the KeyStore as described in the specified descriptor.
* Load the KeyStore as described in the specified descriptor.
*/
private static KeyStore loadKeyStore(
TrustStoreDescriptor descriptor) throws Exception {

View file

@ -724,7 +724,8 @@ public class SignatureFileVerifier {
if (signers == null) {
signers = new ArrayList<>();
}
// Append the new code signer
// Append the new code signer. If timestamp is invalid, this
// jar will be treated as unsigned.
signers.add(new CodeSigner(certChain, info.getTimestamp()));
if (debug != null) {

View file

@ -1485,7 +1485,7 @@ public class X509CertImpl extends X509Certificate implements DerEncoder {
}
/**
* Get the certificate constraints path length from the
* Get the certificate constraints path length from
* the critical BasicConstraints extension, (oid = 2.5.29.19).
* @return the length of the constraint.
*/

View file

@ -592,7 +592,7 @@ abstract class Trie2 implements Iterable<Trie2.Range> {
// may be lower when iterating over the code points for a single lead surrogate.
private int limitCP;
// True while iterating over the the Trie2 values for code points.
// True while iterating over the Trie2 values for code points.
// False while iterating over the alternate values for lead surrogates.
private boolean doingCodePoints = true;

View file

@ -45,7 +45,7 @@ import jdk.internal.logger.LoggerWrapper;
*
* If the logging facility is not enabled, the platform loggers
* will output log messages per the default logging configuration
* (see below). In this implementation, it does not log the
* (see below). In this implementation, it does not log
* the stack frame information issuing the log message.
*
* When the logging facility is enabled (at startup or runtime),

View file

@ -110,7 +110,7 @@ class UnixChannelFactory {
static FileChannel newFileChannel(int fd, String path, boolean reading, boolean writing) {
FileDescriptor fdObj = new FileDescriptor();
fdAccess.set(fdObj, fd);
return FileChannelImpl.open(fdObj, path, reading, writing, null);
return FileChannelImpl.open(fdObj, path, reading, writing, false, null);
}
/**

View file

@ -183,7 +183,6 @@ public enum SourceVersion {
case "10":
return RELEASE_10;
case "9":
case "1.9":
return RELEASE_9;
case "1.8":
return RELEASE_8;

View file

@ -75,7 +75,7 @@ public abstract class AbstractAnnotationValueVisitor6<R, P>
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
@Deprecated
@Deprecated(since="9")
protected AbstractAnnotationValueVisitor6() {}
/**

View file

@ -75,7 +75,7 @@ public abstract class AbstractElementVisitor6<R, P> implements ElementVisitor<R,
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
@Deprecated
@Deprecated(since="9")
protected AbstractElementVisitor6(){}
/**

View file

@ -74,7 +74,7 @@ public abstract class AbstractTypeVisitor6<R, P> implements TypeVisitor<R, P> {
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
@Deprecated
@Deprecated(since="9")
protected AbstractTypeVisitor6() {}
/**

View file

@ -91,7 +91,7 @@ public class ElementKindVisitor6<R, P>
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
@Deprecated
@Deprecated(since="9")
protected ElementKindVisitor6() {
super(null);
}
@ -104,7 +104,7 @@ public class ElementKindVisitor6<R, P>
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
@Deprecated
@Deprecated(since="9")
protected ElementKindVisitor6(R defaultValue) {
super(defaultValue);
}

View file

@ -106,7 +106,7 @@ public class ElementScanner6<R, P> extends AbstractElementVisitor6<R, P> {
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
@Deprecated
@Deprecated(since="9")
protected ElementScanner6(){
DEFAULT_VALUE = null;
}
@ -119,7 +119,7 @@ public class ElementScanner6<R, P> extends AbstractElementVisitor6<R, P> {
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
@Deprecated
@Deprecated(since="9")
protected ElementScanner6(R defaultValue){
DEFAULT_VALUE = defaultValue;
}

View file

@ -92,7 +92,7 @@ public class SimpleAnnotationValueVisitor6<R, P>
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
@Deprecated
@Deprecated(since="9")
protected SimpleAnnotationValueVisitor6() {
super();
DEFAULT_VALUE = null;
@ -106,7 +106,7 @@ public class SimpleAnnotationValueVisitor6<R, P>
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
@Deprecated
@Deprecated(since="9")
protected SimpleAnnotationValueVisitor6(R defaultValue) {
super();
DEFAULT_VALUE = defaultValue;

View file

@ -94,7 +94,7 @@ public class SimpleElementVisitor6<R, P> extends AbstractElementVisitor6<R, P> {
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
@Deprecated
@Deprecated(since="9")
protected SimpleElementVisitor6(){
DEFAULT_VALUE = null;
}
@ -107,7 +107,7 @@ public class SimpleElementVisitor6<R, P> extends AbstractElementVisitor6<R, P> {
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
@Deprecated
@Deprecated(since="9")
protected SimpleElementVisitor6(R defaultValue){
DEFAULT_VALUE = defaultValue;
}

View file

@ -94,7 +94,7 @@ public class SimpleTypeVisitor6<R, P> extends AbstractTypeVisitor6<R, P> {
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
@Deprecated
@Deprecated(since="9")
protected SimpleTypeVisitor6(){
DEFAULT_VALUE = null;
}
@ -107,7 +107,7 @@ public class SimpleTypeVisitor6<R, P> extends AbstractTypeVisitor6<R, P> {
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
@Deprecated
@Deprecated(since="9")
protected SimpleTypeVisitor6(R defaultValue){
DEFAULT_VALUE = defaultValue;
}

View file

@ -85,7 +85,7 @@ public class TypeKindVisitor6<R, P> extends SimpleTypeVisitor6<R, P> {
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
@Deprecated
@Deprecated(since="9")
protected TypeKindVisitor6() {
super(null);
}
@ -99,7 +99,7 @@ public class TypeKindVisitor6<R, P> extends SimpleTypeVisitor6<R, P> {
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
@Deprecated
@Deprecated(since="9")
protected TypeKindVisitor6(R defaultValue) {
super(defaultValue);
}

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -96,7 +96,7 @@ public class ToolProvider {
* locate system tools as well as user-installed tools.
* @return a class loader, or {@code null}
*/
@Deprecated
@Deprecated(since="9")
public static ClassLoader getSystemToolClassLoader() {
return null;
}

View file

@ -1,6 +1,6 @@
/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -181,6 +181,7 @@ public abstract class Utility {
* @throws IOException if a failure from reading from the bytes argument
* occurs
*/
@SuppressWarnings("fallthrough") // by design for case Const.INSTANCEOF
public static String codeToString(final ByteSequence bytes, final ConstantPool constant_pool,
final boolean verbose) throws IOException {
final short opcode = (short) bytes.readUnsignedByte();

View file

@ -1,6 +1,6 @@
/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -175,6 +175,7 @@ class BCELFactory extends EmptyVisitor {
@Override
@SuppressWarnings("fallthrough") // by design for case Const.ANEWARRAY
public void visitAllocationInstruction( final AllocationInstruction i ) {
Type type;
if (i instanceof CPInstruction) {

View file

@ -1,6 +1,6 @@
/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -54,6 +54,7 @@ final class Message extends Instruction {
return Type.Void;
}
@SuppressWarnings("fallthrough") // at default
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();

View file

@ -232,6 +232,7 @@ final class Step extends RelativeLocationPath {
translateStep(classGen, methodGen, hasPredicates() ? _predicates.size() - 1 : -1);
}
@SuppressWarnings("fallthrough") // at case NodeTest.ANODE and NodeTest.ELEMENT
private void translateStep(ClassGenerator classGen,
MethodGenerator methodGen,
int predicateIndex) {

View file

@ -191,6 +191,7 @@ final class Whitespace extends TopLevelElement {
* Scans through the rules vector and looks for a rule of higher
* priority that contradicts the current rule.
*/
@SuppressWarnings("fallthrough") // case RULE_NAMESPACE
private static WhitespaceRule findContradictingRule(List<WhitespaceRule> rules,
WhitespaceRule rule) {
for (WhitespaceRule currentRule : rules) {

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -73,6 +74,7 @@ class XPathLexer implements com.sun.java_cup.internal.runtime.Scanner {
* name instead of a keyword (Jira-1912). Look two tokens behind
* to desambiguate expressions like "* and *" or "and * and".
*/
@SuppressWarnings("fallthrough")
Symbol disambiguateOperator(int ss) throws Exception {
switch (last) {
case sym.STAR:
@ -745,6 +747,7 @@ class XPathLexer implements com.sun.java_cup.internal.runtime.Scanner {
":13,-1:2,184:10,-1:3,76,184,76:3,-1:4,184:6,64,-1:2,76,-1:6,184:5,-1:3,184:" +
"4,232,184:8,-1:2,184:10,-1:3,76,184,76:3");
@SuppressWarnings("fallthrough") // at case 18 and -1
public com.sun.java_cup.internal.runtime.Symbol next_token ()
throws java.io.IOException,
Exception

View file

@ -1591,13 +1591,13 @@ class parser_actions {
RESULT = new CurrentCall(fname);
}
else if (fname == parser.getQNameIgnoreDefaultNs("number")) {
RESULT = new NumberCall(fname, parser.EmptyArgs);
RESULT = new NumberCall(fname, XPathParser.EmptyArgs);
}
else if (fname == parser.getQNameIgnoreDefaultNs("string")) {
RESULT = new StringCall(fname, parser.EmptyArgs);
RESULT = new StringCall(fname, XPathParser.EmptyArgs);
}
else if (fname == parser.getQNameIgnoreDefaultNs("concat")) {
RESULT = new ConcatCall(fname, parser.EmptyArgs);
RESULT = new ConcatCall(fname, XPathParser.EmptyArgs);
}
else if (fname == parser.getQNameIgnoreDefaultNs("true")) {
RESULT = new BooleanExpr(true);
@ -1609,10 +1609,10 @@ class parser_actions {
RESULT = new NameCall(fname);
}
else if (fname == parser.getQNameIgnoreDefaultNs("generate-id")) {
RESULT = new GenerateIdCall(fname, parser.EmptyArgs);
RESULT = new GenerateIdCall(fname, XPathParser.EmptyArgs);
}
else if (fname == parser.getQNameIgnoreDefaultNs("string-length")) {
RESULT = new StringLengthCall(fname, parser.EmptyArgs);
RESULT = new StringLengthCall(fname, XPathParser.EmptyArgs);
}
else if (fname == parser.getQNameIgnoreDefaultNs("position")) {
RESULT = new PositionCall(fname);
@ -1627,7 +1627,7 @@ class parser_actions {
RESULT = new NamespaceUriCall(fname);
}
else {
RESULT = new FunctionCall(fname, parser.EmptyArgs);
RESULT = new FunctionCall(fname, XPathParser.EmptyArgs);
}
parser_result = new Symbol(16/*FunctionCall*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -1278,11 +1279,13 @@ public final class SAXImpl extends SAX2DTM2
// For "attribute::p:*", the principal node kind is
// attribute
m_baseIterator = getAxisIterator(axis);
break;
}
case Axis.NAMESPACE: {
// This covers "namespace::p:*". It is syntactically
// correct, though it doesn't make much sense.
m_baseIterator = getAxisIterator(axis);
break;
}
default: {
// In all other cases, the principal node kind is

View file

@ -1,6 +1,6 @@
/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -145,6 +145,7 @@ public class TransletOutputHandlerFactory {
_indentNumber = value;
}
@SuppressWarnings("fallthrough") // intentional at case STAX, SAX
public SerializationHandler getSerializationHandler()
throws IOException, ParserConfigurationException
{

View file

@ -1,6 +1,6 @@
/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -161,8 +161,8 @@ public class DeferredDocumentTypeImpl
if (((DocumentImpl)getOwnerDocument()).allowGrammarAccess){
insertBefore(node, last);
last = node;
break;
}
break;
}
// NOTE: Should never get here! -Ac

View file

@ -1,6 +1,6 @@
/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -439,7 +439,7 @@ class XSDElementTraverser extends XSDAbstractTraverser {
fSchemaHandler.checkForDuplicateNames(
(schemaDoc.fTargetNamespace == null) ? ","+DOMUtil.getAttrValue(child, SchemaSymbols.ATT_NAME)
: schemaDoc.fTargetNamespace+","+ DOMUtil.getAttrValue(child, SchemaSymbols.ATT_NAME),
fSchemaHandler.ATTRIBUTE_TYPE, fSchemaHandler.getIDRegistry(), fSchemaHandler.getIDRegistry_sub(),
XSDHandler.ATTRIBUTE_TYPE, fSchemaHandler.getIDRegistry(), fSchemaHandler.getIDRegistry_sub(),
child, schemaDoc);
}
} else if (childName.equals(SchemaSymbols.ELT_KEYREF)) {

View file

@ -3025,6 +3025,7 @@ public class XSDHandler {
return newComponents;
}
@SuppressWarnings("fallthrough")
private void expandRelatedComponents(XSObject component,List<XSObject>componentList, Map<String, List<String>> dependencies) {
short componentType = component.getType();
switch (componentType) {

View file

@ -600,6 +600,7 @@ public class AbstractDOMParser extends AbstractXMLDocumentParser {
*
* @throws XNIException Thrown by application to signal an error.
*/
@SuppressWarnings("fallthrough") // by design at case LSParserFilter.FILTER_SKIP
public void comment (XMLString text, Augmentations augs) throws XNIException {
if (fInDTD) {
if (fInternalSubset != null && !fInDTDExternalSubset) {
@ -673,6 +674,7 @@ public class AbstractDOMParser extends AbstractXMLDocumentParser {
*
* @throws XNIException Thrown by handler to signal an error.
*/
@SuppressWarnings("fallthrough") // by design at case LSParserFilter.FILTER_REJECT
public void processingInstruction (String target, XMLString data, Augmentations augs)
throws XNIException {
@ -1416,6 +1418,7 @@ public class AbstractDOMParser extends AbstractXMLDocumentParser {
*
* @throws XNIException Thrown by handler to signal an error.
*/
@SuppressWarnings("fallthrough") // by design at case LSParserFilter.FILTER_REJECT
public void endCDATA (Augmentations augs) throws XNIException {
fInCDATASection = false;
@ -2596,6 +2599,7 @@ public class AbstractDOMParser extends AbstractXMLDocumentParser {
* or removed fFistChunk must be set to true, otherwise some data can be lost.
*
*/
@SuppressWarnings("fallthrough") // by design at case LSParserFilter.FILTER_REJECT
protected void setCharacterData (boolean sawChars){
// handle character data

View file

@ -1,6 +1,6 @@
/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -1697,6 +1697,7 @@ implements DTM, org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler
* @return String Value of this node, or null if not
* meaningful for this node type.
*/
@SuppressWarnings("fallthrough")
public String getNodeValue(int nodeHandle)
{
nodes.readSlot(nodeHandle, gotslot);

View file

@ -1651,6 +1651,7 @@ public class DOM2DTM extends DTMDefaultBaseIterators
* @param node Node whose subtree is to be walked, gathering the
* contents of all Text or CDATASection nodes.
*/
@SuppressWarnings("fallthrough")
protected static void dispatchNodeData(Node node,
org.xml.sax.ContentHandler ch,
int depth)

View file

@ -1020,6 +1020,7 @@ public abstract class BaseMarkupSerializer
* @throws IOException An I/O exception occured while
* serializing
*/
@SuppressWarnings("fallthrough") // by design at case Node.DOCUMENT_FRAGMENT_NODE
protected void serializeNode( Node node )
throws IOException
{

View file

@ -62,6 +62,7 @@ public class FilterExprWalker extends AxesWalker
*
* @throws javax.xml.transform.TransformerException
*/
@SuppressWarnings("fallthrough")
public void init(Compiler compiler, int opPos, int stepType)
throws javax.xml.transform.TransformerException
{

View file

@ -1,6 +1,6 @@
/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -299,7 +299,7 @@ public class MatchPatternIterator extends LocPathIterator
System.out.println(", "+m_cdtm.getNodeName(n));
// if(m_cdtm.getNodeName(n).equals("near-east"))
System.out.println("pattern: "+m_pattern.toString());
m_pattern.debugWhatToShow(m_pattern.getWhatToShow());
NodeTest.debugWhatToShow(m_pattern.getWhatToShow());
}
XObject score = m_pattern.execute(xctxt);

View file

@ -1,6 +1,6 @@
/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -554,6 +554,7 @@ public class WalkerFactory
*
* @throws javax.xml.transform.TransformerException
*/
@SuppressWarnings("fallthrough") // by design at case OpCodes.FROM_DESCENDANTS
private static boolean isOptimizableForDescendantIterator(
Compiler compiler, int stepOpCodePos, int stepIndex)
throws javax.xml.transform.TransformerException
@ -1102,7 +1103,7 @@ public class WalkerFactory
System.out.print(", predAxis: " + Axis.getNames(ai.getAxis()));
System.out.print(", what: ");
System.out.print(" ");
ai.debugWhatToShow(ai.getWhatToShow());
NodeTest.debugWhatToShow(ai.getWhatToShow());
}
int argLen = compiler.getFirstPredicateOpPos(opPos);
@ -1621,6 +1622,7 @@ public class WalkerFactory
*
* @throws javax.xml.transform.TransformerException
*/
@SuppressWarnings("fallthrough") // by design at case OpCodes.FROM_ROOT
private static boolean isNaturalDocOrder(
Compiler compiler, int stepOpCodePos, int stepIndex, int analysis)
throws javax.xml.transform.TransformerException

View file

@ -106,6 +106,7 @@ class Lexer
*
* @throws javax.xml.transform.TransformerException
*/
@SuppressWarnings("fallthrough") // on purpose at case '-', '(' and default
void tokenize(String pat, List<String> targetStrings)
throws javax.xml.transform.TransformerException
{

View file

@ -1,6 +1,6 @@
/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -65,7 +65,7 @@ public class ContextMatchStepPattern extends StepPattern
if (xctxt.getIteratorRoot() == xctxt.getCurrentNode())
return getStaticScore();
else
return this.SCORE_NONE;
return NodeTest.SCORE_NONE;
}
/**

View file

@ -116,7 +116,7 @@ public class StepPattern extends NodeTest implements SubContextList, ExpressionO
m_targetString = PsuedoNames.PSEUDONAME_ROOT;
break;
case DTMFilter.SHOW_ELEMENT :
if (this.WILD == m_name)
if (WILD.equals(m_name))
m_targetString = PsuedoNames.PSEUDONAME_ANY;
else
m_targetString = m_name;

View file

@ -586,7 +586,7 @@ public class ParserAdapter implements XMLReader, DocumentHandler
// note funky case: localname can be null
// when declaring the default prefix, and
// yet the uri isn't null.
atts.addAttribute (nsSupport.XMLNS, prefix,
atts.addAttribute (NamespaceSupport.XMLNS, prefix,
attQName.intern(), type, value);
else
atts.addAttribute ("", "",

View file

@ -292,8 +292,8 @@ public class Types {
@Override
public Type visitTypeVar(TypeVar t, ProjectionKind pkind) {
if (vars.contains(t)) {
try {
if (seen.add(t)) {
try {
final Type bound;
switch (pkind) {
case UPWARDS:
@ -309,13 +309,14 @@ public class Types {
return null;
}
return bound.map(this, pkind);
} else {
//cycle
return syms.objectType;
}
} finally {
seen.remove(t);
}
} else {
//cycle
return pkind == ProjectionKind.UPWARDS ?
syms.objectType : syms.botType;
}
} else {
return t;
}

Some files were not shown because too many files have changed in this diff Show more