Compare commits

..

1 Commits

Author SHA1 Message Date
Vladimir Kempik
cda19bea96 conf args poc 2022-05-17 17:32:09 +04:00
74 changed files with 2278 additions and 1809 deletions

View File

@@ -11,7 +11,8 @@ can be found on the [releases page](https://github.com/JetBrains/JetBrainsRuntim
| IDE Version | Latest JBR | Date Released |
| --- | --- | --- |
| 2022.2 | [17.0.3-b469.3](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr17.0.3b469.3) | 9-Jun-2022 |
| 2022.1 | [17_0_2-b315.1](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr17_0_2b315.1) | 09-Feb-2022 |
| 2021.3 | [17_0_1-b164.8](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr17_0_1b164.8) | 15-Nov-2021 |
## Contents
- [Welcome to JetBrains Runtime](#jetbrains-runtime)

View File

@@ -1,55 +1,7 @@
# NOTE: This Dockerfile is meant to be used from the mkdocker_x86.sh script.
FROM i386/ubuntu:xenial
# Pull a concrete version of Linux that does NOT receive updates after it's
# been created. This is so that the image is as stable as possible to make
# image creation reproducible.
# NB: this also means there may be no security-related fixes there, need to
# move the version to the next manually.
#FROM i386/ubuntu:xenial
#FROM i386/ubuntu:bionic
FROM i386/ubuntu:focal
RUN linux32 \
apt-get update && apt-get install -y --no-install-recommends apt-utils
RUN export DEBIAN_FRONTEND=noninteractive \
export DEBCONF_NONINTERACTIVE_SEEN=true && \
echo 'tzdata tzdata/Areas select Etc' | debconf-set-selections; \
echo 'tzdata tzdata/Zones/Etc select UTC' | debconf-set-selections; \
linux32 \
apt-get -y install \
autoconf \
build-essential \
curl \
file \
git \
libx11-dev \
libxext-dev \
libxrender-dev \
libxrandr-dev \
libxtst-dev \
libxt-dev \
libcups2-dev \
libasound2-data \
# libpng12-0 \
libasound2 \
libfreetype6 \
libfontconfig1-dev \
libasound2-dev \
rsync \
unzip \
zip
RUN linux32 \
apt-get -y install \
g++-10 \
gcc-10 && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 && \
apt-get clean -qy && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Set up boot JDK for building
COPY boot_jdk_x86.tar.gz /jdk17/
RUN cd /jdk17 && tar --strip-components=1 -xzf boot_jdk_x86.tar.gz && rm /jdk17/boot_jdk_x86.tar.gz
ENV BOOT_JDK=/jdk17
RUN git config --global user.email "teamcity@jetbrains.com" && \
git config --global user.name "builduser"
RUN linux32 apt-get update && apt-get install -y --no-install-recommends apt-utils
COPY jbrsdk-11.0.5-b1 /jbrsdk-11.0.5-b1
RUN linux32 apt-get -y install file build-essential zip unzip curl libx11-dev libxext-dev \
libxrender-dev libxrandr-dev libxtst-dev libxt-dev libcups2-dev libasound2-data \
libpng12-0 libasound2 libfreetype6 libfontconfig1-dev libasound2-dev autoconf

View File

@@ -1,7 +1,4 @@
#!/bin/bash
set -euo pipefail
set -x
#!/bin/bash -x
# This script creates a Docker image suitable for building AArch64 variant
# of the JetBrains Runtime version 17.

View File

@@ -1,7 +1,4 @@
#!/bin/bash
set -euo pipefail
set -x
#!/bin/bash -x
# This script creates a Docker image suitable for building musl AArch64 variant
# of the JetBrains Runtime version 17.

View File

@@ -1,7 +1,4 @@
#!/bin/bash
set -euo pipefail
set -x
#!/bin/bash -x
# This script creates a Docker image suitable for building musl-x64 variant
# of the JetBrains Runtime version 17.

View File

@@ -1,26 +0,0 @@
#!/bin/bash -x
# This script creates a Docker image suitable for building x86 variant
# of the JetBrains Runtime version 17.
BOOT_JDK_REMOTE_FILE=zulu17.34.19-ca-jdk17.0.3-linux_i686.tar.gz
BOOT_JDK_SHA=1c35c374ba0001e675d6e80819d5be900c4e141636d5e484992a8c550be14481
BOOT_JDK_LOCAL_FILE=boot_jdk_x86.tar.gz
if [ ! -f $BOOT_JDK_LOCAL_FILE ]; then
# Obtain "boot JDK" from outside of the container.
wget -nc https://cdn.azul.com/zulu/bin/${BOOT_JDK_REMOTE_FILE} -O $BOOT_JDK_LOCAL_FILE
else
echo "boot JDK \"$BOOT_JDK_LOCAL_FILE\" present, skipping download"
fi
# Verify that what we've downloaded can be trusted.
sha256sum -c - <<EOF
$BOOT_JDK_SHA *$BOOT_JDK_LOCAL_FILE
EOF
docker build -t jetbrains/runtime:jbr17env_x86 -f Dockerfile.x86 .
# NB: the resulting container can (and should) be used without the network
# connection (--network none) during build in order to reduce the chance
# of build contamination.

View File

@@ -1,6 +1,4 @@
#!/bin/bash
set -euo pipefail
#!/bin/sh
# $1 - Boot JDK
# $2 - JBR part of API version

View File

@@ -1,15 +1,12 @@
#!/bin/bash
#!/bin/bash -x
set -euo pipefail
set -x
function check_bundle_type_maketest() {
# check whether last char is 't', if so remove it
function do_maketest() {
if [ "${bundle_type: -1}" == "t" ]; then
bundle_type="${bundle_type%?}"
do_maketest=1
echo ${bundle_type%?}
return 1
else
do_maketest=0
echo ${bundle_type}
return 0
fi
}
@@ -19,23 +16,20 @@ function getVersionProp() {
while getopts ":i?" o; do
case "${o}" in
i) INC_BUILD=1 ;;
i)
i="incremental build"
INC_BUILD=1
;;
esac
done
shift $((OPTIND-1))
if [[ $# -lt 2 ]]; then
echo "Required at least two arguments: build_number bundle_type"
exit 1
fi
build_number=$1
bundle_type=$2
# shellcheck disable=SC2034
architecture=${3:-x64} # aarch64 or x64
check_bundle_type_maketest
architecture=$3 # aarch64 or x64
bundle_type=$(do_maketest)
do_maketest=$?
tag_prefix="jbr-"
OPENJDK_TAG=$(git log --simplify-by-decoration --decorate=short --pretty=short | grep "$tag_prefix" | cut -d "(" -f2 | cut -d ")" -f1 | awk '{print $2}' | sort -t "-" -k 2 -g | tail -n 1 | tr -d ",")
VERSION_FEATURE=$(getVersionProp "DEFAULT_VERSION_FEATURE")

View File

@@ -1,7 +1,4 @@
#!/bin/bash
set -euo pipefail
set -x
#!/bin/bash -x
# The following parameters must be specified:
# build_number - specifies the number of JetBrainsRuntime build
@@ -35,7 +32,6 @@ function do_configure {
--with-version-opt=b"$build_number" \
--with-boot-jdk="$BOOT_JDK" \
--enable-cds=yes \
$STATIC_CONF_ARGS \
$REPRODUCIBLE_BUILD_OPTS \
$WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS \
|| do_exit $?
@@ -57,44 +53,41 @@ function create_image_bundle {
__modules=$4
libc_type_suffix=''
fastdebug_infix=''
if is_musl; then libc_type_suffix='musl-' ; fi
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
JBR=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}aarch64-${fastdebug_infix}b${build_number}
__root_dir=${__bundle_name}-${JBSDK_VERSION}-${libc_type_suffix}aarch64-${fastdebug_infix:-}b${build_number%%.*}
echo Running jlink....
[ -d "$IMAGES_DIR"/"$__root_dir" ] && rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
[ -d "$IMAGES_DIR"/"$__arch_name" ] && rm -rf "${IMAGES_DIR:?}"/"$__arch_name"
$JSDK/bin/jlink \
--module-path "$__modules_path" --no-man-pages --compress=2 \
--add-modules "$__modules" --output "$IMAGES_DIR"/"$__root_dir"
--add-modules "$__modules" --output "$IMAGES_DIR"/"$__arch_name"
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> "$IMAGES_DIR"/"$__root_dir"/release
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> "$IMAGES_DIR"/"$__arch_name"/release
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
sed 's/JBR/JBRSDK/g' "$IMAGES_DIR"/"$__root_dir"/release > release
mv release "$IMAGES_DIR"/"$__root_dir"/release
cp $IMAGES_DIR/jdk/lib/src.zip "$IMAGES_DIR"/"$__root_dir"/lib
copy_jmods "$__modules" "$__modules_path" "$IMAGES_DIR"/"$__root_dir"/jmods
sed 's/JBR/JBRSDK/g' "$IMAGES_DIR"/"$__arch_name"/release > release
mv release "$IMAGES_DIR"/"$__arch_name"/release
cp $IMAGES_DIR/jdk/lib/src.zip "$IMAGES_DIR"/"$__arch_name"/lib
copy_jmods "$__modules" "$__modules_path" "$IMAGES_DIR"/"$__arch_name"/jmods
zip_native_debug_symbols $IMAGES_DIR/jdk "${JBR}_diz"
fi
# jmod does not preserve file permissions (JDK-8173610)
[ -f "$IMAGES_DIR"/"$__root_dir"/lib/jcef_helper ] && chmod a+x "$IMAGES_DIR"/"$__root_dir"/lib/jcef_helper
[ -f "$IMAGES_DIR"/"$__arch_name"/lib/jcef_helper ] && chmod a+x "$IMAGES_DIR"/"$__arch_name"/lib/jcef_helper
echo Creating "$JBR".tar.gz ...
(cd "$IMAGES_DIR" &&
find "$__root_dir" -print0 | LC_ALL=C sort -z | \
find "$__arch_name" -print0 | LC_ALL=C sort -z | \
tar $REPRODUCIBLE_TAR_OPTS \
--no-recursion --null -T - -cf "$JBR".tar) || do_exit $?
mv "$IMAGES_DIR"/"$JBR".tar ./"$JBR".tar
[ -f "$JBR".tar.gz ] && rm "$JBR.tar.gz"
touch -c -d "@$SOURCE_DATE_EPOCH" "$JBR".tar
gzip "$JBR".tar || do_exit $?
rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
rm -rf "${IMAGES_DIR:?}"/"$__arch_name"
}
WITH_DEBUG_LEVEL="--with-debug-level=release"
@@ -115,7 +108,7 @@ case "$bundle_type" in
;;
esac
if [ -z "${INC_BUILD:-}" ]; then
if [ -z "$INC_BUILD" ]; then
do_configure || do_exit $?
make clean CONF=$RELEASE_NAME || do_exit $?
fi
@@ -135,8 +128,6 @@ if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
jbr_name_postfix="_${bundle_type}"
else
jbr_name_postfix=""
fi
# create runtime image bundle

View File

@@ -1,7 +1,4 @@
#!/bin/bash
set -euo pipefail
set -x
#!/bin/bash -x
# The following parameters must be specified:
# build_number - specifies the number of JetBrainsRuntime build
@@ -35,7 +32,6 @@ function do_configure {
--with-version-opt=b"$build_number" \
--with-boot-jdk="$BOOT_JDK" \
--enable-cds=yes \
$STATIC_CONF_ARGS \
$REPRODUCIBLE_BUILD_OPTS \
$WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS \
|| do_exit $?
@@ -57,43 +53,41 @@ function create_image_bundle {
__modules=$4
libc_type_suffix=''
fastdebug_infix=''
if is_musl; then libc_type_suffix='musl-' ; fi
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
JBR=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}x64-${fastdebug_infix}b${build_number}
__root_dir=${__bundle_name}-${JBSDK_VERSION}-${libc_type_suffix}x64-${fastdebug_infix:-}b${build_number%%.*}
echo Running jlink....
[ -d "$IMAGES_DIR"/"$__root_dir" ] && rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
[ -d "$IMAGES_DIR"/"$__arch_name" ] && rm -rf "${IMAGES_DIR:?}"/"$__arch_name"
$JSDK/bin/jlink \
--module-path "$__modules_path" --no-man-pages --compress=2 \
--add-modules "$__modules" --output "$IMAGES_DIR"/"$__root_dir"
--add-modules "$__modules" --output "$IMAGES_DIR"/"$__arch_name"
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> "$IMAGES_DIR"/"$__root_dir"/release
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> "$IMAGES_DIR"/"$__arch_name"/release
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
sed 's/JBR/JBRSDK/g' "$IMAGES_DIR"/"$__root_dir"/release > release
mv release "$IMAGES_DIR"/"$__root_dir"/release
cp $IMAGES_DIR/jdk/lib/src.zip "$IMAGES_DIR"/"$__root_dir"/lib
copy_jmods "$__modules" "$__modules_path" "$IMAGES_DIR"/"$__root_dir"/jmods
sed 's/JBR/JBRSDK/g' "$IMAGES_DIR"/"$__arch_name"/release > release
mv release "$IMAGES_DIR"/"$__arch_name"/release
cp $IMAGES_DIR/jdk/lib/src.zip "$IMAGES_DIR"/"$__arch_name"/lib
copy_jmods "$__modules" "$__modules_path" "$IMAGES_DIR"/"$__arch_name"/jmods
zip_native_debug_symbols $IMAGES_DIR/jdk "${JBR}_diz"
fi
# jmod does not preserve file permissions (JDK-8173610)
[ -f "$IMAGES_DIR"/"$__root_dir"/lib/jcef_helper ] && chmod a+x "$IMAGES_DIR"/"$__root_dir"/lib/jcef_helper
[ -f "$IMAGES_DIR"/"$__arch_name"/lib/jcef_helper ] && chmod a+x "$IMAGES_DIR"/"$__arch_name"/lib/jcef_helper
echo Creating "$JBR".tar.gz ...
(cd "$IMAGES_DIR" &&
find "$__root_dir" -print0 | LC_ALL=C sort -z | \
find "$__arch_name" -print0 | LC_ALL=C sort -z | \
tar $REPRODUCIBLE_TAR_OPTS \
--no-recursion --null -T - -cf "$JBR".tar) || do_exit $?
mv "$IMAGES_DIR"/"$JBR".tar ./"$JBR".tar
[ -f "$JBR".tar.gz ] && rm "$JBR.tar.gz"
touch -c -d "@$SOURCE_DATE_EPOCH" "$JBR".tar
gzip "$JBR".tar || do_exit $?
rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
rm -rf "${IMAGES_DIR:?}"/"$__arch_name"
}
WITH_DEBUG_LEVEL="--with-debug-level=release"
@@ -114,7 +108,7 @@ case "$bundle_type" in
;;
esac
if [ -z "${INC_BUILD:-}" ]; then
if [ -z "$INC_BUILD" ]; then
do_configure || do_exit $?
make clean CONF=$RELEASE_NAME || do_exit $?
fi
@@ -134,8 +128,6 @@ if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
jbr_name_postfix="_${bundle_type}"
else
jbr_name_postfix=""
fi
# create runtime image bundle

View File

@@ -1,143 +1,80 @@
#!/bin/bash
set -euo pipefail
set -x
#!/bin/bash -x
# The following parameters must be specified:
# build_number - specifies the number of JetBrainsRuntime build
# bundle_type - specifies bundle to be built;possible values:
# <empty> or nomod - the release bundles without any additional modules (jcef)
# jcef - the release bundles with jcef
# fd - the fastdebug bundles which also include the jcef module
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
#
# $ ./java --version
# openjdk 11.0.6 2020-01-14
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
#
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
source jb/project/tools/common/scripts/common.sh
function do_configure {
linux32 bash configure \
$WITH_DEBUG_LEVEL \
--with-vendor-name="$VENDOR_NAME" \
--with-vendor-version-string="$VENDOR_VERSION_STRING" \
--with-jvm-features=shenandoahgc \
--with-version-pre= \
--with-version-build="$JDK_BUILD_NUMBER" \
--with-version-opt=b"$build_number" \
--with-boot-jdk="$BOOT_JDK" \
$STATIC_CONF_ARGS \
--enable-cds=yes \
$REPRODUCIBLE_BUILD_OPTS \
$WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS \
|| do_exit $?
}
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
function is_musl {
libc=$(ldd /bin/ls | grep 'musl' | head -1 | cut -d ' ' -f1)
if [ -z $libc ]; then
# This is not Musl, return 1 == false
return 1
fi
return 0
}
[ -z "$bundle_type" ] && (git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch || exit $?)
function create_image_bundle {
__bundle_name=$1
__arch_name=$2
__modules_path=$3
__modules=$4
linux32 bash configure \
--with-debug-level=release \
--with-vendor-name="${VENDOR_NAME}" \
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
--with-version-pre= \
--with-version-build=$JDK_BUILD_NUMBER \
--with-version-opt=b${build_number} \
--with-boot-jdk=${BOOT_JDK} \
--enable-cds=yes || exit $?
make clean CONF=linux-x86-server-release || exit $?
make images CONF=linux-x86-server-release test-image || exit $?
libc_type_suffix=''
fastdebug_infix=''
if is_musl; then libc_type_suffix='musl-' ; fi
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
JBR=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}x86-${fastdebug_infix}b${build_number}
__root_dir=${__bundle_name}-${JBSDK_VERSION}-${libc_type_suffix}x86-${fastdebug_infix:-}b${build_number%%.*}
echo Running jlink....
[ -d "$IMAGES_DIR"/"$__root_dir" ] && rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
$JSDK/bin/jlink \
--module-path "$__modules_path" --no-man-pages --compress=2 \
--add-modules "$__modules" --output "$IMAGES_DIR"/"$__root_dir"
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> "$IMAGES_DIR"/"$__root_dir"/release
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
sed 's/JBR/JBRSDK/g' "$IMAGES_DIR"/"$__root_dir"/release > release
mv release "$IMAGES_DIR"/"$__root_dir"/release
cp $IMAGES_DIR/jdk/lib/src.zip "$IMAGES_DIR"/"$__root_dir"/lib
copy_jmods "$__modules" "$__modules_path" "$IMAGES_DIR"/"$__root_dir"/jmods
zip_native_debug_symbols $IMAGES_DIR/jdk "${JBR}_diz"
fi
# jmod does not preserve file permissions (JDK-8173610)
[ -f "$IMAGES_DIR"/"$__root_dir"/lib/jcef_helper ] && chmod a+x "$IMAGES_DIR"/"$__root_dir"/lib/jcef_helper
echo Creating "$JBR".tar.gz ...
(cd "$IMAGES_DIR" &&
find "$__root_dir" -print0 | LC_ALL=C sort -z | \
tar $REPRODUCIBLE_TAR_OPTS \
--no-recursion --null -T - -cf "$JBR".tar) || do_exit $?
mv "$IMAGES_DIR"/"$JBR".tar ./"$JBR".tar
[ -f "$JBR".tar.gz ] && rm "$JBR.tar.gz"
touch -c -d "@$SOURCE_DATE_EPOCH" "$JBR".tar
gzip "$JBR".tar || do_exit $?
rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
}
WITH_DEBUG_LEVEL="--with-debug-level=release"
RELEASE_NAME=linux-x86-server-release
case "$bundle_type" in
"jcef")
echo "not implemented" && do_exit 1
;;
"nomod" | "")
bundle_type=""
;;
"fd")
do_reset_changes=1
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
RELEASE_NAME=linux-x86-server-fastdebug
;;
esac
if [ -z "${INC_BUILD:-}" ]; then
do_configure || do_exit $?
make clean CONF=$RELEASE_NAME || do_exit $?
fi
make images CONF=$RELEASE_NAME || do_exit $?
IMAGES_DIR=build/$RELEASE_NAME/images
JSDK=$IMAGES_DIR/jdk
JSDK_MODS_DIR=$IMAGES_DIR/jmods
JBSDK=${JBRSDK_BASE_NAME}-linux-x86-b${build_number}
BASE_DIR=build/linux-x86-server-release/images
JSDK=${BASE_DIR}/jdk
JBRSDK_BUNDLE=jbrsdk
echo Fixing permissions
chmod -R a+r $JSDK
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
jbr_name_postfix="_${bundle_type}"
else
jbr_name_postfix=""
fi
rm -rf $BASE_DIR/$JBRSDK_BUNDLE
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || exit $?
# create runtime image bundle
modules=$(grep -v "jdk.internal.vm" jb/project/tools/common/modules.list | xargs | sed s/" "//g) || do_exit $?
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
echo Creating $JBSDK.tar.gz ...
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/release > release
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/release
# create sdk image bundle
modules=$(cat $JSDK/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" $JBRSDK_BUNDLE $JSDK_MODS_DIR "$modules" || do_exit $?
tar -pcf $JBSDK.tar --exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man -C $BASE_DIR ${JBRSDK_BUNDLE} || exit $?
gzip $JBSDK.tar || exit $?
if [ $do_maketest -eq 1 ]; then
JBRSDK_TEST=${JBRSDK_BUNDLE}-${JBSDK_VERSION}-linux-${libc_type_suffix}test-x86-b${build_number}
echo Creating "$JBRSDK_TEST" ...
[ $do_reset_changes -eq 1 ] && git checkout HEAD jb/project/tools/common/modules.list src/java.desktop/share/classes/module-info.java
make test-image CONF=$RELEASE_NAME || do_exit $?
tar -pcf "$JBRSDK_TEST".tar -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
[ -f "$JBRSDK_TEST.tar.gz" ] && rm "$JBRSDK_TEST.tar.gz"
gzip "$JBRSDK_TEST".tar || do_exit $?
fi
JBR_BUNDLE=jbr
JBR_BASE_NAME=jbr-$JBSDK_VERSION
rm -rf $BASE_DIR/$JBR_BUNDLE
do_exit 0
JBR=$JBR_BASE_NAME-linux-x86-b$build_number
grep -v javafx jb/project/tools/common/modules.list | grep -v "jdk.internal.vm\|jdk.aot\|jcef" > modules.list.x86
echo Running jlink....
${JSDK}/bin/jlink \
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
--add-modules $(xargs < modules.list.x86 | sed s/" "//g | sed s/,$//g) --output ${BASE_DIR}/${JBR_BUNDLE} || exit $?
echo Modifying release info ...
grep -v \"^JAVA_VERSION\" ${JSDK}/release | grep -v \"^MODULES\" >> ${BASE_DIR}/${JBR_BUNDLE}/release
echo Creating $JBR.tar.gz ...
tar -pcf $JBR.tar -C $BASE_DIR $JBR_BUNDLE || exit $?
gzip $JBR.tar || exit $?
JBRSDK_TEST=$JBRSDK_BASE_NAME-linux-test-x86-b$build_number
echo Creating $JBRSDK_TEST.tar.gz ...
tar -pcf $JBRSDK_TEST.tar -C $BASE_DIR --exclude='test/jdk/demos' --exclude='test/hotspot/gtest' test || exit $?
gzip $JBRSDK_TEST.tar || exit $?

View File

@@ -1,7 +1,4 @@
#!/bin/bash
set -euo pipefail
set -x
#!/bin/bash -x
# The following parameters must be specified:
# build_number - specifies the number of JetBrainsRuntime build
@@ -25,6 +22,7 @@ set -x
source jb/project/tools/common/scripts/common.sh
JCEF_PATH=${JCEF_PATH:=./jcef_mac}
architecture=${architecture:=x64}
BOOT_JDK=${BOOT_JDK:=$(/usr/libexec/java_home -v 16)}
function do_configure {
@@ -77,16 +75,13 @@ function create_image_bundle {
__modules_path=$3
__modules=$4
fastdebug_infix=''
tmp=.bundle.$$.tmp
mkdir "$tmp" || do_exit $?
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
JBR=${__bundle_name}-${JBSDK_VERSION}-osx-${architecture}-${fastdebug_infix:-}b${build_number}
__root_dir=${__bundle_name}-${JBSDK_VERSION}-${architecture}-${fastdebug_infix:-}b${build_number%%.*}
JBR=${__bundle_name}-${JBSDK_VERSION}-osx-${architecture}-${fastdebug_infix}b${build_number}
JRE_CONTENTS=$tmp/$__root_dir/Contents
JRE_CONTENTS=$tmp/$__arch_name/Contents
mkdir -p "$JRE_CONTENTS" || do_exit $?
echo Running jlink...
@@ -110,10 +105,10 @@ function create_image_bundle {
echo Creating "$JBR".tar.gz ...
# Normalize timestamp
find "$tmp"/"$__root_dir" -print0 | xargs -0 touch -c -h -t "$TOUCH_TIME"
find "$tmp"/"$__arch_name" -print0 | xargs -0 touch -c -h -t "$TOUCH_TIME"
(cd "$tmp" &&
find "$__root_dir" -print0 | LC_ALL=C sort -z | \
find "$__arch_name" -print0 | LC_ALL=C sort -z | \
COPYFILE_DISABLE=1 tar $REPRODUCIBLE_TAR_OPTS --no-recursion --null -T - \
-czf "$JBR".tar.gz --exclude='*.dSYM' --exclude='man') || do_exit $?
mv "$tmp"/"$JBR".tar.gz "$JBR".tar.gz
@@ -143,7 +138,7 @@ case "$bundle_type" in
;;
esac
if [ -z "${INC_BUILD:-}" ]; then
if [ -z "$INC_BUILD" ]; then
do_configure || do_exit $?
make clean CONF=$RELEASE_NAME || do_exit $?
fi
@@ -161,8 +156,6 @@ if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
jbr_name_postfix="_${bundle_type}"
else
jbr_name_postfix=""
fi
# create runtime image bundle

View File

@@ -1,7 +1,4 @@
#!/bin/bash
set -euo pipefail
set -x
#!/bin/bash -x
APP_DIRECTORY=$1
APPL_USER=$2

View File

@@ -1,7 +1,4 @@
#!/bin/bash
set -euo pipefail
set -x
#!/bin/bash -x
APPLICATION_PATH=$1
APP_NAME=$2
@@ -100,11 +97,8 @@ BUILD_NAME=$(echo $APPLICATION_PATH | awk -F"/" '{ print $2 }')
log "Creating $APP_NAME.pkg..."
rm -rf "$APP_NAME.pkg"
mkdir -p unsigned
pkgbuild --identifier $BUNDLE_ID --root $APPLICATION_PATH \
--install-location /Library/Java/JavaVirtualMachines/${BUILD_NAME} unsigned/${APP_NAME}.pkg
productsign --timestamp --sign "$JB_INSTALLER_CERT" unsigned/${APP_NAME}.pkg ${APP_NAME}.pkg
pkgbuild --identifier $BUNDLE_ID --sign "$JB_INSTALLER_CERT" --root $APPLICATION_PATH \
--install-location /Library/Java/JavaVirtualMachines/${BUILD_NAME} ${APP_NAME}.pkg
#log "Signing whole app..."
#codesign --timestamp \

View File

@@ -1,8 +1,7 @@
#!/bin/bash
#!/bin/bash -x
#immediately exit script with an error if a command fails
set -euo pipefail
set -x
export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
export COPYFILE_DISABLE=true
@@ -45,7 +44,8 @@ fi
log "$INPUT_FILE extracted and removed"
APP_NAME=$(echo ${INPUT_FILE} | awk -F".tar" '{ print $1 }')
APPLICATION_PATH=$EXPLODED/$(ls $EXPLODED)
APPLICATION_PATH=$(sed "s/osx-//" <<< "$EXPLODED/$APP_NAME")
mv $EXPLODED/$BUILD_NAME $APPLICATION_PATH
find "$APPLICATION_PATH/Contents/Home/bin" \
-maxdepth 1 -type f -name '*.jnilib' -print0 |

View File

@@ -1,6 +1,5 @@
#!/bin/bash
set -euo pipefail
while getopts ":t" o; do
case "${o}" in

View File

@@ -1,7 +1,4 @@
#!/bin/bash
set -euo pipefail
set -x
#!/bin/bash -x
usage ()
{
@@ -60,13 +57,7 @@ else
testContent=`paste -d '\t' $refFile <(echo "$curValues") | tail -n +1`
fi
testContent=`echo "$testContent" | tr "," "." | awk -F'\t' '{
if ($3>$2+$2*0.1) {
print "* "$1"\t"$2"\t"$3"\t"(($2>0)?$3/$2:"-")
} else {
print " "$1"\t"$2"\t"$3"\t"(($2>0)?$3/$2:"-")
}
}'`
testContent=`echo "$testContent" | awk -F'\t' '{ if ($3>$2+$2*0.1) {print "* "$1"\t"$2"\t"$3"\t"(($2==0)?"-":$3/$2)} else {print " "$1"\t"$2"\t"$3"\t"(($2==0)?"-":$3/$2)} }'`
if [ -z $noHeaders ]; then
echo "$header" > $resFile
fi
@@ -77,12 +68,11 @@ if [ -z $tc ]; then
exit 0
fi
failed=0
echo "$testContent" 2>&1 | (
while read -r s; do
testname=`echo "$s" | cut -f 1 | tr -d "[:space:]" | tr -d "*"`
duration=`echo "$s" | cut -f 3`
echo "$s" | cut -c1 | grep -c "*" && failed=1
failed=`echo "$s" | cut -c1 | grep -c "*"`
echo \#\#teamcity[testStarted name=\'$testNamePrefix$testname\']
echo "===>$s"
echo \#\#teamcity[buildStatisticValue key=\'$testNamePrefix$testname\' value=\'$duration\']

View File

@@ -1,7 +1,4 @@
#!/bin/bash
set -euo pipefail
set -x
#!/bin/bash -x
# The following parameters must be specified:
# build_number - specifies the number of JetBrainsRuntime build
@@ -38,7 +35,6 @@ function do_configure {
--with-boot-jdk=$BOOT_JDK \
--disable-ccache \
--enable-cds=yes \
$STATIC_CONF_ARGS \
$REPRODUCIBLE_BUILD_OPTS \
|| do_exit $?
}
@@ -49,24 +45,19 @@ function create_image_bundle {
__modules_path=$3
__modules=$4
fastdebug_infix=''
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
__root_dir=${__bundle_name}-${JBSDK_VERSION}-x64-${fastdebug_infix:-}b${build_number%%.*}
echo Running jlink ...
${JSDK}/bin/jlink \
--module-path $__modules_path --no-man-pages --compress=2 \
--add-modules $__modules --output $__root_dir || do_exit $?
--add-modules $__modules --output $__arch_name || do_exit $?
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> $__root_dir/release
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
sed 's/JBR/JBRSDK/g' $__root_dir/release > release
mv release $__root_dir/release
for dir in $(ls -d $IMAGES_DIR/jdk/*); do
rsync -a --exclude demo --exclude sample $dir $__root_dir
done
copy_jmods "$__modules" "$__modules_path" "$__root_dir"/jmods
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> $__arch_name/release
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
sed 's/JBR/JBRSDK/g' $__arch_name/release > release
mv release $__arch_name/release
cp $IMAGES_DIR/jdk/lib/src.zip $__arch_name/lib
copy_jmods "$__modules" "$__modules_path" "$__arch_name"/jmods
fi
}
@@ -88,7 +79,7 @@ case "$bundle_type" in
;;
esac
if [ -z "${INC_BUILD:-}" ]; then
if [ -z "$INC_BUILD" ]; then
do_configure || do_exit $?
if [ $do_maketest -eq 1 ]; then
make LOG=info CONF=$RELEASE_NAME clean images test-image || do_exit $?
@@ -114,11 +105,9 @@ if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
cp $JCEF_PATH/jmods/* ${JSDK_MODS_DIR} # $JSDK/jmods is not unchanged
jbr_name_postfix="_${bundle_type}"
else
jbr_name_postfix=""
fi
# create runtime image bundle
# create runtime image bundlef
modules=$(xargs < jb/project/tools/common/modules.list | sed s/" "//g) || do_exit $?
modules+=",jdk.crypto.mscapi"
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?

View File

@@ -1,14 +1,12 @@
#!/bin/bash
set -euo pipefail
set -x
#!/bin/bash -x
# The following parameters must be specified:
# build_number - specifies the number of JetBrainsRuntime build
# bundle_type - specifies bundle to be built;possible values:
# <empty> or nomod - the release bundles without any additional modules (jcef)
# jcef - the release bundles with jcef
# fd - the fastdebug bundles which also include the jcef module
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
#
# $ ./java --version
# openjdk 11.0.6 2020-01-14
@@ -16,112 +14,50 @@ set -x
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
#
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
source jb/project/tools/common/scripts/common.sh
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
WORK_DIR=$(pwd)
function do_configure {
sh ./configure \
$WITH_DEBUG_LEVEL \
--with-vendor-name="$VENDOR_NAME" \
--with-vendor-version-string="$VENDOR_VERSION_STRING" \
--with-jvm-features=shenandoahgc \
--with-version-pre= \
--with-version-build=$JDK_BUILD_NUMBER \
--with-version-opt=b${build_number} \
--with-toolchain-version=$TOOLCHAIN_VERSION \
--with-boot-jdk=$BOOT_JDK \
--disable-ccache \
--enable-cds=yes \
$STATIC_CONF_ARGS \
$REPRODUCIBLE_BUILD_OPTS \
|| do_exit $?
}
[ -z "$bundle_type" ] && (git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch || exit $?)
function create_image_bundle {
__bundle_name=$1
__arch_name=$2
__modules_path=$3
__modules=$4
PATH="/usr/local/bin:/usr/bin:${PATH}"
./configure \
--with-target-bits=32 \
--with-vendor-name="${VENDOR_NAME}" \
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
--with-version-pre= \
--with-version-build=${JDK_BUILD_NUMBER} \
--with-version-opt=b${build_number} \
--with-toolchain-version=${TOOLCHAIN_VERSION} \
--with-boot-jdk=${BOOT_JDK} \
--disable-ccache \
--enable-cds=yes || exit 1
make clean CONF=windows-x86-server-release || exit 1
make LOG=info images CONF=windows-x86-server-release test-image || exit 1
fastdebug_infix=''
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
__root_dir=${__bundle_name}-${JBSDK_VERSION}-x86-${fastdebug_infix:-}b${build_number%%.*}
echo Running jlink ...
${JSDK}/bin/jlink \
--module-path $__modules_path --no-man-pages --compress=2 \
--add-modules $__modules --output $__root_dir || do_exit $?
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> $__root_dir/release
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
sed 's/JBR/JBRSDK/g' $__root_dir/release > release
mv release $__root_dir/release
for dir in $(ls -d $IMAGES_DIR/jdk/*); do
rsync -a --exclude demo --exclude sample $dir $__root_dir
done
copy_jmods "$__modules" "$__modules_path" "$__root_dir"/jmods
fi
}
WITH_DEBUG_LEVEL="--with-debug-level=release"
RELEASE_NAME=windows-x86_64-server-release
case "$bundle_type" in
"jcef")
echo "not implemented" && do_exit 1
;;
"nomod" | "")
bundle_type=""
;;
"fd")
do_reset_changes=0
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
RELEASE_NAME=windows-x86_64-server-fastdebug
;;
esac
if [ -z "${INC_BUILD:-}" ]; then
do_configure || do_exit $?
if [ $do_maketest -eq 1 ]; then
make LOG=info CONF=$RELEASE_NAME clean images test-image || do_exit $?
else
make LOG=info CONF=$RELEASE_NAME clean images || do_exit $?
fi
else
if [ $do_maketest -eq 1 ]; then
make LOG=info CONF=$RELEASE_NAME images test-image || do_exit $?
else
make LOG=info CONF=$RELEASE_NAME images || do_exit $?
fi
fi
IMAGES_DIR=build/$RELEASE_NAME/images
JSDK=$IMAGES_DIR/jdk
JSDK_MODS_DIR=$IMAGES_DIR/jmods
JBSDK=${JBRSDK_BASE_NAME}-windows-x86-b${build_number}
BASE_DIR=build/windows-x86-server-release/images
JSDK=${BASE_DIR}/jdk
JBRSDK_BUNDLE=jbrsdk
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
update_jsdk_mods "$JSDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
cp $JCEF_PATH/jmods/* ${JSDK_MODS_DIR} # $JSDK/jmods is not unchanged
rm -rf ${BASE_DIR}/${JBRSDK_BUNDLE} && rsync -a --exclude demo --exclude sample ${JSDK}/ ${JBRSDK_BUNDLE} || exit 1
sed 's/JBR/JBRSDK/g' ${JSDK}/release > release
mv release ${JBRSDK_BUNDLE}/release
jbr_name_postfix="_${bundle_type}"
else
jbr_name_postfix=""
fi
JBR_BUNDLE=jbr
rm -rf ${JBR_BUNDLE}
grep -v javafx jb/project/tools/common/modules.list | grep -v "jdk.internal.vm\|jdk.aot\|jcef" > modules.list.x86
echo ",jdk.crypto.mscapi" >> modules.list.x86
${JSDK}/bin/jlink \
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
--add-modules $(xargs < modules.list.x86 | sed s/" "//g) --output ${JBR_BUNDLE} || exit $?
# create runtime image bundle
modules=$(grep -v "jdk.internal.vm" jb/project/tools/common/modules.list | xargs | sed s/" "//g) || do_exit $?
modules+=",jdk.crypto.mscapi"
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
# create sdk image bundle
modules=$(cat ${JSDK}/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\r//g | sed s/\\n//g)
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
fi
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
do_exit 0
echo Modifying release info ...
#grep -v \"^JAVA_VERSION\" ${JSDK}/release | grep -v \"^MODULES\" >> ${JBR_BUNDLE}/release

View File

@@ -1,7 +1,4 @@
#!/bin/bash
set -euo pipefail
set -x
#!/bin/bash -x
# The following parameters must be specified:
# build_number - specifies the number of JetBrainsRuntime build
@@ -22,15 +19,12 @@ function pack_jbr {
__bundle_name=$1
__arch_name=$2
fastdebug_infix=''
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
JBR=${__bundle_name}-${JBSDK_VERSION}-windows-x64-${fastdebug_infix}b${build_number}
__root_dir=${__bundle_name}-${JBSDK_VERSION}-x64-${fastdebug_infix:-}b${build_number%%.*}
echo Creating $JBR.tar.gz ...
chmod -R ug+rwx,o+rx ${BASE_DIR}/$__root_dir
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR $__root_dir || do_exit $?
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR $__arch_name || do_exit $?
}
[ "$bundle_type" == "nomod" ] && bundle_type=""
@@ -42,8 +36,6 @@ BASE_DIR=.
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ]; then
jbr_name_postfix="_${bundle_type}"
else
jbr_name_postfix=""
fi
pack_jbr jbr${jbr_name_postfix} jbr

View File

@@ -1,50 +1,42 @@
#!/bin/bash
set -euo pipefail
set -x
#!/bin/bash -x
# The following parameters must be specified:
# build_number - specifies the number of JetBrainsRuntime build
# bundle_type - specifies bundle to be built;possible values:
# <empty> or nomod - the release bundles without any additional modules (jcef)
# fd - the fastdebug bundles which also include the jcef module
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
#
# $ ./java --version
# openjdk 11.0.6 2020-01-14
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
#
source jb/project/tools/common/scripts/common.sh
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
[ "$bundle_type" == "jcef" ] && echo "not implemented" && do_exit 1
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
JBR_BASE_NAME=jbr-$JBSDK_VERSION
function pack_jbr {
__bundle_name=$1
__arch_name=$2
fastdebug_infix=''
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
JBR=${__bundle_name}-${JBSDK_VERSION}-windows-x86-${fastdebug_infix}b${build_number}
__root_dir=${__bundle_name}-${JBSDK_VERSION}-x86-${fastdebug_infix:-}b${build_number%%.*}
echo Creating $JBR.tar.gz ...
chmod -R ug+rwx,o+rx ${BASE_DIR}/$__root_dir
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR $__root_dir || do_exit $?
}
[ "$bundle_type" == "nomod" ] && bundle_type=""
JBRSDK_BUNDLE=jbrsdk
IMAGES_DIR=build/windows-x86-server-release/images
JSDK=$IMAGES_DIR/jdk
JBSDK=$JBRSDK_BASE_NAME-windows-x86-b$build_number
BASE_DIR=.
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ]; then
jbr_name_postfix="_${bundle_type}"
else
jbr_name_postfix=""
fi
JBRSDK_BUNDLE=jbrsdk
echo Creating $JBSDK.tar.gz ...
/usr/bin/tar -czf $JBSDK.tar.gz $JBRSDK_BUNDLE || exit 1
pack_jbr jbr${jbr_name_postfix} jbr
pack_jbr jbrsdk${jbr_name_postfix} jbrsdk
JBR_BUNDLE=jbr
JBR_BASE_NAME=jbr-${JBSDK_VERSION}
if [ $do_maketest -eq 1 ]; then
JBRSDK_TEST=$JBRSDK_BUNDLE-$JBSDK_VERSION-windows-test-x86-b$build_number
echo Creating $JBRSDK_TEST.tar.gz ...
/usr/bin/tar -czf $JBRSDK_TEST.tar.gz -C $BASE_DIR --exclude='test/jdk/demos' test || do_exit $?
fi
JBR=$JBR_BASE_NAME-windows-x86-b$build_number
echo Creating $JBR.tar.gz ...
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR ${JBR_BUNDLE} || exit 1
JBRSDK_TEST=$JBRSDK_BASE_NAME-windows-test-x86-b$build_number
echo Creating $JBRSDK_TEST.tar.gz ...
/usr/bin/tar -czf $JBRSDK_TEST.tar.gz -C $IMAGES_DIR --exclude='test/jdk/demos' test || exit 1

View File

@@ -129,17 +129,8 @@ static inline uint32_t uimm(uint32_t val, int hi, int lo)
uint64_t replicate(uint64_t bits, int nbits, int count)
{
assert(count > 0, "must be");
assert(nbits > 0, "must be");
assert(count * nbits <= 64, "must be");
// Special case nbits == 64 since the shift below with that nbits value
// would result in undefined behavior.
if (nbits == 64) {
return bits;
}
uint64_t result = 0;
// nbits may be 64 in which case we want mask to be -1
uint64_t mask = ones(nbits);
for (int i = 0; i < count ; i++) {
result <<= nbits;

View File

@@ -1337,6 +1337,7 @@ bool Arguments::add_property(const char* prop, PropertyWriteable writeable, Prop
log_info(cds)("optimized module handling: disabled due to incompatible property: %s=%s", key, value);
}
if (strcmp(key, "jdk.module.showModuleResolution") == 0 ||
strcmp(key, "jdk.module.illegalAccess") == 0 ||
strcmp(key, "jdk.module.validation") == 0 ||
strcmp(key, "java.system.class.loader") == 0) {
MetaspaceShared::disable_full_module_graph();
@@ -2131,7 +2132,8 @@ bool Arguments::parse_uintx(const char* value,
}
bool Arguments::create_module_property(const char* prop_name, const char* prop_value, PropertyInternal internal) {
assert(is_internal_module_property(prop_name), "unknown module property: '%s'", prop_name);
assert(is_internal_module_property(prop_name) ||
strcmp(prop_name, "jdk.module.illegalAccess") == 0, "unknown module property: '%s'", prop_name);
size_t prop_len = strlen(prop_name) + strlen(prop_value) + 2;
char* property = AllocateHeap(prop_len, mtArguments);
int ret = jio_snprintf(property, prop_len, "%s=%s", prop_name, prop_value);
@@ -2503,6 +2505,10 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
char version[256];
JDK_Version::jdk(17).to_string(version, sizeof(version));
warning("Ignoring option %s; support was removed in %s", option->optionString, version);
} else if (match_option(option, "--jbr-illegal-access", &tail)) {
if (!create_module_property("jdk.module.illegalAccess", "permit", ExternalProperty)) {
return JNI_ENOMEM;
}
// -agentlib and -agentpath
} else if (match_option(option, "-agentlib:", &tail) ||
(is_absolute_path = match_option(option, "-agentpath:", &tail))) {

View File

@@ -110,7 +110,7 @@ public class CgroupSubsystemFactory {
Map<String, CgroupInfo> infos = result.getInfos();
if (result.isCgroupV2()) {
// For unified it doesn't matter which controller we pick.
CgroupInfo anyController = infos.values().iterator().next();
CgroupInfo anyController = infos.get(MEMORY_CTRL);
CgroupSubsystem subsystem = CgroupV2Subsystem.getInstance(anyController);
return subsystem != null ? new CgroupMetrics(subsystem) : null;
} else {

View File

@@ -68,4 +68,14 @@ class ExplodedSystemModules implements SystemModules {
public Map<String, Set<String>> moduleReads() {
throw new InternalError();
}
@Override
public Map<String, Set<String>> concealedPackagesToOpen() {
return Map.of();
}
@Override
public Map<String, Set<String>> exportedPackagesToOpen() {
return Map.of();
}
}

View File

@@ -0,0 +1,130 @@
/*
* Copyright (c) 2017, 2019, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package jdk.internal.module;
import sun.nio.cs.UTF_8;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UncheckedIOException;
import java.lang.module.ModuleDescriptor;
import java.lang.module.ModuleFinder;
import java.lang.module.ModuleReference;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
/**
* Generates the maps of concealed and exported packages to open at run-time.
*
* This is used at run-time for exploded builds, and at link-time to generate
* the maps for the system modules in the run-time image.
*/
public class IllegalAccessMaps {
private final Map<String, Set<String>> concealedPackagesToOpen;
private final Map<String, Set<String>> exportedPackagesToOpen;
private IllegalAccessMaps(Map<String, Set<String>> map1,
Map<String, Set<String>> map2) {
this.concealedPackagesToOpen = map1;
this.exportedPackagesToOpen = map2;
}
/**
* Returns the map of concealed packages to open. The map key is the
* module name, the value is the set of concealed packages to open.
*/
public Map<String, Set<String>> concealedPackagesToOpen() {
return concealedPackagesToOpen;
}
/**
* Returns the map of exported packages to open. The map key is the
* module name, the value is the set of exported packages to open.
*/
public Map<String, Set<String>> exportedPackagesToOpen() {
return exportedPackagesToOpen;
}
/**
* Generate the maps of module to concealed and exported packages for
* the system modules that are observable with the given module finder.
*/
public static IllegalAccessMaps generate(ModuleFinder finder) {
Map<String, ModuleDescriptor> map = new HashMap<>();
finder.findAll().stream()
.map(ModuleReference::descriptor)
.forEach(md -> md.packages().forEach(pn -> map.putIfAbsent(pn, md)));
Map<String, Set<String>> concealedPackagesToOpen = new HashMap<>();
Map<String, Set<String>> exportedPackagesToOpen = new HashMap<>();
String rn = "jdk8_packages.dat";
InputStream in = IllegalAccessMaps.class.getResourceAsStream(rn);
if (in == null) {
throw new InternalError(rn + " not found");
}
try (BufferedReader br = new BufferedReader(
new InputStreamReader(in, UTF_8.INSTANCE)))
{
br.lines()
.filter(line -> !line.isEmpty() && !line.startsWith("#"))
.forEach(pn -> {
ModuleDescriptor descriptor = map.get(pn);
if (descriptor != null && !isOpen(descriptor, pn)) {
String name = descriptor.name();
if (isExported(descriptor, pn)) {
exportedPackagesToOpen.computeIfAbsent(name,
k -> new HashSet<>()).add(pn);
} else {
concealedPackagesToOpen.computeIfAbsent(name,
k -> new HashSet<>()).add(pn);
}
}
});
} catch (IOException ioe) {
throw new UncheckedIOException(ioe);
}
return new IllegalAccessMaps(concealedPackagesToOpen, exportedPackagesToOpen);
}
private static boolean isExported(ModuleDescriptor descriptor, String pn) {
return descriptor.exports()
.stream()
.anyMatch(e -> e.source().equals(pn) && !e.isQualified());
}
private static boolean isOpen(ModuleDescriptor descriptor, String pn) {
return descriptor.opens()
.stream()
.anyMatch(e -> e.source().equals(pn) && !e.isQualified());
}
}

View File

@@ -147,7 +147,8 @@ public final class ModuleBootstrap {
getProperty("jdk.module.limitmods") == null && // --limit-modules
getProperty("jdk.module.addreads.0") == null && // --add-reads
getProperty("jdk.module.addexports.0") == null && // --add-exports
getProperty("jdk.module.addopens.0") == null; // --add-opens
getProperty("jdk.module.addopens.0") == null && // --add-opens
getProperty("jdk.module.illegalAccess") == null; // --jbr-illegal-access
}
/**
@@ -188,6 +189,7 @@ public final class ModuleBootstrap {
String mainModule = System.getProperty("jdk.module.main");
Set<String> addModules = addModules();
Set<String> limitModules = limitModules();
String illegalAccess = getAndRemoveProperty("jdk.module.illegalAccess");
PrintStream traceOutput = null;
String trace = getAndRemoveProperty("jdk.module.showModuleResolution");
@@ -219,7 +221,8 @@ public final class ModuleBootstrap {
&& !haveModulePath
&& addModules.isEmpty()
&& limitModules.isEmpty()
&& !isPatched) {
&& !isPatched
&& illegalAccess == null) {
systemModuleFinder = archivedModuleGraph.finder();
hasSplitPackages = archivedModuleGraph.hasSplitPackages();
hasIncubatorModules = archivedModuleGraph.hasIncubatorModules();
@@ -454,10 +457,19 @@ public final class ModuleBootstrap {
checkIncubatingStatus(cf);
}
// --add-reads, --add-exports/--add-opens
// --add-reads, --add-exports/--add-opens, and --jbr-illegal-access
addExtraReads(bootLayer);
boolean extraExportsOrOpens = addExtraExportsAndOpens(bootLayer);
if (illegalAccess != null) {
assert systemModules != null;
addIllegalAccess(illegalAccess,
systemModules,
upgradeModulePath,
bootLayer,
extraExportsOrOpens);
}
// add enable native access
addEnableNativeAccess(bootLayer);
@@ -813,6 +825,74 @@ public final class ModuleBootstrap {
return modules;
}
/**
* Process the --jbr-illegal-access option to open packages of system modules
* in the boot layer to code in unnamed modules.
*/
private static void addIllegalAccess(String illegalAccess,
SystemModules systemModules,
ModuleFinder upgradeModulePath,
ModuleLayer bootLayer,
boolean extraExportsOrOpens) {
Map<String, Set<String>> concealedPackagesToOpen = systemModules.concealedPackagesToOpen();
Map<String, Set<String>> exportedPackagesToOpen = systemModules.exportedPackagesToOpen();
if (concealedPackagesToOpen.isEmpty() && exportedPackagesToOpen.isEmpty()) {
// need to generate (exploded build)
IllegalAccessMaps maps = IllegalAccessMaps.generate(limitedFinder());
concealedPackagesToOpen = maps.concealedPackagesToOpen();
exportedPackagesToOpen = maps.exportedPackagesToOpen();
}
// open specific packages in the system modules
Set<String> emptySet = Set.of();
for (Module m : bootLayer.modules()) {
ModuleDescriptor descriptor = m.getDescriptor();
String name = m.getName();
// skip open modules
if (descriptor.isOpen()) {
continue;
}
// skip modules loaded from the upgrade module path
if (upgradeModulePath != null
&& upgradeModulePath.find(name).isPresent()) {
continue;
}
Set<String> concealedPackages = concealedPackagesToOpen.getOrDefault(name, emptySet);
Set<String> exportedPackages = exportedPackagesToOpen.getOrDefault(name, emptySet);
// refresh the set of concealed and exported packages if needed
if (extraExportsOrOpens) {
concealedPackages = new HashSet<>(concealedPackages);
exportedPackages = new HashSet<>(exportedPackages);
Iterator<String> iterator = concealedPackages.iterator();
while (iterator.hasNext()) {
String pn = iterator.next();
if (m.isExported(pn, BootLoader.getUnnamedModule())) {
// concealed package is exported to ALL-UNNAMED
iterator.remove();
exportedPackages.add(pn);
}
}
iterator = exportedPackages.iterator();
while (iterator.hasNext()) {
String pn = iterator.next();
if (m.isOpen(pn, BootLoader.getUnnamedModule())) {
// exported package is opened to ALL-UNNAMED
iterator.remove();
}
}
}
// open the packages to unnamed modules
JLA.addOpensToAllUnnamed(m, concealedPackages, exportedPackages);
}
}
/**
* Decodes the values of --add-reads, -add-exports, --add-opens or
* --patch-modules options that are encoded in system properties.

View File

@@ -83,4 +83,16 @@ interface SystemModules {
* by this SystemModules object.
*/
Map<String, Set<String>> moduleReads();
/**
* Returns the map of module concealed packages to open. The map key is the
* module name, the value is the set of concealed packages to open.
*/
Map<String, Set<String>> concealedPackagesToOpen();
/**
* Returns the map of module exported packages to open. The map key is the
* module name, the value is the set of exported packages to open.
*/
Map<String, Set<String>> exportedPackagesToOpen();
}

File diff suppressed because it is too large Load Diff

View File

@@ -188,6 +188,10 @@ java.launcher.X.usage=\n\
\ --add-opens <module>/<package>=<target-module>(,<target-module>)*\n\
\ updates <module> to open <package> to\n\
\ <target-module>, regardless of module declaration.\n\
\ --jbr-illegal-access\n\
\ permit access to members of types in named modules\n\
\ by code in unnamed modules.\n\
\ This option will be removed in a future release.\n\
\ --limit-modules <module name>[,<module name>...]\n\
\ limit the universe of observable modules\n\
\ --patch-module <module>=<file>({0}<file>)*\n\

View File

@@ -50,28 +50,20 @@ Java_sun_nio_ch_DatagramChannelImpl_disconnect0(JNIEnv *env, jclass clazz,
jint fd = fdval(env, fdo);
int rv;
#if defined(__APPLE__)
// On macOS systems we use disconnectx
rv = disconnectx(fd, SAE_ASSOCID_ANY, SAE_CONNID_ANY);
#else
SOCKETADDRESS sa;
memset(&sa, 0, sizeof(sa));
#if defined(_ALLBSD_SOURCE)
sa.sa.sa_family = isIPv6 ? AF_INET6 : AF_INET;
#else
sa.sa.sa_family = AF_UNSPEC;
#endif
socklen_t len = isIPv6 ? sizeof(struct sockaddr_in6) :
sizeof(struct sockaddr_in);
rv = connect(fd, &sa.sa, len);
memset(&sa, 0, sizeof(sa));
#if defined(_ALLBSD_SOURCE)
sa.sa.sa_family = isIPv6 ? AF_INET6 : AF_INET;
#else
sa.sa.sa_family = AF_UNSPEC;
#endif
#if defined(_ALLBSD_SOURCE) && !defined(__APPLE__)
// On _ALLBSD_SOURCE except __APPLE__ we consider EADDRNOTAVAIL
// error to be OK and ignore it. __APPLE__ systems are excluded
// in this check since for __APPLE__ systems, unlike other BSD systems,
// we issue a "disconnectx" call (a few lines above),
// which isn't expected to return this error code.
rv = connect(fd, &sa.sa, len);
#if defined(_ALLBSD_SOURCE)
if (rv < 0 && errno == EADDRNOTAVAIL)
rv = errno = 0;
#elif defined(_AIX)

View File

@@ -63,19 +63,19 @@ static boolean SetupI18nProps(LCID lcid, char** language, char** script, char**
static char *
getEncodingInternal(LCID lcid)
{
int codepage = 0;
int codepage;
char * ret = malloc(16);
if (ret == NULL) {
return NULL;
}
if (lcid == 0) { // for sun.jnu.encoding
codepage = GetACP();
_itoa_s(codepage, ret + 2, 14, 10);
} else if (GetLocaleInfo(lcid,
if (GetLocaleInfo(lcid,
LOCALE_IDEFAULTANSICODEPAGE,
ret + 2, 14) != 0) {
codepage = atoi(ret + 2);
ret+2, 14) == 0) {
codepage = 1252;
strcpy(ret+2, "1252");
} else {
codepage = atoi(ret+2);
}
switch (codepage) {
@@ -660,6 +660,7 @@ GetJavaProperties(JNIEnv* env)
* (which is a Windows LCID value),
*/
LCID userDefaultLCID = GetUserDefaultLCID();
LCID systemDefaultLCID = GetSystemDefaultLCID();
LANGID userDefaultUILang = GetUserDefaultUILanguage();
LCID userDefaultUILCID = MAKELCID(userDefaultUILang, SORTIDFROMLCID(userDefaultLCID));
@@ -692,10 +693,7 @@ GetJavaProperties(JNIEnv* env)
&sprops.display_variant,
&display_encoding);
sprops.sun_jnu_encoding = getEncodingInternal(0);
if (sprops.sun_jnu_encoding == NULL) {
sprops.sun_jnu_encoding = "UTF-8";
}
sprops.sun_jnu_encoding = getEncodingInternal(systemDefaultLCID);
if (LANGIDFROMLCID(userDefaultLCID) == 0x0c04 && majorVersion == 6) {
// MS claims "Vista has built-in support for HKSCS-2004.
// All of the HKSCS-2004 characters have Unicode 4.1.

View File

@@ -49,10 +49,12 @@ import java.awt.image.VolatileImage;
import java.awt.peer.ComponentPeer;
import java.awt.peer.ContainerPeer;
import java.awt.peer.FileDialogPeer;
import java.awt.peer.WindowPeer;
import java.io.File;
import java.io.FilenameFilter;
import java.security.AccessController;
import java.util.List;
import sun.lwawt.LWWindowPeer;
import com.jetbrains.desktop.JBRFileDialog;
import sun.awt.AWTAccessor;
@@ -210,6 +212,13 @@ class CFileDialog implements FileDialogPeer {
@Override
public void blockWindows(List<Window> windows) {
for (Window w : windows) {
WindowPeer wp =
(WindowPeer) AWTAccessor.getComponentAccessor().getPeer(w);
if (wp != null) {
wp.setModalBlocked(target, true);
}
}
}
@Override
@@ -372,7 +381,7 @@ class CFileDialog implements FileDialogPeer {
@Override
public boolean isFocusable() {
return false;
return true;
}
@Override

View File

@@ -78,7 +78,7 @@ import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
public class CPlatformWindow extends CFRetainedResource implements PlatformWindow {
private native long nativeCreateNSWindow(long nsViewPtr,long ownerPtr, long styleBits, double x, double y, double w, double h, double transparentTitleBarHeight);
private native long nativeCreateNSWindow(long nsViewPtr,long ownerPtr, long styleBits, double x, double y, double w, double h);
private static native void nativeSetNSWindowStyleBits(long nsWindowPtr, int mask, int data);
private static native void nativeSetNSWindowAppearance(long nsWindowPtr, String appearanceName);
private static native void nativeSetNSWindowMenuBar(long nsWindowPtr, long menuBarPtr);
@@ -292,10 +292,6 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
new Property<CPlatformWindow>(WINDOW_TRANSPARENT_TITLE_BAR_HEIGHT) {
public void applyProperty(final CPlatformWindow c, final Object value) {
if (value != null && (value instanceof Float)) {
boolean enabled = (float) value != 0f;
c.setStyleBits(FULL_WINDOW_CONTENT, enabled);
c.setStyleBits(TRANSPARENT_TITLE_BAR, enabled);
c.setStyleBits(TITLE_VISIBLE, !enabled);
c.execute(ptr -> AWTThreading.executeWaitToolkit(wait -> nativeSetTransparentTitleBarHeight(ptr, (float) value)));
}
}
@@ -366,8 +362,6 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
responder = createPlatformResponder();
contentView.initialize(peer, responder);
float transparentTitleBarHeight = getTransparentTitleBarHeight(_target);
Rectangle bounds;
if (!IS(DECORATED, styleBits)) {
// For undecorated frames the move/resize event does not come if the frame is centered on the screen
@@ -388,7 +382,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
+ ", bounds=" + bounds);
}
long windowPtr = createNSWindow(viewPtr, ownerPtr, styleBits,
bounds.x, bounds.y, bounds.width, bounds.height, transparentTitleBarHeight);
bounds.x, bounds.y, bounds.width, bounds.height);
if (logger.isLoggable(PlatformLogger.Level.FINE)) {
logger.fine("window created: " + Long.toHexString(windowPtr));
}
@@ -403,7 +397,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
+ ", bounds=" + bounds);
}
long windowPtr = createNSWindow(viewPtr, 0, styleBits,
bounds.x, bounds.y, bounds.width, bounds.height, transparentTitleBarHeight);
bounds.x, bounds.y, bounds.width, bounds.height);
if (logger.isLoggable(PlatformLogger.Level.FINE)) {
logger.fine("window created: " + Long.toHexString(windowPtr));
}
@@ -565,14 +559,6 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
if (prop != null) {
styleBits = SET(styleBits, TITLE_VISIBLE, Boolean.parseBoolean(prop.toString()));
}
prop = rootpane.getClientProperty(WINDOW_TRANSPARENT_TITLE_BAR_HEIGHT);
if (prop != null) {
boolean enabled = Float.parseFloat(prop.toString()) != 0f;
styleBits = SET(styleBits, FULL_WINDOW_CONTENT, enabled);
styleBits = SET(styleBits, TRANSPARENT_TITLE_BAR, enabled);
styleBits = SET(styleBits, TITLE_VISIBLE, !enabled);
}
}
if (isDialog) {
@@ -1451,16 +1437,8 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
return false;
}
private long createNSWindow(long nsViewPtr,
long ownerPtr,
long styleBits,
double x,
double y,
double w,
double h,
double transparentTitleBarHeight) {
return AWTThreading.executeWaitToolkit(() ->
nativeCreateNSWindow(nsViewPtr, ownerPtr, styleBits, x, y, w, h, transparentTitleBarHeight));
private long createNSWindow(long nsViewPtr,long ownerPtr, long styleBits, double x, double y, double w, double h) {
return AWTThreading.executeWaitToolkit(() -> nativeCreateNSWindow(nsViewPtr, ownerPtr, styleBits, x, y, w, h));
}
// ----------------------------------------------------------------------
@@ -1494,24 +1472,20 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
isFullScreenAnimationOn = false;
}
private float getTransparentTitleBarHeight(Window target) {
if (target instanceof javax.swing.RootPaneContainer) {
final javax.swing.JRootPane rootpane = ((javax.swing.RootPaneContainer)target).getRootPane();
if (rootpane != null) {
Object transparentTitleBarHeightProperty = rootpane.getClientProperty(WINDOW_TRANSPARENT_TITLE_BAR_HEIGHT);
if (transparentTitleBarHeightProperty != null) {
return Float.parseFloat(transparentTitleBarHeightProperty.toString());
// JBR API internals
private static void setCustomDecorationTitleBarHeight(Window target, ComponentPeer peer, float height) {
if (peer instanceof LWComponentPeer) {
PlatformWindow platformWindow = ((LWComponentPeer<?, ?>) peer).getPlatformWindow();
if (platformWindow instanceof CPlatformWindow) {
((CPlatformWindow) platformWindow).execute(ptr -> {
AWTThreading.executeWaitToolkit(wait -> nativeSetTransparentTitleBarHeight(ptr, height));
});
if (target instanceof javax.swing.RootPaneContainer) {
final javax.swing.JRootPane rootpane = ((javax.swing.RootPaneContainer)target).getRootPane();
if (rootpane != null) rootpane.putClientProperty(WINDOW_TRANSPARENT_TITLE_BAR_HEIGHT, height);
}
}
}
return 0f;
}
// JBR API internals
private static void setCustomDecorationTitleBarHeight(Window target, ComponentPeer peer, float height) {
if (target instanceof javax.swing.RootPaneContainer) {
final javax.swing.JRootPane rootpane = ((javax.swing.RootPaneContainer)target).getRootPane();
if (rootpane != null) rootpane.putClientProperty(WINDOW_TRANSPARENT_TITLE_BAR_HEIGHT, height);
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2020, 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
@@ -175,9 +175,9 @@ final class CRobot implements RobotPeer {
*/
@Override
public int getRGBPixel(int x, int y) {
int scale = fDevice.getScaleFactor();
int[] c = new int[scale * scale];
getScreenPixels(new Rectangle(x, y, scale, scale), c);
int[] c = new int[1];
double scale = fDevice.getScaleFactor();
getScreenPixels(new Rectangle(x, y, (int) scale, (int) scale), c);
return c[0];
}

View File

@@ -416,7 +416,7 @@ AWT_NS_WINDOW_IMPLEMENTATION
}
if (IS(mask, TITLE_VISIBLE) && [self.nsWindow respondsToSelector:@selector(setTitleVisibility:)]) {
[self.nsWindow setTitleVisibility:(IS(bits, TITLE_VISIBLE) ? NSWindowTitleVisible : NSWindowTitleHidden)];
[self.nsWindow setTitleVisibility:(IS(bits, TITLE_VISIBLE)) ? NSWindowTitleVisible :NSWindowTitleHidden];
}
}
@@ -426,7 +426,6 @@ AWT_NS_WINDOW_IMPLEMENTATION
styleBits:(jint)bits
frameRect:(NSRect)rect
contentView:(NSView *)view
transparentTitleBarHeight:(CGFloat)transparentTitleBarHeight
{
AWT_ASSERT_APPKIT_THREAD;
@@ -487,11 +486,6 @@ AWT_ASSERT_APPKIT_THREAD;
self.nsWindow.collectionBehavior = NSWindowCollectionBehaviorManaged;
self.isEnterFullScreen = NO;
_transparentTitleBarHeight = transparentTitleBarHeight;
if (transparentTitleBarHeight != 0.0 && !self.isFullScreen) {
[self setUpTransparentTitleBar];
}
return self;
}
@@ -1435,32 +1429,38 @@ static const CGFloat DefaultHorizontalTitleBarButtonOffset = 20.0;
- (void) setTransparentTitleBarHeight: (CGFloat) transparentTitleBarHeight
{
if (_transparentTitleBarHeight == transparentTitleBarHeight) return;
if (_transparentTitleBarHeight != 0.0f) {
_transparentTitleBarHeight = transparentTitleBarHeight;
if (transparentTitleBarHeight == 0.0f) {
if (!self.isFullScreen) {
dispatch_sync(dispatch_get_main_queue(), ^{
dispatch_sync(dispatch_get_main_queue(), ^{
[self.nsWindow setTitlebarAppearsTransparent:NO];
[self.nsWindow setTitleVisibility:NSWindowTitleVisible];
[self.nsWindow setStyleMask:[self.nsWindow styleMask]&(~NSWindowStyleMaskFullSizeContentView)];
if (!self.isFullScreen) {
[self resetTitleBar];
});
}
}
});
} else if (_transparentTitleBarHeightConstraint != nil || _transparentTitleBarButtonCenterXConstraints != nil) {
[self updateTransparentTitleBarConstraints];
}
} else {
_transparentTitleBarHeight = transparentTitleBarHeight;
if (!self.isFullScreen) {
dispatch_sync(dispatch_get_main_queue(), ^{
dispatch_sync(dispatch_get_main_queue(), ^{
[self.nsWindow setTitlebarAppearsTransparent:YES];
[self.nsWindow setTitleVisibility:NSWindowTitleHidden];
[self.nsWindow setStyleMask:[self.nsWindow styleMask]|NSWindowStyleMaskFullSizeContentView];
if (!self.isFullScreen) {
[self setUpTransparentTitleBar];
});
}
}
});
}
}
@end // AWTWindow
@implementation AWTWindowDragView {
CGFloat _accumulatedDragDelta;
enum WindowDragState {
NO_DRAG, // Mouse not dragging
SKIP_DRAG, // Mouse dragging in non-draggable area
@@ -1481,9 +1481,9 @@ static const CGFloat DefaultHorizontalTitleBarButtonOffset = 20.0;
return NO;
}
- (jint)hitTestCustomDecoration:(NSPoint)point
- (BOOL)isInDraggableArea:(NSPoint)point
{
jint returnValue = java_awt_Window_CustomWindowDecoration_NO_HIT_SPOT;
BOOL returnValue = YES;
JNIEnv *env = [ThreadUtilities getJNIEnvUncached];
jobject platformWindow = (*env)->NewLocalRef(env, self.javaPlatformWindow);
if (platformWindow != NULL) {
@@ -1495,7 +1495,8 @@ static const CGFloat DefaultHorizontalTitleBarButtonOffset = 20.0;
if (awtWindow != NULL) {
NSRect frame = [self.window frame];
float windowHeight = frame.size.height;
returnValue = (*env)->CallIntMethod(env, awtWindow, jm_hitTestCustomDecoration, (jint) point.x, (jint) (windowHeight - point.y));
returnValue = (*env)->CallIntMethod(env, awtWindow, jm_hitTestCustomDecoration, (jint) point.x, (jint) (windowHeight - point.y)) ==
(jint) java_awt_Window_CustomWindowDecoration_NO_HIT_SPOT ? YES : NO;
CHECK_EXCEPTION();
(*env)->DeleteLocalRef(env, awtWindow);
}
@@ -1507,7 +1508,6 @@ static const CGFloat DefaultHorizontalTitleBarButtonOffset = 20.0;
- (void)mouseDown:(NSEvent *)event
{
_draggingWindow = NO_DRAG;
_accumulatedDragDelta = 0.0;
// We don't follow the regular responder chain here since the native window swallows events in some cases
[[self.window contentView] deliverJavaMouseEvent:event];
}
@@ -1515,17 +1515,12 @@ static const CGFloat DefaultHorizontalTitleBarButtonOffset = 20.0;
- (void)mouseDragged:(NSEvent *)event
{
if (_draggingWindow == NO_DRAG) {
jint hitSpot = [self hitTestCustomDecoration:event.locationInWindow];
switch (hitSpot) {
case java_awt_Window_CustomWindowDecoration_DRAGGABLE_AREA:
// Start drag only after 4px threshold inside DRAGGABLE_AREA
if ((_accumulatedDragDelta += fabs(event.deltaX) + fabs(event.deltaY)) <= 4.0) break;
case java_awt_Window_CustomWindowDecoration_NO_HIT_SPOT:
[self.window performWindowDragWithEvent:event];
_draggingWindow = DRAG;
break;
default:
_draggingWindow = SKIP_DRAG;
BOOL shouldStartWindowDrag = [self isInDraggableArea:event.locationInWindow];
if (shouldStartWindowDrag) {
[self.window performWindowDragWithEvent:event];
_draggingWindow = DRAG;
} else {
_draggingWindow = SKIP_DRAG;
}
}
}
@@ -1535,8 +1530,7 @@ static const CGFloat DefaultHorizontalTitleBarButtonOffset = 20.0;
if (_draggingWindow == DRAG) {
_draggingWindow = NO_DRAG;
} else {
jint hitSpot = [self hitTestCustomDecoration:event.locationInWindow];
if (event.clickCount == 2 && hitSpot == java_awt_Window_CustomWindowDecoration_NO_HIT_SPOT) {
if (event.clickCount == 2 && [self isInDraggableArea:event.locationInWindow]) {
[self.window performZoom:nil];
}
@@ -1569,10 +1563,10 @@ JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeSetAllowAutom
/*
* Class: sun_lwawt_macosx_CPlatformWindow
* Method: nativeCreateNSWindow
* Signature: (JJIDDDDD)J
* Signature: (JJIIII)J
*/
JNIEXPORT jlong JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeCreateNSWindow
(JNIEnv *env, jobject obj, jlong contentViewPtr, jlong ownerPtr, jlong styleBits, jdouble x, jdouble y, jdouble w, jdouble h, jdouble transparentTitleBarHeight)
(JNIEnv *env, jobject obj, jlong contentViewPtr, jlong ownerPtr, jlong styleBits, jdouble x, jdouble y, jdouble w, jdouble h)
{
__block AWTWindow *window = nil;
@@ -1599,8 +1593,7 @@ JNI_COCOA_ENTER(env);
ownerWindow:owner
styleBits:styleBits
frameRect:frameRect
contentView:contentView
transparentTitleBarHeight:(CGFloat)transparentTitleBarHeight];
contentView:contentView];
// the window is released is CPlatformWindow.nativeDispose()
if (window) {
@@ -1692,8 +1685,8 @@ JNI_COCOA_EXIT(env);
/*
* Class: sun_lwawt_macosx_CPlatformWindow
* Method: nativeSetNSWindowAppearance
* Signature: (JLjava/lang/String;)V
* Method: nativeSetNSWindowStyleBits
* Signature: (JII)V
*/
JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeSetNSWindowAppearance
(JNIEnv *env, jclass clazz, jlong windowPtr, jstring appearanceName)

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2020, 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
@@ -360,11 +360,6 @@ Java_sun_lwawt_macosx_CRobot_nativeGetScreenPixels
jint picY = y;
jint picWidth = width;
jint picHeight = height;
jsize size = (*env)->GetArrayLength(env, pixels);
if (size < (long) picWidth * picHeight || picWidth < 0 || picHeight < 0) {
JNU_ThrowInternalError(env, "Invalid arguments to get screen pixels");
return;
}
CGRect screenRect = CGRectMake(picX / scale, picY / scale,
picWidth / scale, picHeight / scale);

View File

@@ -3190,9 +3190,6 @@ JNI_COCOA_ENTER(env);
CTFontRef ctfont = (CTFontRef)nsFont;
CFArrayRef tagsArray =
CTFontCopyAvailableTables(ctfont, kCTFontTableOptionNoOptions);
if (tagsArray == NULL) {
return NULL;
}
CFIndex numTags = CFArrayGetCount(tagsArray);
for (i=0; i<numTags; i++) {
if (tag ==

View File

@@ -80,9 +80,7 @@ void MTLRenderQueue_CheckPreviousOp(jint op) {
if (mtlc != NULL) {
[mtlc.encoderManager endEncoder];
if (op == MTL_OP_RESET_PAINT || op == MTL_OP_SYNC || op == MTL_OP_SHAPE_CLIP_SPANS ||
mtlPreviousOp == MTL_OP_MASK_OP)
{
if (op == MTL_OP_RESET_PAINT || op == MTL_OP_SYNC || op == MTL_OP_SHAPE_CLIP_SPANS) {
MTLCommandBufferWrapper *cbwrapper = [mtlc pullCommandBufferWrapper];
id <MTLCommandBuffer> commandbuf = [cbwrapper getCommandBuffer];
[commandbuf addCompletedHandler:^(id <MTLCommandBuffer> commandbuf) {

View File

@@ -183,9 +183,8 @@
* or maybe a way for the app to continue running depending on the exact
* nature of the problem that has been detected and how survivable it is.
*/
#define CHECK_EXCEPTION_IN_ENV(env) { \
jthrowable exc = (*(env))->ExceptionOccurred(env); \
if (exc != NULL) { \
#define CHECK_EXCEPTION_IN_ENV(env) \
if ((*(env))->ExceptionOccurred(env) != NULL) { \
if ([NSThread isMainThread] == YES) { \
if (getenv("JNU_APPKIT_TRACE")) { \
(*(env))->ExceptionDescribe(env); \
@@ -194,14 +193,12 @@
(*(env))->ExceptionClear(env); \
} \
} \
if (getenv("JNU_NO_COCOA_EXCEPTION") == NULL) {\
[NSException raise:NSGenericException \
format:@"%@", ThrowableToNSString(env, exc)]; \
if (getenv("JNU_NO_COCOA_EXCEPTION") == NULL) { \
[NSException raise:NSGenericException format:@"Java Exception"]; \
} else { \
(*(env))->ExceptionClear(env); \
} \
} \
};
};
#define CHECK_EXCEPTION() CHECK_EXCEPTION_IN_ENV(env)
@@ -252,6 +249,4 @@ JNIEXPORT NSString* NormalizedPathNSStringFromJavaString(JNIEnv *env, jstring pa
JNIEXPORT jstring NormalizedPathJavaStringFromNSString(JNIEnv* env, NSString *str);
JNIEXPORT NSString *ThrowableToNSString(JNIEnv *env, jthrowable exc);
#endif /* __JNIUTILITIES_H */

View File

@@ -113,41 +113,3 @@ jstring NormalizedPathJavaStringFromNSString(JNIEnv* env, NSString *str) {
NSString *normStr = [str precomposedStringWithCanonicalMapping];
return NSStringToJavaString(env, normStr);
}
NSString *ThrowableToNSString(JNIEnv *env, jthrowable exc) {
(*env)->ExceptionClear(env);
if (JNU_IsInstanceOfByName(env, exc, "java/lang/OutOfMemoryError")) {
static NSString* const OOMEDescr = @"OutOfMemoryError";
return OOMEDescr;
}
DECLARE_CLASS_RETURN(sjc_Object, "java/lang/Object", nil);
DECLARE_METHOD_RETURN(jm_toString, sjc_Object, "toString", "()Ljava/lang/String;", nil);
DECLARE_CLASS_RETURN(sjc_Throwable, "java/lang/Throwable", nil);
DECLARE_METHOD_RETURN(jm_getStackTrace, sjc_Throwable, "getStackTrace",
"()[Ljava/lang/StackTraceElement;", nil);
jobject jstr = (*env)->CallObjectMethod(env, exc, jm_toString);
NSString* result = JavaStringToNSString(env, jstr);
jobjectArray frames =
(jobjectArray) (*env)->CallObjectMethod(env, exc, jm_getStackTrace);
if (frames != NULL) {
jsize framesLen = (*env)->GetArrayLength(env, frames);
for (int i = 0; i < framesLen; i++) {
jobject stackElem = (*env)->GetObjectArrayElement(env, frames, i);
jobject stackElemStr = (*env)->CallObjectMethod(env, stackElem, jm_toString);
NSString *frameStr = JavaStringToNSString(env, stackElemStr);
result = [result stringByAppendingFormat:@"\n%@", frameStr];
(*env)->DeleteLocalRef(env, stackElem);
(*env)->DeleteLocalRef(env, stackElemStr);
}
(*env)->DeleteLocalRef(env, frames);
}
(*env)->DeleteLocalRef(env, jstr);
return result;
}

View File

@@ -4033,8 +4033,7 @@ public class Window extends Container implements Accessible {
MINIMIZE_BUTTON = 2,
MAXIMIZE_BUTTON = 3,
CLOSE_BUTTON = 4,
MENU_BAR = 5,
DRAGGABLE_AREA = 6;
MENU_BAR = 5;
void setCustomDecorationEnabled(Window window, boolean enabled) {
window.hasCustomDecoration = enabled;

View File

@@ -47,7 +47,6 @@ import java.util.Map;
import sun.awt.EmbeddedFrame;
import sun.awt.OSInfo;
import sun.awt.SunToolkit;
import sun.swing.SwingAccessor;
import static javax.swing.ClientPropertyKey.PopupFactory_FORCE_HEAVYWEIGHT_POPUP;
@@ -394,13 +393,9 @@ public class PopupFactory {
}
}
Toolkit toolkit = Toolkit.getDefaultToolkit();
if (popup == null ||
((JWindow) popup.getComponent())
.getFocusableWindowState() != focusPopup ||
(toolkit instanceof SunToolkit) &&
(((SunToolkit) toolkit).popupMenusAreSpecial()) &&
popup.isPopupMenu() != (contents instanceof JPopupMenu)) {
.getFocusableWindowState() != focusPopup) {
if(popup != null) {
// The recycled popup can't serve us well
@@ -424,11 +419,6 @@ public class PopupFactory {
return popup;
}
private boolean isPopupMenu() {
Component[] components = ((JWindow) getComponent()).getContentPane().getComponents();
return components.length == 1 && components[0] instanceof JPopupMenu;
}
/**
* Returns a previously disposed heavy weight <code>Popup</code>
* associated with <code>window</code>. This will return null if

View File

@@ -446,11 +446,7 @@ public class AWTThreading {
synchronized (eventDispatchThreadStateNotifiers) {
if (!isEventDispatchThreadFree) {
eventDispatchThreadStateNotifiers.add(future);
future.whenComplete((r, ex) -> {
synchronized (eventDispatchThreadStateNotifiers) {
eventDispatchThreadStateNotifiers.remove(future);
}
});
future.whenComplete((r, ex) -> eventDispatchThreadStateNotifiers.remove(future));
return future;
}
}

View File

@@ -1992,10 +1992,6 @@ public abstract class SunToolkit extends Toolkit
return false;
}
public boolean popupMenusAreSpecial() {
return false;
}
/**
* Returns whether or not a containing top level window for the passed
* component is

View File

@@ -415,10 +415,6 @@ abstract class XDecoratedPeer extends XWindowPeer {
insets_corrected = true;
reshape(dimensions, SET_SIZE, false);
} else if (xe.get_parent() == root) {
if (!isReparented()) {
// X server on Windows (e.g. Cygwin/X) does perform a no-op reparenting to the root window
return;
}
configure_seen = false;
insets_corrected = false;
@@ -1213,7 +1209,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
@Override
boolean isOverrideRedirect() {
return Window.Type.POPUP.equals(getWindowType()) && !XWM.isKDE2();
return Window.Type.POPUP.equals(getWindowType());
}
public boolean requestWindowFocus(long time, boolean timeProvided) {

View File

@@ -156,95 +156,6 @@ public class XInputMethod extends X11InputMethod {
return peer.getContentWindow();
}
static void onXKeyEventFiltering(final boolean isXKeyEventFiltered) {
// Fix of JBR-1573, JBR-2444, JBR-4394 (a.k.a. IDEA-246833).
// Input method is considered broken if and only if all the following statements are true:
// * XFilterEvent have filtered more than filteredEventsThreshold last events of types KeyPress, KeyRelease;
// * Input method hasn't been changed (e.g. recreated);
// * The input context is not in preedit state (XNPreeditStartCallback has been called but then XNPreeditDoneCallback - hasn't)
// The functionality is disabled
if (BrokenImDetectionContext.EATEN_EVENTS_THRESHOLD < 1) {
return;
}
// Must be called within AWT_LOCK
if (!XToolkit.isAWTLockHeldByCurrentThread()) {
return;
}
if (isXKeyEventFiltered) {
final long nativeDataPtr = BrokenImDetectionContext.obtainCurrentXimNativeDataPtr();
if (nativeDataPtr == 0) {
++BrokenImDetectionContext.eatenKeyEventsCount;
} else {
final int isDuringPreediting = BrokenImDetectionContext.isDuringPreediting(nativeDataPtr);
if (isDuringPreediting > 0) {
BrokenImDetectionContext.eatenKeyEventsCount = 0;
} else if (isDuringPreediting == 0) {
++BrokenImDetectionContext.eatenKeyEventsCount;
} else if (BrokenImDetectionContext.isCurrentXicPassive(nativeDataPtr)) {
// Unfortunately for passive XIC (XIMPreeditNothing | XIMStatusNothing) we have no way to get know
// whether the XIC is in preediting state or not, so we won't handle this case.
BrokenImDetectionContext.eatenKeyEventsCount = 0;
} else {
++BrokenImDetectionContext.eatenKeyEventsCount;
}
}
} else {
BrokenImDetectionContext.eatenKeyEventsCount = 0;
}
if (BrokenImDetectionContext.eatenKeyEventsCount > BrokenImDetectionContext.EATEN_EVENTS_THRESHOLD) {
BrokenImDetectionContext.eatenKeyEventsCount = 0;
recreateAllXIC();
}
}
private static class BrokenImDetectionContext {
static final int EATEN_EVENTS_THRESHOLD;
static int eatenKeyEventsCount = 0;
/**
* @return pointer to X11InputMethodData
*/
static native long obtainCurrentXimNativeDataPtr();
/**
* <0 - unknown
* >0 - true
* 0 - false
*/
static native int isDuringPreediting(long ximNativeDataPtr);
static native boolean isCurrentXicPassive(long ximNativeDataPtr);
static {
int eatenEventsThresholdInitializer = 7;
final String eventsThresholdMode = System.getProperty("recreate.x11.input.method", "true");
if ("false".equals(eventsThresholdMode)) {
eatenEventsThresholdInitializer = 0;
} else if (!"true".equals(eventsThresholdMode)) {
try {
eatenEventsThresholdInitializer = Integer.parseInt(eventsThresholdMode);
} catch (NumberFormatException err) {
log.warning(
"Invalid value of \"recreate.x11.input.method\" system property \"" +
eventsThresholdMode +
"\". Only \"true\", \"false\" and integer values are supported",
err
);
}
}
EATEN_EVENTS_THRESHOLD = eatenEventsThresholdInitializer;
}
}
/*
* Native methods
*/

View File

@@ -501,8 +501,6 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
private static XMouseInfoPeer xPeer;
private static Boolean isXWayland;
static {
initSecurityWarning();
if (GraphicsEnvironment.isHeadless()) {
@@ -1024,28 +1022,21 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
}
}
}
final boolean isKeyEvent = ( (ev.get_type() == XConstants.KeyPress) ||
(ev.get_type() == XConstants.KeyRelease) );
if (keyEventLog.isLoggable(PlatformLogger.Level.FINE) && isKeyEvent) {
if (keyEventLog.isLoggable(PlatformLogger.Level.FINE) && (
ev.get_type() == XConstants.KeyPress
|| ev.get_type() == XConstants.KeyRelease)) {
keyEventLog.fine("before XFilterEvent:" + ev);
}
if (XlibWrapper.XFilterEvent(ev.getPData(), w)) {
if (isKeyEvent) {
XInputMethod.onXKeyEventFiltering(true);
}
continue;
}
if (keyEventLog.isLoggable(PlatformLogger.Level.FINE) && isKeyEvent) {
if (keyEventLog.isLoggable(PlatformLogger.Level.FINE) && (
ev.get_type() == XConstants.KeyPress
|| ev.get_type() == XConstants.KeyRelease)) {
keyEventLog.fine(
"after XFilterEvent:" + ev); // IS THIS CORRECT?
}
if (isKeyEvent) {
XInputMethod.onXKeyEventFiltering(false);
}
dispatchEvent(ev);
// free event data if XGetEventData was called
XlibWrapper.XFreeEventData(getDisplay(), ev.pData);
@@ -2929,11 +2920,6 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
return ((X11GraphicsConfig)gc).isTranslucencyCapable();
}
@Override
public boolean popupMenusAreSpecial() {
return XWM.isKDE2();
}
/**
* Returns the value of "sun.awt.disablegrab" property. Default
* value is {@code false}.
@@ -2943,13 +2929,6 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
return AccessController.doPrivileged(new GetBooleanAction("sun.awt.disablegrab"));
}
static synchronized boolean isXWayland() {
if (isXWayland == null) {
isXWayland = getEnv("WAYLAND_DISPLAY") != null;
}
return isXWayland;
}
@SuppressWarnings("removal")
private static final boolean useCachedInsets = Boolean.parseBoolean(AccessController.doPrivileged(
new GetPropertyAction("x11.cache.screen.insets", "true")));

View File

@@ -28,12 +28,19 @@ package sun.awt.X11;
import java.awt.*;
import java.awt.event.ComponentEvent;
import java.awt.event.FocusEvent;
import java.awt.event.InvocationEvent;
import java.awt.event.WindowEvent;
import java.awt.peer.ComponentPeer;
import java.awt.peer.WindowPeer;
import java.io.UnsupportedEncodingException;
import java.util.*;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import java.util.function.BooleanSupplier;
import java.util.function.Consumer;
import sun.awt.AWTAccessor;
import sun.awt.AWTAccessor.ComponentAccessor;
@@ -47,9 +54,6 @@ import sun.util.logging.PlatformLogger;
import sun.security.action.GetPropertyAction;
import javax.swing.JPopupMenu;
import javax.swing.JWindow;
class XWindowPeer extends XPanelPeer implements WindowPeer,
DisplayChangedListener {
@@ -932,12 +936,6 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
}
handleWindowFocusOut(oppositeWindow, xfe.get_serial());
}
if (XToolkit.isXWayland() && XAwtState.getGrabWindow() != null) {
// under XWayland, pointer grab doesn't give us ability to receive button events for native Wayland
// windows, so the logic in handleButtonPressRelease method won't work, and we need this workaround
// to cancel the grab on switching to another application
postEventToEventQueue(new sun.awt.UngrabEvent(getEventSource()));
}
}
}
}
@@ -1234,11 +1232,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
@Override
void setUserTimeBeforeShowing() {
if (XWM.getWMID() == XWM.KDE2_WM && isSimpleWindow() && ((Window)target).getType() == Window.Type.POPUP) {
// Workaround, to suppress blinking of taskbar icon, when hover popup is displayed for a background window
setUserTime(XToolkit.getCurrentServerTime(), false);
}
else if (winAttr.initialFocus || shouldSuppressWmTakeFocus()) {
if (winAttr.initialFocus || shouldSuppressWmTakeFocus()) {
super.setUserTimeBeforeShowing();
}
else {
@@ -1329,15 +1323,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
boolean isOverrideRedirect() {
return XWM.getWMID() == XWM.OPENLOOK_WM ||
Window.Type.POPUP.equals(getWindowType()) && (!XWM.isKDE2() || isPopupMenuWindow());
}
private boolean isPopupMenuWindow() {
if (!(target instanceof JWindow)) return false;
Container contentPane = ((JWindow) target).getContentPane();
if (contentPane == null) return false;
Component[] components = contentPane.getComponents();
return components.length == 1 && components[0] instanceof JPopupMenu;
Window.Type.POPUP.equals(getWindowType());
}
final boolean isOLWMDecorBug() {

View File

@@ -364,8 +364,8 @@ public abstract class X11InputMethod extends X11InputMethodBase {
}
}
protected static void recreateAllXIC() {
// NOTE: called within AWT_LOCK
static void recreateAllXIC() {
// NOTE: called from native within AWT_LOCK
Map<X11InputMethod, Integer> im2ctxid = new HashMap<>(activeInputMethods.size());
for (X11InputMethod im : activeInputMethods) {
im2ctxid.put(im, im.releaseXIC());

View File

@@ -32,7 +32,6 @@
#include <sun_awt_X11InputMethodBase.h>
#include <sun_awt_X11_XInputMethod.h>
#include <sun_awt_X11_XInputMethod_BrokenImDetectionContext.h>
#include <stdio.h>
#include <stdlib.h>
@@ -130,10 +129,6 @@ typedef struct _X11InputMethodData {
#endif
char *lookup_buf; /* buffer used for XmbLookupString */
int lookup_buf_len; /* lookup buffer size in bytes */
struct {
Boolean isBetweenPreeditStartAndPreeditDone;
} brokenImDetectionContext;
} X11InputMethodData;
/*
@@ -409,8 +404,6 @@ freeX11InputMethodData(JNIEnv *env, X11InputMethodData *pX11IMData)
free((void *)pX11IMData->lookup_buf);
}
pX11IMData->brokenImDetectionContext.isBetweenPreeditStartAndPreeditDone = False;
free((void *)pX11IMData);
}
@@ -1048,8 +1041,6 @@ createXIC(JNIEnv * env, X11InputMethodData *pX11IMData, Window w)
XNResetState, XIMInitialState,
NULL);
pX11IMData->brokenImDetectionContext.isBetweenPreeditStartAndPreeditDone = False;
/* Add the global reference object to X11InputMethod to the list. */
addToX11InputMethodGRefList(pX11IMData->x11inputmethod);
@@ -1070,53 +1061,16 @@ createXIC(JNIEnv * env, X11InputMethodData *pX11IMData, Window w)
static int
PreeditStartCallback(XIC ic, XPointer client_data, XPointer call_data)
{
/* printf("Native: PreeditStartCallback(%p, %p, %p)\n", ic, client_data, call_data); */
JNIEnv * const env = GetJNIEnv();
AWT_LOCK();
jobject javaInputMethodGRef = (jobject)client_data;
if (!isX11InputMethodGRefInList(javaInputMethodGRef)) {
goto finally;
}
X11InputMethodData * const pX11IMData = getX11InputMethodData(env, javaInputMethodGRef);
if (pX11IMData == NULL) {
goto finally;
}
pX11IMData->brokenImDetectionContext.isBetweenPreeditStartAndPreeditDone = True;
finally:
AWT_UNLOCK();
/*ARGSUSED*/
/* printf("Native: PreeditStartCallback\n"); */
return -1;
}
static void
PreeditDoneCallback(XIC ic, XPointer client_data, XPointer call_data)
{
/* printf("Native: PreeditDoneCallback(%p, %p, %p)\n", ic, client_data, call_data); */
JNIEnv * const env = GetJNIEnv();
AWT_LOCK();
jobject javaInputMethodGRef = (jobject)client_data;
if (!isX11InputMethodGRefInList(javaInputMethodGRef)) {
goto finally;
}
X11InputMethodData * const pX11IMData = getX11InputMethodData(env, javaInputMethodGRef);
if (pX11IMData == NULL) {
goto finally;
}
pX11IMData->brokenImDetectionContext.isBetweenPreeditStartAndPreeditDone = False;
finally:
AWT_UNLOCK();
return;
/*ARGSUSED*/
/* printf("Native: PreeditDoneCallback\n"); */
}
/*
@@ -1129,8 +1083,6 @@ static void
PreeditDrawCallback(XIC ic, XPointer client_data,
XIMPreeditDrawCallbackStruct *pre_draw)
{
/* printf("Native: PreeditDrawCallback(%p, %p, %p)\n", ic, client_data, pre_draw); */
JNIEnv *env = GetJNIEnv();
X11InputMethodData *pX11IMData = NULL;
jmethodID x11imMethodID;
@@ -1223,7 +1175,7 @@ PreeditCaretCallback(XIC ic, XPointer client_data,
XIMPreeditCaretCallbackStruct *pre_caret)
{
/*ARGSUSED*/
/* printf("Native: PreeditCaretCallback(%p, %p, %p)\n", ic, client_data, pre_caret); */
/* printf("Native: PreeditCaretCallback\n"); */
}
#if defined(__linux__)
@@ -1231,14 +1183,14 @@ static void
StatusStartCallback(XIC ic, XPointer client_data, XPointer call_data)
{
/*ARGSUSED*/
/*printf("Native: StatusStartCallback(%p, %p, %p)\n", ic, client_data, call_data); */
/*printf("StatusStartCallback:\n"); */
}
static void
StatusDoneCallback(XIC ic, XPointer client_data, XPointer call_data)
{
/*ARGSUSED*/
/*printf("Native: StatusDoneCallback(%p, %p, %p)\n", ic, client_data, call_data); */
/*printf("StatusDoneCallback:\n"); */
JNIEnv *env = GetJNIEnv();
X11InputMethodData *pX11IMData = NULL;
StatusWindow *statusWindow;
@@ -1269,7 +1221,7 @@ StatusDrawCallback(XIC ic, XPointer client_data,
XIMStatusDrawCallbackStruct *status_draw)
{
/*ARGSUSED*/
/*printf("Native: StatusDrawCallback(%p, %p, %p)\n", ic, client_data, status_draw); */
/*printf("StatusDrawCallback:\n"); */
JNIEnv *env = GetJNIEnv();
X11InputMethodData *pX11IMData = NULL;
StatusWindow *statusWindow;
@@ -1322,8 +1274,6 @@ StatusDrawCallback(XIC ic, XPointer client_data,
#endif /* __linux__ */
static void CommitStringCallback(XIC ic, XPointer client_data, XPointer call_data) {
/* printf("Native: CommitStringCallback(%p, %p, %p)\n", ic, client_data, call_data); */
JNIEnv *env = GetJNIEnv();
XIMText * text = (XIMText *)call_data;
X11InputMethodData *pX11IMData = NULL;
@@ -1564,110 +1514,6 @@ Java_sun_awt_X11_XInputMethod_setXICFocusNative(JNIEnv *env,
AWT_UNLOCK();
}
/*
* Class: sun_awt_X11_XInputMethod_BrokenImDetectionContext
* Method: obtainCurrentXimNativeDataPtr
* Signature: ()J
*
* NOTE: MUST BE CALLED WITHIN AWT_LOCK
*/
JNIEXPORT jlong JNICALL Java_sun_awt_X11_XInputMethod_00024BrokenImDetectionContext_obtainCurrentXimNativeDataPtr
(JNIEnv *env, jclass cls)
{
jlong result = 0;
if (isX11InputMethodGRefInList(currentX11InputMethodInstance)) {
X11InputMethodData * const pX11IMData = getX11InputMethodData(env, currentX11InputMethodInstance);
result = ptr_to_jlong(pX11IMData);
}
return result;
}
/*
* Class: sun_awt_X11_XInputMethod_BrokenImDetectionContext
* Method: isCurrentXicPassive
* Signature: (J)Z
*
* NOTE: MUST BE CALLED WITHIN AWT_LOCK
*/
JNIEXPORT jboolean JNICALL Java_sun_awt_X11_XInputMethod_00024BrokenImDetectionContext_isCurrentXicPassive
(JNIEnv *env, jclass cls, jlong ximNativeDataPtr)
{
X11InputMethodData * const pX11ImData = (X11InputMethodData *)jlong_to_ptr(ximNativeDataPtr);
if (pX11ImData == NULL) {
return JNI_FALSE;
}
const jboolean result = (pX11ImData->current_ic == NULL) ? JNI_FALSE
: (pX11ImData->current_ic == pX11ImData->ic_passive) ? JNI_TRUE
: JNI_FALSE;
return result;
}
static XIMPreeditState getPreeditStateOf(XIC xic) {
#if defined(__linux__) && defined(_LP64) && !defined(_LITTLE_ENDIAN)
// XIMPreeditState value which is used for XGetICValues must be 32bit on BigEndian XOrg's xlib
unsigned int state = XIMPreeditUnKnown;
#else
XIMPreeditState state = XIMPreeditUnKnown;
#endif
XVaNestedList preeditStateAttr = XVaCreateNestedList(0, XNPreeditState, &state, NULL);
if (preeditStateAttr == NULL) {
return XIMPreeditUnKnown;
}
const char * const unsupportedAttrs = XGetICValues(xic, XNPreeditAttributes, preeditStateAttr, NULL);
XFree((void *)preeditStateAttr);
if (unsupportedAttrs != NULL) {
return XIMPreeditUnKnown;
}
return (state == XIMPreeditEnable) ? XIMPreeditEnable
: (state == XIMPreeditDisable) ? XIMPreeditDisable
: XIMPreeditUnKnown;
}
/*
* Class: sun_awt_X11_XInputMethod_BrokenImDetectionContext
* Method: isDuringPreediting
* Signature: ()I
*
* Returns the following values:
* * >0 in case the IM is in preediting state;
* * 0 in case the IM is not in preediting state;
* * <0 in case it's unknown whether the IM is in preediting state or not.
*
* NOTE: MUST BE CALLED WITHIN AWT_LOCK
*/
JNIEXPORT jint JNICALL Java_sun_awt_X11_XInputMethod_00024BrokenImDetectionContext_isDuringPreediting
(JNIEnv *env, jclass cls, jlong ximNativeDataPtr)
{
X11InputMethodData * const pX11ImData = (X11InputMethodData *)jlong_to_ptr(ximNativeDataPtr);
if (pX11ImData == NULL) {
return -1;
}
jint result = -1;
if (pX11ImData->brokenImDetectionContext.isBetweenPreeditStartAndPreeditDone) {
result = 1;
} else if (pX11ImData->current_ic != NULL) {
const XIMPreeditState preeditState = getPreeditStateOf(pX11ImData->current_ic);
if (preeditState == XIMPreeditEnable) {
result = 1;
} else if (preeditState == XIMPreeditDisable) {
result = 0;
}
}
return result;
}
/*
* Class: sun_awt_X11InputMethodBase
* Method: initIDs

View File

@@ -653,6 +653,61 @@ JNIEXPORT void JNICALL Java_sun_awt_X11_XlibWrapper_XWindowEvent
XWindowEvent( (Display *) jlong_to_ptr(display), (Window)window, event_mask, (XEvent *) jlong_to_ptr(event_return));
}
static int filteredEventsCount = 0;
static int filteredEventsThreshold = -1;
static const int DEFAULT_THRESHOLD = 5;
#define KeyPressEventType 2
#define KeyReleaseEventType 3
static void checkBrokenInputMethod(XEvent * event, jboolean isEventFiltered) {
// Fix for JBR-2444
// By default filteredEventsThreshold == 5, you can turn it of with
// recreate.x11.input.method=false
if (filteredEventsThreshold < 0) {
filteredEventsThreshold = 0;
// read from VM-property
JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
jclass systemCls = (*env)->FindClass(env, "java/lang/System");
CHECK_NULL(systemCls);
jmethodID mid = (*env)->GetStaticMethodID(env, systemCls, "getProperty", "(Ljava/lang/String;)Ljava/lang/String;");
CHECK_NULL(mid);
jstring name = (*env)->NewStringUTF(env, "recreate.x11.input.method");
CHECK_NULL(name);
jstring jvalue = (*env)->CallStaticObjectMethod(env, systemCls, mid, name);
if (jvalue != NULL) {
const char * utf8string = (*env)->GetStringUTFChars(env, jvalue, NULL);
if (utf8string != NULL) {
const int parsedVal = atoi(utf8string);
if (parsedVal > 0)
filteredEventsThreshold = parsedVal;
else if (strncmp(utf8string, "false", 5) == 0)
filteredEventsThreshold = 0;
}
(*env)->ReleaseStringUTFChars(env, jvalue, utf8string);
} else {
filteredEventsThreshold = DEFAULT_THRESHOLD;
}
(*env)->DeleteLocalRef(env, name);
}
if (filteredEventsThreshold <= 0)
return;
if (event->type == KeyPressEventType || event->type == KeyReleaseEventType) {
if (isEventFiltered) {
filteredEventsCount++;
} else {
filteredEventsCount = 0;
}
if (filteredEventsCount > filteredEventsThreshold) {
JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
JNU_CallStaticMethodByName(env, NULL, "sun/awt/X11InputMethod", "recreateAllXIC", "()V");
filteredEventsCount = 0;
}
}
}
/*
* Class: sun_awt_X11_XlibWrapper
* Method: XFilterEvent
@@ -667,10 +722,8 @@ JNIEXPORT jboolean JNICALL Java_sun_awt_X11_XlibWrapper_XFilterEvent
return (jboolean)True;
}
#endif
XEvent* const xEvent = (XEvent *)jlong_to_ptr(ptr);
const jboolean isEventFiltered = (jboolean) XFilterEvent(xEvent, (Window) window);
jboolean isEventFiltered = (jboolean) XFilterEvent((XEvent *) jlong_to_ptr(ptr), (Window) window);
checkBrokenInputMethod((XEvent *)jlong_to_ptr(ptr), isEventFiltered);
return isEventFiltered;
}

View File

@@ -515,15 +515,7 @@ MsgRouting AwtFrame::WmMouseMove(UINT flags, int x, int y) {
* If this Frame is non-focusable then we should implement move and size operation for it by
* ourselfves because we don't dispatch appropriate mouse messages to default window procedure.
*/
if (isInManualMoveOrSize) {
if (grabbedHitTest == HTCAPTION) {
WINDOWPLACEMENT placement;
::GetWindowPlacement(GetHWnd(), &placement);
if (placement.showCmd == SW_SHOWMAXIMIZED) {
placement.showCmd = SW_SHOWNORMAL;
::SetWindowPlacement(GetHWnd(), &placement);
}
}
if (!IsFocusableWindow() && isInManualMoveOrSize) {
DWORD curPos = ::GetMessagePos();
x = GET_X_LPARAM(curPos);
y = GET_Y_LPARAM(curPos);
@@ -635,29 +627,12 @@ MsgRouting AwtFrame::WmNcMouseDown(WPARAM hitTest, int x, int y, int button) {
// Do not handle events from caption itself to preserve native drag behavior
if (HasCustomDecoration()) {
switch (hitTest) {
case HTCAPTION:
case HTMINBUTTON:
case HTMAXBUTTON:
case HTCLOSE:
case HTMENU:
RECT rcWindow;
GetWindowRect(GetHWnd(), &rcWindow);
if (hitTest == HTCAPTION) {
JNIEnv *env = (JNIEnv *) JNU_GetEnv(jvm, JNI_VERSION_1_2);
jint customSpot = JNU_CallMethodByName(env, NULL, GetTarget(env),
"hitTestCustomDecoration", "(II)I",
ScaleDownX(x - rcWindow.left),
ScaleDownY(y - rcWindow.top)).i;
if (customSpot == java_awt_Window_CustomWindowDecoration_DRAGGABLE_AREA) {
if (button & LEFT_BUTTON) {
savedMousePos.x = x;
savedMousePos.y = y;
::SetCapture(GetHWnd());
isInManualMoveOrSize = TRUE;
grabbedHitTest = hitTest;
}
} else break;
}
WmMouseDown(GetButtonMK(button),
x - rcWindow.left,
y - rcWindow.top,
@@ -1808,7 +1783,6 @@ LRESULT HitTestNCA(AwtFrame* frame, int x, int y) {
frame->ScaleDownY(y - rcWindow.top)).i;
switch (customSpot) {
case java_awt_Window_CustomWindowDecoration_NO_HIT_SPOT:
case java_awt_Window_CustomWindowDecoration_DRAGGABLE_AREA:
break; // Nothing
case java_awt_Window_CustomWindowDecoration_MINIMIZE_BUTTON:
return HTMINBUTTON;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2014, 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
@@ -70,12 +70,10 @@ typedef struct tagBitmapheader {
jfieldID AwtTrayIcon::idID;
jfieldID AwtTrayIcon::actionCommandID;
jmethodID AwtTrayIcon::updateImageID;
HWND AwtTrayIcon::sm_msgWindow = NULL;
AwtTrayIcon::TrayIconListItem* AwtTrayIcon::sm_trayIconList = NULL;
int AwtTrayIcon::sm_instCount = 0;
bool AwtTrayIcon::m_bDPIChanged = false;
/************************************************************************
* AwtTrayIcon methods
@@ -223,18 +221,6 @@ void AwtTrayIcon::InitNID(UINT uID)
m_nid.uVersion = NOTIFYICON_VERSION;
}
// Call updateImage() method on the peer when screen scale changes
void AwtTrayIcon::UpdateImage()
{
JNIEnv *env =(JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
jobject peer = GetPeer(env);
if (peer != NULL) {
env->CallVoidMethod(peer, updateImageID);
env->ExceptionClear();
}
}
BOOL AwtTrayIcon::SendTrayMessage(DWORD dwMessage)
{
return Shell_NotifyIcon(dwMessage, (PNOTIFYICONDATA)&m_nid);
@@ -262,10 +248,6 @@ LRESULT CALLBACK AwtTrayIcon::TrayWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam
}
}
break;
case WM_DPICHANGED:
// Set the flag to update icon images, see WmTaskbarCreated
m_bDPIChanged = true;
break;
default:
if(uMsg == s_msgTaskbarCreated) {
if (hwnd == AwtTrayIcon::sm_msgWindow) {
@@ -492,17 +474,12 @@ MsgRouting AwtTrayIcon::WmContextMenu(UINT flags, int x, int y)
MsgRouting AwtTrayIcon::WmTaskbarCreated() {
TrayIconListItem* item;
for (item = sm_trayIconList; item != NULL; item = item->m_next) {
if (m_bDPIChanged) {
// Update the icon image
item->m_trayIcon->UpdateImage();
}
BOOL result = item->m_trayIcon->SendTrayMessage(NIM_ADD);
// 6270114: Instructs the taskbar to behave according to the Shell version 5.0
if (result) {
item->m_trayIcon->SendTrayMessage(NIM_SETVERSION);
}
}
m_bDPIChanged = false;
return mrDoDefault;
}
@@ -940,14 +917,6 @@ Java_java_awt_TrayIcon_initIDs(JNIEnv *env, jclass cls)
DASSERT(AwtTrayIcon::actionCommandID != NULL);
CHECK_NULL( AwtTrayIcon::actionCommandID);
jclass wPeerCls = env->FindClass("sun/awt/windows/WTrayIconPeer");
DASSERT(wPeerCls != NULL);
CHECK_NULL(wPeerCls);
AwtTrayIcon::updateImageID = env->GetMethodID(wPeerCls, "updateImage", "()V");
DASSERT(AwtTrayIcon::updateImageID != NULL);
CHECK_NULL(AwtTrayIcon::updateImageID);
CATCH_BAD_ALLOC;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2008, 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
@@ -86,8 +86,6 @@ public:
void DisplayMessage(LPCTSTR caption, LPCTSTR text, LPCTSTR msgType);
void UpdateImage();
// Adds to the head of the list
INLINE void AddTrayIconItem(UINT id) {
TrayIconListItem* item = new TrayIconListItem(id, this);
@@ -123,7 +121,6 @@ public:
*/
static jfieldID idID;
static jfieldID actionCommandID;
static jmethodID updateImageID;
// ************************
@@ -154,8 +151,6 @@ private:
TrayIconListItem* m_next;
};
static bool m_bDPIChanged;
public:
static TrayIconListItem* sm_trayIconList;
};

View File

@@ -60,6 +60,7 @@ import java.util.stream.Collectors;
import jdk.internal.module.Checks;
import jdk.internal.module.DefaultRoots;
import jdk.internal.module.IllegalAccessMaps;
import jdk.internal.module.Modules;
import jdk.internal.module.ModuleHashes;
import jdk.internal.module.ModuleInfo.Attributes;
@@ -621,6 +622,9 @@ public final class SystemModulesPlugin extends AbstractPlugin {
// generate moduleReads
genModuleReads(cw, cf);
// generate concealedPackagesToOpen and exportedPackagesToOpen
genXXXPackagesToOpenMethods(cw);
return cw;
}
@@ -851,6 +855,16 @@ public final class SystemModulesPlugin extends AbstractPlugin {
generate(cw, "moduleReads", map, true);
}
/**
* Generate concealedPackagesToOpen and exportedPackagesToOpen methods.
*/
private void genXXXPackagesToOpenMethods(ClassWriter cw) {
ModuleFinder finder = finderOf(moduleInfos);
IllegalAccessMaps maps = IllegalAccessMaps.generate(finder);
generate(cw, "concealedPackagesToOpen", maps.concealedPackagesToOpen(), false);
generate(cw, "exportedPackagesToOpen", maps.exportedPackagesToOpen(), false);
}
/**
* Generate method to return {@code Map<String, Set<String>>}.
*

View File

@@ -24,59 +24,19 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* Custom window decoration allows merging of window content with native title bar,
* which is usually done by treating title bar as part of client area, but with some
* special behavior like dragging or maximizing on double click.
* @implNote Behavior is platform-dependent, only macOS and Windows are supported.
*/
public interface CustomWindowDecoration {
/*CONST java.awt.Window.*_HIT_SPOT*/
/*CONST java.awt.Window.*_BUTTON*/
/*CONST java.awt.Window.MENU_BAR*/
/*CONST java.awt.Window.DRAGGABLE_AREA*/
/**
* Turn custom decoration on or off, {@link #setCustomDecorationTitleBarHeight(Window, int)}
* must be called to configure title bar height.
*/
void setCustomDecorationEnabled(Window window, boolean enabled);
/**
* @see #setCustomDecorationEnabled(Window, boolean)
*/
boolean isCustomDecorationEnabled(Window window);
/**
* Set list of hit test spots for a custom decoration.
* Hit test spot is a special area inside custom-decorated title bar.
* Each hit spot type has its own (probably platform-specific) behavior:
* <ul>
* <li>{@link #NO_HIT_SPOT} - default title bar area, can be dragged to move a window, maximizes on double-click</li>
* <li>{@link #OTHER_HIT_SPOT} - generic hit spot, window cannot be moved with drag or maximized on double-click</li>
* <li>{@link #MINIMIZE_BUTTON} - like {@link #OTHER_HIT_SPOT} but displays tooltip on Windows when hovered</li>
* <li>{@link #MAXIMIZE_BUTTON} - like {@link #OTHER_HIT_SPOT} but displays tooltip / snap layout menu on Windows when hovered</li>
* <li>{@link #CLOSE_BUTTON} - like {@link #OTHER_HIT_SPOT} but displays tooltip on Windows when hovered</li>
* <li>{@link #MENU_BAR} - currently no different from {@link #OTHER_HIT_SPOT}</li>
* <li>{@link #DRAGGABLE_AREA} - special type, moves window when dragged, but doesn't maximize on double-click</li>
* </ul>
* @param spots pairs of hit spot shapes with corresponding types.
* @implNote Hit spots are tested in sequence, so in case of overlapping areas, first found wins.
*/
void setCustomDecorationHitTestSpots(Window window, List<Map.Entry<Shape, Integer>> spots);
/**
* @see #setCustomDecorationHitTestSpots(Window, List)
*/
List<Map.Entry<Shape, Integer>> getCustomDecorationHitTestSpots(Window window);
/**
* Set height of custom window decoration, won't take effect until custom decoration
* is enabled via {@link #setCustomDecorationEnabled(Window, boolean)}.
*/
void setCustomDecorationTitleBarHeight(Window window, int height);
/**
* @see #setCustomDecorationTitleBarHeight(Window, int)
*/
int getCustomDecorationTitleBarHeight(Window window);

View File

@@ -6,9 +6,9 @@
# 2. When only new API is added, or some existing API was @Deprecated - increment MINOR, reset PATCH to 0
# 3. For major backwards incompatible API changes - increment MAJOR, reset MINOR and PATCH to 0
VERSION = 0.0.6
VERSION = 0.0.5
# Hash is used to track changes to jetbrains.api, so you would not forget to update version when needed.
# When you make any changes, "make jbr-api" will fail and ask you to update hash and version number here.
HASH = 2E2A7E994CCF6D942FB9EB347C8EA4
HASH = 2F4DD7564F018A0AB7CD8DFF010E3B4

View File

@@ -678,7 +678,6 @@ javax/security/auth/kerberos/KerberosTixDateTest.java 8039280 generic-
sun/security/provider/PolicyFile/GrantAllPermToExtWhenNoPolicy.java 8039280 generic-all
sun/security/provider/PolicyParser/ExtDirsChange.java 8039280 generic-all
sun/security/provider/PolicyParser/PrincipalExpansionError.java 8039280 generic-all
sun/security/ssl/SSLSessionImpl/NoInvalidateSocketException.java 8277970 linux-all,macosx-x64
############################################################################

View File

@@ -42,8 +42,6 @@ import javax.imageio.ImageIO;
* @key headful
* @bug 8215105 8211999
* @summary tests that Robot can capture the common colors without artifacts
* @run main/othervm CheckCommonColors
* @run main/othervm -Xcheck:jni CheckCommonColors
*/
public final class CheckCommonColors {

View File

@@ -1,128 +0,0 @@
/*
* Copyright (c) 2022, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 8255439
* @key headful
* @library /java/awt/regtesthelpers
* @build PassFailJFrame
* @summary To test tray icon scaling with on-the-fly DPI/Scale changes on Windows
* @run main/manual TrayIconScalingTest
* @requires (os.family == "windows")
*/
import java.awt.AWTException;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.RenderingHints;
import java.awt.SystemTray;
import java.awt.TrayIcon;
import java.awt.font.TextLayout;
import java.awt.image.BaseMultiResolutionImage;
import java.awt.image.BufferedImage;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
public class TrayIconScalingTest {
private static SystemTray tray;
private static TrayIcon icon;
private static final String INSTRUCTIONS =
"This test checks if the tray icon gets updated when DPI / Scale" +
" is changed on the fly.\n\n" +
"STEPS: \n\n" +
"1. Check the system tray / notification area on Windows" +
" taskbar, you should see a white icon which displays a" +
" number.\n\n" +
"2. Navigate to Settings > System > Display and change the" +
" display scale by selecting any value from" +
" Scale & Layout dropdown.\n\n"+
"3. When the scale changes, check the white tray icon," +
" there should be no distortion, it should be displayed sharp,\n" +
" and the displayed number should correspond to the current"+
" scale:\n" +
" 100% - 16, 125% - 20, 150% - 24, 175% - 28, 200% - 32.\n\n"+
" If the icon is displayed sharp and without any distortion," +
" press PASS, otherwise press FAIL.\n";
private static final Font font = new Font("Dialog", Font.BOLD, 12);
public static void main(String[] args)
throws InterruptedException, InvocationTargetException {
// check if SystemTray supported on the machine
if (!SystemTray.isSupported()) {
System.out.println("SystemTray is not supported");
return;
}
PassFailJFrame passFailJFrame = new PassFailJFrame("TrayIcon " +
"Test Instructions", INSTRUCTIONS, 8, 18, 85);
createAndShowGUI();
try {
passFailJFrame.awaitAndCheck();
} finally {
tray.remove(icon);
}
}
private static void createAndShowGUI() {
ArrayList<Image> imageList = new ArrayList<>();
for (int size = 16; size <= 48; size += 4) {
imageList.add(createIcon(size));
}
Image mRImage =
new BaseMultiResolutionImage(imageList.toArray(new Image[0]));
tray = SystemTray.getSystemTray();
icon = new TrayIcon(mRImage);
try {
tray.add(icon);
} catch (AWTException e) {
throw new RuntimeException("Error while adding icon to system tray");
}
}
private static Image createIcon(int size) {
BufferedImage image = new BufferedImage(size, size,
BufferedImage.TYPE_INT_ARGB);
Graphics2D g = image.createGraphics();
g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
g.setColor(Color.WHITE);
g.fillRect(0, 0, size, size);
g.setFont(font);
g.setColor(Color.BLACK);
TextLayout layout = new TextLayout(String.valueOf(size),
g.getFont(), g.getFontRenderContext());
int height = (int) layout.getBounds().getHeight();
int width = (int) layout.getBounds().getWidth();
layout.draw(g, (size - width) / 2f - 1, (size + height) / 2f);
g.dispose();
return image;
}
}

View File

@@ -1,321 +0,0 @@
/*
* Copyright (c) 2022, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Frame;
import java.awt.Toolkit;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.Timer;
import static javax.swing.SwingUtilities.invokeAndWait;
import static javax.swing.SwingUtilities.isEventDispatchThread;
public class PassFailJFrame {
private static final String TITLE = "Test Instruction Frame";
private static final long TEST_TIMEOUT = 5;
private static final int ROWS = 10;
private static final int COLUMNS = 40;
private static final List<Frame> frameList = new ArrayList<>();
private static final Timer timer = new Timer(0, null);
private static final CountDownLatch latch = new CountDownLatch(1);
private static volatile boolean failed;
private static volatile boolean timeout;
private static volatile String testFailedReason;
private static JFrame frame;
public enum Position {HORIZONTAL, VERTICAL}
public PassFailJFrame(String instructions) throws InterruptedException,
InvocationTargetException {
this(instructions, TEST_TIMEOUT);
}
public PassFailJFrame(String instructions, long testTimeOut) throws
InterruptedException, InvocationTargetException {
this(TITLE, instructions, testTimeOut);
}
public PassFailJFrame(String title, String instructions,
long testTimeOut) throws InterruptedException,
InvocationTargetException {
this(title, instructions, testTimeOut, ROWS, COLUMNS);
}
/**
* Constructs a JFrame with a given title & serves as test instructional
* frame where the user follows the specified test instruction in order
* to test the test case & mark the test pass or fail. If the expected
* result is seen then the user click on the 'Pass' button else click
* on the 'Fail' button and the reason for the failure should be
* specified in the JDialog JTextArea.
*
* @param title title of the Frame.
* @param instructions the instruction for the tester on how to test
* and what is expected (pass) and what is not
* expected (fail).
* @param testTimeOut test timeout where time is specified in minutes.
* @param rows number of visible rows of the JTextArea where the
* instruction is show.
* @param columns Number of columns of the instructional
* JTextArea
* @throws InterruptedException exception thrown when thread is
* interrupted
* @throws InvocationTargetException if an exception is thrown while
* creating the test instruction frame on
* EDT
*/
public PassFailJFrame(String title, String instructions, long testTimeOut,
int rows, int columns) throws InterruptedException,
InvocationTargetException {
if (isEventDispatchThread()) {
createUI(title, instructions, testTimeOut, rows, columns);
} else {
invokeAndWait(() -> createUI(title, instructions, testTimeOut,
rows, columns));
}
}
private static void createUI(String title, String instructions,
long testTimeOut, int rows, int columns) {
frame = new JFrame(title);
frame.setLayout(new BorderLayout());
JTextArea instructionsText = new JTextArea(instructions, rows, columns);
instructionsText.setEditable(false);
instructionsText.setLineWrap(true);
long tTimeout = TimeUnit.MINUTES.toMillis(testTimeOut);
final JLabel testTimeoutLabel = new JLabel(String.format("Test " +
"timeout: %s", convertMillisToTimeStr(tTimeout)), JLabel.CENTER);
final long startTime = System.currentTimeMillis();
timer.setDelay(1000);
timer.addActionListener((e) -> {
long leftTime = tTimeout - (System.currentTimeMillis() - startTime);
if ((leftTime < 0) || failed) {
timer.stop();
testFailedReason = "Failure Reason:\n"
+ "Timeout User did not perform testing.";
timeout = true;
latch.countDown();
}
testTimeoutLabel.setText(String.format("Test timeout: %s", convertMillisToTimeStr(leftTime)));
});
timer.start();
frame.add(testTimeoutLabel, BorderLayout.NORTH);
frame.add(new JScrollPane(instructionsText), BorderLayout.CENTER);
JButton btnPass = new JButton("Pass");
btnPass.addActionListener((e) -> {
latch.countDown();
timer.stop();
});
JButton btnFail = new JButton("Fail");
btnFail.addActionListener((e) -> {
getFailureReason();
timer.stop();
});
JPanel buttonsPanel = new JPanel();
buttonsPanel.add(btnPass);
buttonsPanel.add(btnFail);
frame.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
super.windowClosing(e);
testFailedReason = "Failure Reason:\n"
+ "User closed the instruction Frame";
failed = true;
latch.countDown();
}
});
frame.add(buttonsPanel, BorderLayout.SOUTH);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
frameList.add(frame);
}
private static String convertMillisToTimeStr(long millis) {
if (millis < 0) {
return "00:00:00";
}
long hours = millis / 3_600_000;
long minutes = (millis - hours * 3_600_000) / 60_000;
long seconds = (millis - hours * 3_600_000 - minutes * 60_000) / 1_000;
return String.format("%02d:%02d:%02d", hours, minutes, seconds);
}
/**
* Wait for the user decision i,e user selects pass or fail button.
* If user does not select pass or fail button then the test waits for
* the specified timeoutMinutes period and the test gets timeout.
* Note: This method should be called from main() thread
*
* @throws InterruptedException exception thrown when thread is
* interrupted
* @throws InvocationTargetException if an exception is thrown while
* disposing of frames on EDT
*/
public void awaitAndCheck() throws InterruptedException, InvocationTargetException {
if (isEventDispatchThread()) {
throw new IllegalStateException("awaitAndCheck() should not be called on EDT");
}
latch.await();
invokeAndWait(PassFailJFrame::disposeFrames);
if (timeout) {
throw new RuntimeException(testFailedReason);
}
if (failed) {
throw new RuntimeException("Test failed! : " + testFailedReason);
}
System.out.println("Test passed!");
}
/**
* Dispose all the frame(s) i,e both the test instruction frame as
* well as the frame that is added via addTestFrame(Frame frame)
*/
private static synchronized void disposeFrames() {
for (Frame f : frameList) {
f.dispose();
}
}
/**
* Read the test failure reason and add the reason to the test result
* example in the jtreg .jtr file.
*/
private static void getFailureReason() {
final JDialog dialog = new JDialog(frame, "Test Failure ", true);
dialog.setTitle("Failure reason");
JPanel jPanel = new JPanel(new BorderLayout());
JTextArea jTextArea = new JTextArea(5, 20);
JButton okButton = new JButton("OK");
okButton.addActionListener((ae) -> {
testFailedReason = "Failure Reason:\n" + jTextArea.getText();
dialog.setVisible(false);
});
jPanel.add(new JScrollPane(jTextArea), BorderLayout.CENTER);
JPanel okayBtnPanel = new JPanel();
okayBtnPanel.add(okButton);
jPanel.add(okayBtnPanel, BorderLayout.SOUTH);
dialog.add(jPanel);
dialog.setLocationRelativeTo(frame);
dialog.pack();
dialog.setVisible(true);
failed = true;
dialog.dispose();
latch.countDown();
}
/**
* Position the instruction frame with testFrame ( testcase created
* frame) by the specified position
* Note: This method should be invoked from the method that creates
* testFrame
*
* @param testFrame test frame that the test is created
* @param position position can be either HORIZONTAL (both test
* instruction frame and test frame as arranged side by
* side or VERTICAL ( both test instruction frame and
* test frame as arranged up and down)
*/
public static void positionTestFrame(Frame testFrame, Position position) {
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
if (position.equals(Position.HORIZONTAL)) {
int newX = ((screenSize.width / 2) - frame.getWidth());
frame.setLocation(newX, frame.getY());
testFrame.setLocation((frame.getLocation().x + frame.getWidth() + 5), frame.getY());
} else if (position.equals(Position.VERTICAL)) {
int newY = ((screenSize.height / 2) - frame.getHeight());
frame.setLocation(frame.getX(), newY);
testFrame.setLocation(frame.getX(),
(frame.getLocation().y + frame.getHeight() + 5));
}
}
/**
* Add the testFrame to the frameList so that test instruction frame
* and testFrame and any other frame used in this test is disposed
* via disposeFrames()
*
* @param testFrame testFrame that needs to be disposed
*/
public static synchronized void addTestFrame(Frame testFrame) {
frameList.add(testFrame);
}
/**
* Forcibly pass the test.
* <p>The sample usage:
* <pre><code>
* PrinterJob pj = PrinterJob.getPrinterJob();
* if (pj == null || pj.getPrintService() == null) {
* System.out.println(""Printer not configured or available.");
* PassFailJFrame.forcePass();
* }
* </code></pre>
*/
public static void forcePass() {
latch.countDown();
}
/**
* Forcibly fail the test.
*/
public static void forceFail() {
failed = true;
latch.countDown();
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2022, 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
@@ -22,7 +22,7 @@
*/
/* @test
* @bug 7132924 8285515
* @bug 7132924
* @library /test/lib
* @key intermittent
* @summary Test DatagramChannel.disconnect when DatagramChannel is connected to an IPv4 socket

View File

@@ -35,11 +35,9 @@ jbr-${jbsdk_version}-linux-aarch64-b${build_number}.tar.gz
jbr-${jbsdk_version}-linux-musl-aarch64-b${build_number}.tar.gz
jbr-${jbsdk_version}-linux-musl-x64-b${build_number}.tar.gz
jbr-${jbsdk_version}-linux-x64-b${build_number}.tar.gz
jbr-${jbsdk_version}-linux-x86-b${build_number}.tar.gz
jbr-${jbsdk_version}-osx-aarch64-b${build_number}.tar.gz
jbr-${jbsdk_version}-osx-x64-b${build_number}.tar.gz
jbr-${jbsdk_version}-windows-x64-b${build_number}.tar.gz
jbr-${jbsdk_version}-windows-x86-b${build_number}.tar.gz
jbr_fd-${jbsdk_version}-linux-aarch64-b${build_number}.tar.gz
jbr_fd-${jbsdk_version}-linux-x64-b${build_number}.tar.gz
@@ -64,21 +62,17 @@ jbrsdk-${jbsdk_version}-linux-aarch64-b${build_number}.tar.gz
jbrsdk-${jbsdk_version}-linux-musl-aarch64-b${build_number}.tar.gz
jbrsdk-${jbsdk_version}-linux-musl-x64-b${build_number}.tar.gz
jbrsdk-${jbsdk_version}-linux-x64-b${build_number}.tar.gz
jbrsdk-${jbsdk_version}-linux-x86-b${build_number}.tar.gz
jbrsdk-${jbsdk_version}-osx-aarch64-b${build_number}.tar.gz
jbrsdk-${jbsdk_version}-osx-x64-b${build_number}.tar.gz
jbrsdk-${jbsdk_version}-windows-x64-b${build_number}.tar.gz
jbrsdk-${jbsdk_version}-windows-x86-b${build_number}.tar.gz
jbrsdk-${jbsdk_version}-linux-test-aarch64-b${build_number}.tar.gz
jbrsdk-${jbsdk_version}-linux-musl-test-aarch64-b${build_number}.tar.gz
jbrsdk-${jbsdk_version}-linux-musl-test-x64-b${build_number}.tar.gz
jbrsdk-${jbsdk_version}-linux-test-x64-b${build_number}.tar.gz
jbrsdk-${jbsdk_version}-linux-test-x86-b${build_number}.tar.gz
jbrsdk-${jbsdk_version}-osx-test-aarch64-b${build_number}.tar.gz
jbrsdk-${jbsdk_version}-osx-test-x64-b${build_number}.tar.gz
jbrsdk-${jbsdk_version}-windows-test-x64-b${build_number}.tar.gz
jbrsdk-${jbsdk_version}-windows-test-x86-b${build_number}.tar.gz
jbrsdk-${jbsdk_version}-linux-aarch64-fastdebug-b${build_number}.tar.gz
jbrsdk-${jbsdk_version}-linux-x64-fastdebug-b${build_number}.tar.gz
@@ -92,7 +86,6 @@ jbrsdk-${jbsdk_version}-linux-musl-aarch64-b${build_number}_diz.tar.gz
jbrsdk-${jbsdk_version}-linux-musl-x64-b${build_number}_diz.tar.gz
jbrsdk-${jbsdk_version}-linux-x64-b${build_number}_diz.tar.gz
jbrsdk-${jbsdk_version}-linux-x64-fastdebug-b${build_number}_diz.tar.gz
jbrsdk-${jbsdk_version}-linux-x86-b${build_number}_diz.tar.gz
jbrsdk-${jbsdk_version}-osx-aarch64-b${build_number}_diz.tar.gz
jbrsdk-${jbsdk_version}-osx-aarch64-fastdebug-b${build_number}_diz.tar.gz
jbrsdk-${jbsdk_version}-osx-x64-b${build_number}_diz.tar.gz
@@ -106,7 +99,7 @@ jbrsdk_jcef-${jbsdk_version}-osx-x64-b${build_number}.pkg
jbrsdk_jcef-${jbsdk_version}-osx-x64-b${build_number}.tar.gz
jbrsdk_jcef-${jbsdk_version}-windows-x64-b${build_number}.tar.gz
jbrsdk_jcef-${jbsdk_version}-linux-aarch64-b${build_number}_diz.tar.gz
jbrsdk_jcef-${jbsdk_version}-linux-aarcb${build_number}_diz.tar.gz
jbrsdk_jcef-${jbsdk_version}-linux-x64-b${build_number}_diz.tar.gz
jbrsdk_jcef-${jbsdk_version}-osx-aarch64-b${build_number}_diz.tar.gz
jbrsdk_jcef-${jbsdk_version}-osx-x64-b${build_number}_diz.tar.gz

View File

@@ -21,8 +21,6 @@ import java.awt.Desktop;
import java.awt.Robot;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
/**
* @test
@@ -35,10 +33,7 @@ import java.util.concurrent.TimeUnit;
*/
public class AboutHandlerTest {
private static CountDownLatch doneSignal = new CountDownLatch(1);
private static final int WAIT_TIME = 3000;
private static final int WAIT_TIME = 1000;
private static Robot robot;
@@ -50,11 +45,9 @@ public class AboutHandlerTest {
robot = new Robot();
robot.setAutoDelay(50);
long starttime = System.currentTimeMillis();
Desktop.getDesktop().setAboutHandler(e -> {
System.out.println("AboutHandler hits");
testPassed = true;
doneSignal.countDown();
});
SwingUtilities.invokeLater(() -> {
@@ -62,9 +55,8 @@ public class AboutHandlerTest {
});
// waiting for AboutHandler
doneSignal.await(WAIT_TIME, TimeUnit.SECONDS);
long endtime = System.currentTimeMillis();
System.out.println("Duration (milisec): " + (endtime - starttime));
sleep(WAIT_TIME);
myApp.dispose();
if (!testPassed)
@@ -93,4 +85,8 @@ public class AboutHandlerTest {
robot.keyPress(KeyEvent.VK_ENTER);
robot.keyRelease(KeyEvent.VK_ENTER);
}
private static void sleep(int millis) throws InterruptedException {
Thread.sleep(millis);
}
}

View File

@@ -1,93 +0,0 @@
/*
* Copyright 2022 JetBrains s.r.o.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.util.concurrent.atomic.AtomicInteger;
/**
* @test
* @summary Regression test for JBR-4546 Focus is not returned back to IDE after closing "Open" dialog
* @key headful
*/
public class FileDialogClosing {
private static final AtomicInteger pressedCount = new AtomicInteger();
private static Robot robot;
private static Frame frame;
private static Button button;
public static void main(String[] args) throws Exception {
robot = new Robot();
try {
SwingUtilities.invokeAndWait(FileDialogClosing::initUI);
robot.delay(1000);
clickOn(button);
robot.delay(1000);
pressAndRelease(KeyEvent.VK_ESCAPE);
robot.delay(1000);
pressAndRelease(KeyEvent.VK_SPACE);
robot.delay(1000);
if (pressedCount.get() != 2) {
throw new RuntimeException("Unexpected pressed count: " + pressedCount);
}
} finally {
SwingUtilities.invokeAndWait(FileDialogClosing::disposeUI);
}
}
private static void initUI() {
frame = new Frame("FileDialogClosing");
button = new Button("Open dialog");
button.addActionListener(e -> {
pressedCount.incrementAndGet();
new FileDialog(frame).setVisible(true);
});
frame.add(button);
frame.setBounds(200, 200, 200, 200);
frame.setVisible(true);
}
private static void disposeUI() {
if (frame != null) frame.dispose();
}
private static void clickAt(int x, int y) {
robot.mouseMove(x, y);
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
}
private static void clickOn(Component component) {
Point location = component.getLocationOnScreen();
clickAt(location.x + component.getWidth() / 2, location.y + component.getHeight() / 2);
}
private static void pressAndRelease(int keyCode) {
robot.keyPress(keyCode);
robot.keyRelease(keyCode);
}
}

View File

@@ -0,0 +1,59 @@
/*
* Copyright (c) 2017, 2021, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* @test
* @bug 8266851
* @library /test/lib
* @build JbrIllegalAccessTest
* @run testng JbrIllegalAccessTest
* @summary Make sure that --jbr-illegal-access is working.
*/
import jdk.test.lib.process.*;
import org.testng.annotations.*;
/**
* Make sure that --jbr-illegal-access is working as expected.
*/
@Test
public class JbrIllegalAccessTest {
void run(String text, String... vmopts)
throws Exception
{
var outputAnalyzer = ProcessTools
.executeTestJava(vmopts)
.outputTo(System.out)
.errorTo(System.out);
outputAnalyzer.shouldNotContain(text);
}
public void testObsolete() throws Exception {
run("Unrecognized option: --jbr-illegal-access",
"-XX:-IgnoreUnrecognizedVMOptions",
"--jbr-illegal-access", "--version");
}
}

View File

@@ -2,10 +2,3 @@ java/awt/Toolkit/LWCToolkitInvokeAndWaitTest.java nobug macosx-all,linux-all,w
java/awt/Toolkit/AWTThreadingTest.java nobug macosx-all,linux-all,windows-all
java/awt/Toolkit/AWTThreadingCMenuTest.java nobug macosx-all,linux-all,windows-all
sanity/client/SwingSet/src/TreeDemoTest.java JBR-3389 macosx-all
java/awt/Focus/WindowUpdateFocusabilityTest/WindowUpdateFocusabilityTest.java nobug macosx-all,linux-all,windows-all
java/awt/List/NofocusListDblClickTest/NofocusListDblClickTest.java nobug macosx-all,linux-all,windows-all
javax/swing/JInternalFrame/Test6505027.java nobug macosx-all,linux-all,windows-all
javax/swing/JPopupMenu/4634626/bug4634626.java nobug macosx-all,linux-all,windows-all
javax/swing/JPopupMenu/4966112/bug4966112.java nobug macosx-all,linux-all,windows-all
jb/java/awt/Desktop/AboutHandlerTest.java nobug macosx-all,linux-all,windows-all
sun/java2d/GdiRendering/InsetClipping.java nobug macosx-all,linux-all,windows-all

View File

@@ -124,7 +124,6 @@ java/awt/Frame/MaximizedUndecorated/MaximizedUndecorated.java 8022302 generic-al
java/awt/FileDialog/FileDialogIconTest/FileDialogIconTest.java 8160558 windows-all
java/awt/event/MouseWheelEvent/InfiniteRecursion/InfiniteRecursion.java 8060176 windows-all,macosx-all
java/awt/event/MouseWheelEvent/InfiniteRecursion/InfiniteRecursion_1.java 8060176 windows-all,macosx-all
java/awt/event/MouseWheelEvent/InfiniteRecursion/InfiniteRecursion_4.java 8204200 windows-all,linux-all
java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java 8159694 linux-all
java/awt/dnd/MissingEventsOnModalDialog/MissingEventsOnModalDialogTest.java 8164464 linux-all,macosx-all
java/awt/dnd/URIListBetweenJVMsTest/URIListBetweenJVMsTest.java 8171510,JBR-881 macosx-all,linux-all
@@ -246,9 +245,9 @@ sun/awt/datatransfer/SuplementaryCharactersTransferTest.java 8011371 generic-all
sun/awt/shell/ShellFolderMemoryLeak.java 8197794 windows-all
sun/java2d/DirectX/OnScreenRenderingResizeTest/OnScreenRenderingResizeTest.java 8022403 generic-all
sun/java2d/DirectX/OverriddenInsetsTest/OverriddenInsetsTest.java 8196102 generic-all
sun/java2d/DirectX/RenderingToCachedGraphicsTest/RenderingToCachedGraphicsTest.java 8196180,8252812 windows-all,macosx-all,linux-all
sun/java2d/DirectX/RenderingToCachedGraphicsTest/RenderingToCachedGraphicsTest.java 8196180 windows-all,macosx-all
java/awt/Graphics2D/CopyAreaOOB.java 7001973 windows-all,macosx-all,linux-all
java/awt/Graphics2D/DrawString/DrawRotatedStringUsingRotatedFont.java 8266283,JBR-3770 linux-aarch64,macosx-all
java/awt/Graphics2D/DrawString/DrawRotatedStringUsingRotatedFont.java 8266283 generic-all
sun/java2d/SunGraphics2D/EmptyClipRenderingTest.java 8144029 macosx-all,linux-all,windows-all
sun/java2d/SunGraphics2D/DrawImageBilinear.java 8191406 generic-all
sun/java2d/SunGraphics2D/PolyVertTest.java 6986565 generic-all
@@ -739,7 +738,6 @@ javax/sound/midi/Sequencer/MetaCallback.java 8178698 linux-all
javax/swing/plaf/basic/BasicComboPopup/JComboBoxPopupLocation/JComboBoxPopupLocation.java 8194945 macosx-all
javax/swing/plaf/basic/BasicMenuUI/4983388/bug4983388.java 8253184 windows-all
javax/swing/plaf/basic/BasicTextUI/8001470/bug8001470.java 8233177 linux-all,windows-all
javax/swing/plaf/nimbus/TestNimbusOverride.java 8253184 windows-all
javax/swing/border/TestTitledBorderLeak.java 8213531 linux-all,windows-all
javax/swing/JButton/8151303/PressedIconTest.java 8266246 macosx-aarch64

View File

@@ -2,5 +2,4 @@ java/awt/dnd/DragInterceptorAppletTest/DragInterceptorAppletTest.java
java/awt/dnd/FileListBetweenJVMsTest/FileListBetweenJVMsTest.java JBR-1011 generic-all
java/awt/SplashScreen/MultiResolutionSplash/MultiResolutionSplashTest.java 8279190 linux-all,windows-all,macosx-all
java/awt/Mouse/GetMousePositionTest/GetMousePositionWithPopup.java 8282232 windows-all
java/awt/Frame/RestoreToOppositeScreen/RestoreToOppositeScreen.java 8286840 linux-all
jb/java/awt/Window/ZOrderOnModalDialogActivation.java JBR-4494 windows-all,linux-all
java/awt/Frame/RestoreToOppositeScreen/RestoreToOppositeScreen.java 8286840 linux-all

View File

@@ -54,21 +54,20 @@ import java.lang.reflect.Method;
import java.util.HashSet;
import java.util.Objects;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import javax.imageio.ImageIO;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.Timer;
import javax.swing.WindowConstants;
public class RenderPerfTest {
private static HashSet<String> ignoredTests = new HashSet<>();
static {
// add ignored tests here
// ignoredTests.add("testMyIgnoredTest");
ignoredTests.add("testWiredBoxAA");
}
private final static int N = 1000;
@@ -77,14 +76,12 @@ public class RenderPerfTest {
private final static float R = 25;
private final static int BW = 50;
private final static int BH = 50;
private final static int COUNT = 600;
private final static int CYCLE_DELAY = 3;
private final static int MAX_FRAME_CYCLES = 3000/CYCLE_DELAY;
private final static int COUNT = 300;
private final static int DELAY = 10;
private final static int RESOLUTION = 5;
private final static int COLOR_TOLERANCE = 10;
private final static int MAX_MEASURE_CYCLES = 6000/CYCLE_DELAY;
private final static int MAX_MEASURE_TIME = 5000;
private final static Color[] marker = {Color.RED, Color.BLUE, Color.GREEN, Color.YELLOW, Color.ORANGE, Color.MAGENTA};
interface Configurable {
void configure(Graphics2D g2d);
@@ -279,7 +276,6 @@ public class RenderPerfTest {
@Override
public void render(Graphics2D g2d, int id, float[] x, float[] y, float[] vx, float[] vy) {
setPaint(g2d, id);
if (id % 100 != 0) return;
Font font = new Font("LucidaGrande", Font.PLAIN, 32);
g2d.setFont(font);
g2d.drawString("The quick brown fox jumps over the lazy dog",
@@ -603,24 +599,24 @@ public class RenderPerfTest {
static class PerfMeter {
private String name;
private int frame = 0;
private JPanel panel;
private long time;
private double execTime = 0;
private AtomicInteger markerIdx = new AtomicInteger(0);
private int renderedMarkerIdx = -1;
private AtomicLong markerPaintTime = new AtomicLong(0);
private Color expColor = Color.RED;
AtomicBoolean waiting = new AtomicBoolean(false);
private double fps;
private int skippedFrame = 0;
PerfMeter(String name) {
this.name = name;
}
PerfMeter exec(final Renderable renderable) throws Exception {
final CountDownLatch latch = new CountDownLatch(COUNT);
final CountDownLatch latchFrame = new CountDownLatch(1);
final long endTime = System.currentTimeMillis() + MAX_MEASURE_TIME;
final JFrame f = new JFrame();
f.addWindowListener(new WindowAdapter() {
@@ -634,27 +630,22 @@ public class RenderPerfTest {
@Override
public void run() {
panel = new JPanel() {
panel = new JPanel()
{
@Override
protected void paintComponent(Graphics g) {
super.paintComponent(g);
int idx = markerIdx.get();
if (idx != renderedMarkerIdx) {
markerPaintTime.set(System.nanoTime());
}
super.paintComponent(g);
time = System.nanoTime();
Graphics2D g2d = (Graphics2D) g.create();
renderable.setup(g2d);
renderable.render(g2d);
g2d.setClip(null);
g2d.setPaintMode();
g2d.setColor(marker[idx]);
g2d.fillRect(0, 0, BW, BH);
renderedMarkerIdx = idx;
g2d.setColor(expColor);
g.fillRect(0, 0, BW, BH);
}
};
panel.setPreferredSize(new Dimension((int) (WIDTH + BW), (int) (HEIGHT + BH)));
panel.setPreferredSize(new Dimension((int)(WIDTH + BW), (int)(HEIGHT + BH)));
panel.setBackground(Color.BLACK);
f.add(panel);
f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
@@ -662,51 +653,51 @@ public class RenderPerfTest {
f.setVisible(true);
}
});
Robot robot = new Robot();
int cycle = 0;
int frame = 0;
long paintTime = 0;
int maxFrameCycle = -1;
while (frame < COUNT) {
long t;
if ((t = markerPaintTime.getAndSet(0)) > 0) {
paintTime = t;
maxFrameCycle = cycle + MAX_FRAME_CYCLES;
}
if (paintTime > 0) {
Timer timer = new Timer(DELAY, e -> {
if (waiting.compareAndSet(false, true)) {
Color c = robot.getPixelColor(
panel.getTopLevelAncestor().getX() + panel.getTopLevelAncestor().getInsets().left + BW / 2,
panel.getTopLevelAncestor().getY() + panel.getTopLevelAncestor().getInsets().top + BW / 2);
if (isAlmostEqual(c, marker[markerIdx.get()])) {
execTime += System.nanoTime() - paintTime;
frame++;
paintTime = 0;
maxFrameCycle = -1;
markerIdx.accumulateAndGet(marker.length, (x, y) -> (x + 1) % y);
renderable.update();
panel.getParent().repaint();
} else if (cycle >= maxFrameCycle) {
skippedFrame++;
paintTime = 0;
maxFrameCycle = -1;
markerIdx.accumulateAndGet(marker.length, (x, y) -> (x + 1) % y);
panel.getParent().repaint();
if (isAlmostEqual(c, Color.BLUE)) {
expColor = Color.RED;
} else {
expColor = Color.BLUE;
}
renderable.update();
panel.getParent().repaint();
} else {
while (!isAlmostEqual(
robot.getPixelColor(
panel.getTopLevelAncestor().getX() + panel.getTopLevelAncestor().getInsets().left + BW/2,
panel.getTopLevelAncestor().getY() + panel.getTopLevelAncestor().getInsets().top + BH/2),
expColor))
{
try {
Thread.sleep(RESOLUTION);
} catch (InterruptedException ex) {
ex.printStackTrace();
}
}
time = System.nanoTime() - time;
execTime += time;
frame++;
waiting.set(false);
}
try {
Thread.sleep(CYCLE_DELAY);
} catch (InterruptedException ex) {
ex.printStackTrace();
if (System.currentTimeMillis() < endTime) {
latch.countDown();
} else {
while(latch.getCount() > 0) latch.countDown();
}
if (cycle >= MAX_MEASURE_CYCLES) {
break;
}
cycle++;
}
});
timer.start();
latch.await();
SwingUtilities.invokeAndWait(() -> {
timer.stop();
f.setVisible(false);
f.dispose();
});
@@ -722,15 +713,12 @@ public class RenderPerfTest {
}
private void report() {
if (skippedFrame > 0) {
System.err.println(skippedFrame + " frame(s) skipped");
}
System.err.println(name + " : " + String.format("%.2f FPS", fps));
}
private boolean isAlmostEqual(Color c1, Color c2) {
return Math.abs(c1.getRed() - c2.getRed()) < COLOR_TOLERANCE &&
Math.abs(c1.getGreen() - c2.getGreen()) < COLOR_TOLERANCE &&
return Math.abs(c1.getRed() - c2.getRed()) < COLOR_TOLERANCE ||
Math.abs(c1.getGreen() - c2.getGreen()) < COLOR_TOLERANCE ||
Math.abs(c1.getBlue() - c2.getBlue()) < COLOR_TOLERANCE;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2019, 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
@@ -54,14 +54,15 @@ public class Distrust {
// Each of the roots have a test certificate chain stored in a file
// named "<root>-chain.pem".
private static String[] rootsToTest = new String[] {
"geotrustprimarycag2", "geotrustprimarycag3",
"geotrustglobalca", "geotrustprimarycag2", "geotrustprimarycag3",
"geotrustuniversalca", "thawteprimaryrootca", "thawteprimaryrootcag2",
"thawteprimaryrootcag3", "verisignclass3g3ca", "verisignclass3g4ca",
"verisignclass3g5ca", "verisignuniversalrootca" };
// Each of the subCAs with a delayed distrust date have a test certificate
// chain stored in a file named "<subCA>-chain.pem".
private static String[] subCAsToTest = new String[]{"appleistca8g1"};
private static String[] subCAsToTest = new String[] {
"appleistca2g1", "appleistca8g1" };
// A date that is after the restrictions take affect
private static final Date APRIL_17_2019 =
@@ -179,11 +180,6 @@ public class Distrust {
throw new Exception("chain should be invalid");
}
} catch (CertificateException ce) {
// expired TLS certificates should not be treated as failure
if (expired(ce)) {
System.err.println("Test is N/A, chain is expired");
return;
}
if (valid) {
throw new Exception("Unexpected exception, chain " +
"should be valid", ce);
@@ -191,7 +187,6 @@ public class Distrust {
if (ce instanceof ValidatorException) {
ValidatorException ve = (ValidatorException)ce;
if (ve.getErrorType() != ValidatorException.T_UNTRUSTED_CERT) {
ce.printStackTrace(System.err);
throw new Exception("Unexpected exception: " + ce);
}
} else {
@@ -200,21 +195,6 @@ public class Distrust {
}
}
// check if a cause of exception is an expired cert
private static boolean expired(CertificateException ce) {
if (ce instanceof CertificateExpiredException) {
return true;
}
Throwable t = ce.getCause();
while (t != null) {
if (t instanceof CertificateExpiredException) {
return true;
}
t = t.getCause();
}
return false;
}
private static X509Certificate[] loadCertificateChain(String name)
throws Exception {
try (InputStream in = new FileInputStream(TEST_SRC + File.separator +

View File

@@ -0,0 +1,80 @@
-----BEGIN CERTIFICATE-----
MIIGGzCCBQOgAwIBAgIITJltLCqcD0gwDQYJKoZIhvcNAQELBQAwYjEcMBoGA1UE
AxMTQXBwbGUgSVNUIENBIDIgLSBHMTEgMB4GA1UECxMXQ2VydGlmaWNhdGlvbiBB
dXRob3JpdHkxEzARBgNVBAoTCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTMB4XDTE5
MDEwODIxMTcxNFoXDTIwMDgwODIxMjcwMFowgaoxSjBIBgNVBAMMQWFjdGl2ZS5n
ZW90cnVzdC1nbG9iYWwtY2EudGVzdC1wYWdlcy5jZXJ0aWZpY2F0ZW1hbmFnZXIu
YXBwbGUuY29tMSUwIwYDVQQLDBxtYW5hZ2VtZW50OmlkbXMuZ3JvdXAuODY0ODU5
MRMwEQYDVQQKDApBcHBsZSBJbmMuMRMwEQYDVQQIDApDYWxpZm9ybmlhMQswCQYD
VQQGEwJVUzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMCjFUrVHTEX
0aVU6x9LiGa6oVr9blaCsMFrLicPQguc43Vs/pN+g4jzRXsTSMe9XefezBQb6tzZ
SMRXVB4kWMr4K1BVgQDkXeyoh4KrXRkdEF9ZIJPNxwTmmYUOc5M6NOYwkLelYz+t
7n1iNIGylbjwU4qwauElk2alFVqYTEPDLzwvqVDb9jMAJ8MPSDjfUlXW0XD9oXZM
hC+8LU9JBgJ3YBdzRHa4WnrudUbWjspqaNfAYpVIX0cfCJKnMsKqaSKjS4pIRtWm
L6NlCTCoIMyOh+wmbWPPX24H2D3+ump5FA35fRYbVznmosl5n1AK34S9tD4XZ7lO
WZKfaFi1liMCAwEAAaOCAoowggKGMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgwFoAU
2HqURHyQcJAWnt0XnAFEA4bWKikwfgYIKwYBBQUHAQEEcjBwMDQGCCsGAQUFBzAC
hihodHRwOi8vY2VydHMuYXBwbGUuY29tL2FwcGxlaXN0Y2EyZzEuZGVyMDgGCCsG
AQUFBzABhixodHRwOi8vb2NzcC5hcHBsZS5jb20vb2NzcDAzLWFwcGxlaXN0Y2Ey
ZzEwMTBMBgNVHREERTBDgkFhY3RpdmUuZ2VvdHJ1c3QtZ2xvYmFsLWNhLnRlc3Qt
cGFnZXMuY2VydGlmaWNhdGVtYW5hZ2VyLmFwcGxlLmNvbTCB/wYDVR0gBIH3MIH0
MIHxBgoqhkiG92NkBQsEMIHiMIGkBggrBgEFBQcCAjCBlwyBlFJlbGlhbmNlIG9u
IHRoaXMgY2VydGlmaWNhdGUgYnkgYW55IHBhcnR5IGFzc3VtZXMgYWNjZXB0YW5j
ZSBvZiBhbnkgYXBwbGljYWJsZSB0ZXJtcyBhbmQgY29uZGl0aW9ucyBvZiB1c2Ug
YW5kL29yIGNlcnRpZmljYXRpb24gcHJhY3RpY2Ugc3RhdGVtZW50cy4wOQYIKwYB
BQUHAgEWLWh0dHA6Ly93d3cuYXBwbGUuY29tL2NlcnRpZmljYXRlYXV0aG9yaXR5
L3JwYTAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEwNwYDVR0fBDAwLjAs
oCqgKIYmaHR0cDovL2NybC5hcHBsZS5jb20vYXBwbGVpc3RjYTJnMS5jcmwwHQYD
VR0OBBYEFP0qkmFJhArI0MsfW0V+/wY9x4GSMA4GA1UdDwEB/wQEAwIFoDANBgkq
hkiG9w0BAQsFAAOCAQEATjT8M0bIq+mFc8k5cd4KDjCMBjYl/l3/8zKlWYGP+nl1
KRogXcGRa3LcfpdJcqgMrx8e9Xohduvl8MBzwv671rYkppzZdsmZdLVorAdbL5GL
suhTjAS5yL3NBWNMRpeOgFsVr7YtPDEvo3CFsnzjg7THe0S6Y35oYukJtUzGUvSY
kC3ApBTdjj0vAeow+dbt+AHKnQiEnon4ToSFmtnkru08Uxe7uyHCQ2sLUg0EPYc9
t9I8lviaHfK/mQoCzlme2O/H5Rher8dXCv8hVT1NKbsi28EpgpqcTLS+hn/Edc/q
4dPDoO1Ozs+ixRzFeMpA+JrnAyARb6qbSrAPBgtIbQ==
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIEQDCCAyigAwIBAgIDAjp0MA0GCSqGSIb3DQEBCwUAMEIxCzAJBgNVBAYTAlVT
MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
YWwgQ0EwHhcNMTQwNjE2MTU0MjAyWhcNMjIwNTIwMTU0MjAyWjBiMRwwGgYDVQQD
ExNBcHBsZSBJU1QgQ0EgMiAtIEcxMSAwHgYDVQQLExdDZXJ0aWZpY2F0aW9uIEF1
dGhvcml0eTETMBEGA1UEChMKQXBwbGUgSW5jLjELMAkGA1UEBhMCVVMwggEiMA0G
CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDQk6EdR0MgFrILa+vD1bTox5jN896/
6E3p4zaAB/xFG2p8RYauVtOkCX9hDWtdflJrfbTIOcT0Zzr3g84Zb4YvfkV+Rxxn
UsqVBV3iNlGFwNRngDVvFd0+/R3S/Y80UNjsdiq+49Pa5P3I6ygClhGXF2Ec6cRZ
O0LcMtEJHdqm0UOG/16yvIzPZtsBiwKulEjzOI/96jKoCOyGl1GUJD5JSZZT6Hmh
QIHpBbuTlVH84/18EUv3ngizFUkVB/nRN6CbSzL2tcTcatH8Cu324MUpoKiLcf4N
krz+VHAYCm3H7Qz7yS0Gw4yF/MuGXNY2jhKLCX/7GRo41fCUMHoPpozzAgMBAAGj
ggEdMIIBGTAfBgNVHSMEGDAWgBTAephojYn7qwVkDBF9qn1luMrMTjAdBgNVHQ4E
FgQU2HqURHyQcJAWnt0XnAFEA4bWKikwEgYDVR0TAQH/BAgwBgEB/wIBADAOBgNV
HQ8BAf8EBAMCAQYwNQYDVR0fBC4wLDAqoCigJoYkaHR0cDovL2cuc3ltY2IuY29t
L2NybHMvZ3RnbG9iYWwuY3JsMC4GCCsGAQUFBwEBBCIwIDAeBggrBgEFBQcwAYYS
aHR0cDovL2cuc3ltY2QuY29tMEwGA1UdIARFMEMwQQYKYIZIAYb4RQEHNjAzMDEG
CCsGAQUFBwIBFiVodHRwOi8vd3d3Lmdlb3RydXN0LmNvbS9yZXNvdXJjZXMvY3Bz
MA0GCSqGSIb3DQEBCwUAA4IBAQAWR3NvhaJi4ecqdruJlUIml7xKrKxwUzo/MYM9
PByrmuKxXRx2GqA8DHJXvtOeUODImdZY1wLqzg0pVHzN9cLGkClVo28UqAtCDTqY
bQZ4nvBqox0CCqIopI3CgUY+bWfa3j/+hQ5CKhLetbf7uBunlux3n+zUU5V6/wf0
8goUwFFSsdaOUAsamVy8C8m97e34XsFW201+I6QRoSzUGwWa5BtS9nw4mQVLunKN
QolgBGYq9P1o12v3mUEo1mwkq+YlUy7Igpnioo8jvjCDsSeL+mh/AUnoxphrEC6Y
XorXykuxx8lYmtA225aV7LaB5PLNbxt5h0wQPInkTfpU3Kqm
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT
MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
YWwgQ0EwHhcNMDIwNTIxMDQwMDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQG
EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UEAxMSR2VvVHJ1c3Qg
R2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2swYYzD9
9BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjoBbdq
fnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDv
iS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU
1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+
bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5aszPeE4uwc2hGKceeoW
MPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTA
ephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVkDBF9qn1l
uMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKIn
Z57QzxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfS
tQWVYrmm3ok9Nns4d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcF
PseKUgzbFbS9bZvlxrFUaKnjaZC2mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Un
hw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6pXE0zX5IJL4hmXXeXxx12E6nV
5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvmMw==
-----END CERTIFICATE-----

View File

@@ -0,0 +1,66 @@
-----BEGIN CERTIFICATE-----
MIIHBjCCBe6gAwIBAgIQanINWwJAuap0V7lFjnfUwTANBgkqhkiG9w0BAQsFADBE
MQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEdMBsGA1UEAxMU
R2VvVHJ1c3QgU1NMIENBIC0gRzMwHhcNMTcwNTAzMDAwMDAwWhcNMjAwNTAyMjM1
OTU5WjCBkTELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNV
BAcMDU1vdW50YWluIFZpZXcxFzAVBgNVBAoMDkdlb1RydXN0LCBJbmMuMRgwFgYD
VQQLDA9Sb290IDEwIC0gVkFMSUQxIjAgBgNVBAMMGXZhbGlkLXJvb3QxMC5nZW90
cnVzdC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDTegUYhAh0
P7aF6jzk8dit4Vzddo3hM+J7Eak/+N1sqVUS2HpNd7VO50FrbEWKIRusv7QNtlpY
1Cgrla8M4RAhCB0wkkHXZ1Evz6E1AEFQqNSjyuRQxeEXl+xCL+MF+yAMhDRnHh+E
eSJ3ie0T66saOyaLM9fPpr3xomAQ/IRlP1atJ/Z8XbPo25HuxwzxiWFW+RjwVIfI
gxHz4Okwc1uImDUIDlEu9Uaqqb4jHhxU1EkKMmgEncpqwCROcZMujUkogfB49Z7+
K17r6ARIrUuxqfNPrPwe+O88WgIeDSWffPM67UlvtomZOwuTNdv9OoCX1wUCLS7m
/gZ3rqqqeJvfAgMBAAGjggOkMIIDoDAkBgNVHREEHTAbghl2YWxpZC1yb290MTAu
Z2VvdHJ1c3QuY29tMAkGA1UdEwQCMAAwDgYDVR0PAQH/BAQDAgWgMCsGA1UdHwQk
MCIwIKAeoByGGmh0dHA6Ly9nbi5zeW1jYi5jb20vZ24uY3JsMIGdBgNVHSAEgZUw
gZIwgY8GBmeBDAECAjCBhDA/BggrBgEFBQcCARYzaHR0cHM6Ly93d3cuZ2VvdHJ1
c3QuY29tL3Jlc291cmNlcy9yZXBvc2l0b3J5L2xlZ2FsMEEGCCsGAQUFBwICMDUM
M2h0dHBzOi8vd3d3Lmdlb3RydXN0LmNvbS9yZXNvdXJjZXMvcmVwb3NpdG9yeS9s
ZWdhbDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwHwYDVR0jBBgwFoAU
0m/3lvSFP3I8MH0j2oV4m6N8WnwwVwYIKwYBBQUHAQEESzBJMB8GCCsGAQUFBzAB
hhNodHRwOi8vZ24uc3ltY2QuY29tMCYGCCsGAQUFBzAChhpodHRwOi8vZ24uc3lt
Y2IuY29tL2duLmNydDCCAfUGCisGAQQB1nkCBAIEggHlBIIB4QHfAHUA3esdK3oN
T6Ygi4GtgWhwfi6OnQHVXIiNPRHEzbbsvswAAAFbz9h5vQAABAMARjBEAiAx/C0U
5NdHxK4v2oHnstYksb1Vny8PcQkSvgpx9PsZEwIgNTOU70Zc5szG23xdbvtoH5lN
SAoVswiF5gFQS5MGu1sAdgCkuQmQtBhYFIe7E6LMZ3AKPDWYBPkb37jjd80OyA3c
EAAAAVvP2HnZAAAEAwBHMEUCIFGjB8r2H0VDwTUE/aY/Mv+M97sqAvEP1doOcHpg
0qyfAiEArw/S2F7OEcmKGUY1WRBuApfAx5d7hzrTSV/jZv95qJwAdgDuS723dc5g
uuFCaR+r4Z5mow9+X7By2IMAxHuJeqj9ywAAAVvP2HoDAAAEAwBHMEUCIQCH6MFZ
tZF3Cqukt3/69fkU0Y5ePXXx8+xkOXRsIG3EGgIgSmCBWrnmPiiGA3x5QP8I8m4r
Uee0y7s4NQNwjMgHrjwAdgC8eOHfxfY8aEZJM02hD6FfCXlpIAnAgbTz9pF/Ptm4
pQAAAVvP2HqcAAAEAwBHMEUCIA8e2kAVYYuQCtn4PqK98BuHnLm9rC40DboFLCle
SmQsAiEApbCJR05hr9VkNWmjaaUUGGZdVyUu9XX504LHVWyXZDUwDQYJKoZIhvcN
AQELBQADggEBAEtfBfZ2y5uTohvW3h00Kcuop6Nq7Y59GU3MeizPKtx48DB8qHyd
y5bLFwXzsGA1WkwpKzPbROsTGcAAXJHh03bj24AemUr/J/eQcjkfSoNBdHDpiSsk
VZkQK2fGJDiYJ/r9mxKZcgd2pyN3l2OtVtNMv2dnFGF35UkkeqO3jqImwbypAmRX
HdQV9dvW2YDRjzkebNNey6UwY9+YTSzr4da2hcaMHrj588Eqa4DDgNcY9QnE2RzN
giArA+4RlM4AZ3jC2A756I67hrlvH+lhumHLp06hGfMiQJF1aaauFVSa36HKc3C/
ty+sLdJbemEJLAr8uNXggFD+U8TKw1S4LSw=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIETzCCAzegAwIBAgIDAjpvMA0GCSqGSIb3DQEBCwUAMEIxCzAJBgNVBAYTAlVT
MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
YWwgQ0EwHhcNMTMxMTA1MjEzNjUwWhcNMjIwNTIwMjEzNjUwWjBEMQswCQYDVQQG
EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEdMBsGA1UEAxMUR2VvVHJ1c3Qg
U1NMIENBIC0gRzMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDjvn4K
hqPPa209K6GXrUkkTdd3uTR5CKWeop7eRxKSPX7qGYax6E89X/fQp3eaWx8KA7UZ
U9ulIZRpY51qTJEMEEe+EfpshiW3qwRoQjgJZfAU2hme+msLq2LvjafvY3AjqK+B
89FuiGdT7BKkKXWKp/JXPaKDmJfyCn3U50NuMHhiIllZuHEnRaoPZsZVP/oyFysx
j0ag+mkUfJ2fWuLrM04QprPtd2PYw5703d95mnrU7t7dmszDt6ldzBE6B7tvl6QB
I0eVH6N3+liSxsfQvc+TGEK3fveeZerVO8rtrMVwof7UEJrwEgRErBpbeFBFV0xv
vYDLgVwts7x2oR5lAgMBAAGjggFKMIIBRjAfBgNVHSMEGDAWgBTAephojYn7qwVk
DBF9qn1luMrMTjAdBgNVHQ4EFgQU0m/3lvSFP3I8MH0j2oV4m6N8WnwwEgYDVR0T
AQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8EBAMCAQYwNgYDVR0fBC8wLTAroCmgJ4Yl
aHR0cDovL2cxLnN5bWNiLmNvbS9jcmxzL2d0Z2xvYmFsLmNybDAvBggrBgEFBQcB
AQQjMCEwHwYIKwYBBQUHMAGGE2h0dHA6Ly9nMi5zeW1jYi5jb20wTAYDVR0gBEUw
QzBBBgpghkgBhvhFAQc2MDMwMQYIKwYBBQUHAgEWJWh0dHA6Ly93d3cuZ2VvdHJ1
c3QuY29tL3Jlc291cmNlcy9jcHMwKQYDVR0RBCIwIKQeMBwxGjAYBgNVBAMTEVN5
bWFudGVjUEtJLTEtNTM5MA0GCSqGSIb3DQEBCwUAA4IBAQCg1Pcs+3QLf2TxzUNq
n2JTHAJ8mJCi7k9o1CAacxI+d7NQ63K87oi+fxfqd4+DYZVPhKHLMk9sIb7SaZZ9
Y73cK6gf0BOEcP72NZWJ+aZ3sEbIu7cT9clgadZM/tKO79NgwYCA4ef7i28heUrg
3Kkbwbf7w0lZXLV3B0TUl/xJAIlvBk4BcBmsLxHA4uYPL4ZLjXvDuacu9PGsFj45
SVGeF0tPEDpbpaiSb/361gsDTUdWVxnzy2v189bPsPX1oxHSIFMTNDcFLENaY9+N
QNaFHlHpURceA1bJ8TCt55sRornQMYGbaLHZ6PPmlH7HrhMvh+3QJbBo+d4IWvMp
zNSS
-----END CERTIFICATE-----