Compare commits

...

19 Commits
1094 ... 1129

Author SHA1 Message Date
Phil Race
b89727c009 JBR-2790 backport the fix from OpenJDK
8244818: Java2D Queue Flusher crash while moving application window to external monitor

Reviewed-by: serb, jdv, kcr
2020-10-16 14:37:21 +07:00
Vitaly Provodin
57aba29aa5 JBR-2762 add patch fixing DCEVM JVM Crashes on sun.instrument.InstrumentationImpl.retransformClasses method 2020-10-16 14:34:50 +07:00
Vitaly Provodin
738c94f743 JBR-2787 fix copying jcef files into jbr/jbrsdk binaries
(cherry picked from commit fcc56cc8a2)
2020-10-16 14:34:47 +07:00
Rajan Halade
bd27263ec7 JBR-2774 Backport: Updated GetPolicyQualifiers.java test
8254081: java/security/cert/PolicyNode/GetPolicyQualifiers.java fails due to an expired certificate

Perform backdated validation of test certificate.

Reviewed-by: mullan, xuelei
2020-10-09 16:25:53 +07:00
Vitaly Provodin
27eafd8a53 Remove jogl and gluegen modules from module-info and modules list
These modules will be added via patch during building corresponding JBR binaries
2020-10-06 07:18:50 +07:00
Anton Tarasov
96da1139c0 Add jogl and gluegen modules to support jcef osr mode
OSR - off-screen rendering
2020-10-05 20:52:49 +03:00
Vitaly Provodin
668570bc61 JBR-2758 refactor building scripts to apply patches adding required modules instead of excluding them 2020-10-05 17:03:54 +07:00
Vitaly Provodin
d3ec3d899d JBR-2736 provide writeObjects implementation for copying files/folders (fix review notes) 2020-10-02 13:52:15 +07:00
Mikhail Grishchenko
d1479872f2 JBR-2412 [windows] mouse listener does not work for jcef
added regression test
2020-09-30 19:43:42 +07:00
Mikhail Grishchenko
e8e4741bb0 JBR-2639 [win] jcef does not recognize vertical mouse wheel events
added regression test
2020-09-30 12:53:32 +07:00
Andrey Starovoyt
33db034d49 JBR-2736 provide writeObjects implementation for copying files/folders from Project Explorer to the Finder 2020-09-30 06:50:13 +07:00
Vitaly Provodin
8b7ad2e58f updated JTreg exclude list 2020-09-29 06:20:36 +07:00
Artem Semenov
696a9a4128 JR-CR-667 JBR-2738 Create a test for JTable Accessibility 2020-09-28 13:01:39 +03:00
Artem Semenov
54bb49caeb Review JR-CR-645 JBR-2504 A11y Create a test to test the accessibility of lists on MAc
(cherry picked from commit 92e40bf92c00fb5ce46dff41fc23ad39e460fcc1)
2020-09-25 12:55:34 +03:00
Vitaly Provodin
9c0afe3a7d updated JTreg exclude list 2020-09-24 05:04:33 +07:00
Dmitry Batrak
6dd334f9f0 JBR-2648 Cannot input Japanese and Chinese text in Search Everywhere
code being removed (added to fix JRE-665) is not needed after JBR-2533 fix, as 'simple' windows are natively focused now
2020-09-23 17:27:37 +03:00
Dmitry Batrak
96dd8fcf48 JBR-2735 PopupIncomingFocusTest is failing on KDE when launched via jtreg 2020-09-23 12:47:19 +03:00
Egor Ushakov
9b960dd02a navigation to issues from vcs log 2020-09-16 15:38:20 +03:00
Mikhail Grishchenko
6b7d5fd58c updated JTreg exclude list 2020-09-16 16:25:07 +07:00
33 changed files with 950 additions and 592 deletions

14
.idea/vcs.xml generated
View File

@@ -1,5 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="IssueNavigationConfiguration">
<option name="links">
<list>
<IssueNavigationLink>
<option name="issueRegexp" value="[A-Z]+\-\d+" />
<option name="linkRegexp" value="http://youtrack.jetbrains.com/issue/$0" />
</IssueNavigationLink>
<IssueNavigationLink>
<option name="issueRegexp" value="(\d+)\:" />
<option name="linkRegexp" value="https://bugs.openjdk.java.net/browse/JDK-$1" />
</IssueNavigationLink>
</list>
</option>
</component>
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>

View File

@@ -8,6 +8,5 @@ RUN wget https://bintray.com/jetbrains/intellij-jbr/download_file?file_path=jbrs
-O - | tar xz -C /
ENV JAVA_HOME /jbrsdk
ENV PATH $JAVA_HOME/bin:/opt/rh/devtoolset-8/root/usr/bin:$PATH
RUN mkdir .git
RUN git config user.email "builduser@jetbrains.com"
RUN git config user.name "builduser"
RUN git config --global user.email "teamcity@buildserver.intellij.net"
RUN git config --global user.name "builduser"

View File

@@ -1,3 +1,16 @@
VENDOR_NAME="JetBrains s.r.o."
VENDOR_VERSION_STRING="JBR-${JBSDK_VERSION_WITH_DOTS}.${JDK_BUILD_NUMBER}-${build_number}"
[ -z ${bundle_type} ] || VENDOR_VERSION_STRING="${VENDOR_VERSION_STRING}-${bundle_type}"
do_reset_changes=0
do_reset_dcevm=0
HEAD_REVISION=0
function do_exit() {
exit_code=$1
[ $do_reset_changes -eq 1 ] && git checkout HEAD modules.list src/java.desktop/share/classes/module-info.java
if [ $do_reset_dcevm -eq 1 ]; then
[ ! -z $HEAD_REVISION ] && git reset --hard $HEAD_REVISION
fi
exit $exit_code
}

View File

@@ -1,10 +0,0 @@
#!/bin/bash -x
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
script_dir=jb/project/tools/linux/scripts
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jcef" || exit $?
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx" || exit $?
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "dcevm" || exit $?
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx_jcef" || exit $?

View File

@@ -1,12 +1,16 @@
#!/bin/bash -x
# The following parameters must be specified:
# 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
# JBSDK_VERSION - specifies major version of OpenJDK e.g. 11_0_6 (instead of dots '.' underbars "_" are used)
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
# bundle_type - specifies bundle to bu built; possible values:
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
# jfx - the bundle 1) jbr with javafx only will be created
# bundle_type - specifies bundle to be built; possible values:
# jcef - the release bundles with jcef
# jfx - the release bundles with javafx
# jcef_jfx - the release bundles with jcef and javafx
# dcevm - the release bundles with dcevm patches
# nomod - the release bundles without any additional modules (jcef)
# fd - the fastdebug bundles which also include the jcef module
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
@@ -19,8 +23,8 @@
# Environment variables:
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
# By default imported modules should be located in ./modular-sdk
# JCEF_PATH - specifies the path to the directory where JCEF binaries are located.
# By default imported modules should be located in ./jcef_linux_x64
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
# By default JCEF binaries should be located in ./jcef_linux_x64
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
@@ -34,65 +38,81 @@ source jb/project/tools/common.sh
function create_jbr {
case "$1" in
"${bundle_type}_lw")
JBR_BASE_NAME=jbr_${bundle_type}_lw-${JBSDK_VERSION}
grep -v "jdk.compiler\|jdk.hotspot.agent" modules.list > modules_tmp.list
;;
"jfx" | "jcef" | "dcevm" | "nomod")
JBR_BUNDLE=jbr_${bundle_type}
case "${bundle_type}" in
"jfx" | "jcef" | "dcevm" | "nomod" | "fd")
JBR_BASE_NAME=jbr_${bundle_type}-${JBSDK_VERSION}
cat modules.list > modules_tmp.list
;;
"jfx_jcef")
JBR_BASE_NAME=jbr-${JBSDK_VERSION}
cat modules.list > modules_tmp.list
;;
*)
echo "***ERR*** bundle was not specified" && exit 1
echo "***ERR*** bundle was not specified" && do_exit 1
;;
esac
cat modules.list > modules_tmp.list
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
JBR=$JBR_BASE_NAME-linux-x64-b$build_number
JBR=${JBR_BASE_NAME}-linux-x64-b${build_number}
echo Running jlink....
$JSDK/bin/jlink \
--module-path $JSDK/jmods --no-man-pages --compress=2 \
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output $BASE_DIR/$JBR_BUNDLE
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output $BASE_DIR/$JBR_BUNDLE || do_exit $?
if [[ "$bundle_type" == *jcef* ]] || [[ "$bundle_type" == *dcevm* ]]; then
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]] || [[ "${bundle_type}" == fd ]]; then
cp -R $BASE_DIR/$JBR_BUNDLE $BASE_DIR/jbr
cp -R ${JCEF_PATH}/* $BASE_DIR/$JBR_BUNDLE/lib || exit $?
rsync -av ${JCEF_PATH}/ $BASE_DIR/$JBR_BUNDLE/lib --exclude="modular-sdk" || do_exit $?
fi
grep -v "^JAVA_VERSION" $JSDK/release | grep -v "^MODULES" >> $BASE_DIR/$JBR_BUNDLE/release
echo Creating $JBR.tar.gz ...
echo Creating ${JBR}.tar.gz ...
rm -rf ${BASE_DIR}/jbr
cp -R ${BASE_DIR}/${JBR_BUNDLE} ${BASE_DIR}/jbr
tar -pcf $JBR.tar -C $BASE_DIR jbr || exit $?
gzip $JBR.tar || exit $?
tar -pcf ${JBR}.tar -C ${BASE_DIR} jbr || do_exit $?
gzip -f ${JBR}.tar || do_exit $?
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
}
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
WITH_DEBUG_LEVEL="--with-debug-level=release"
RELEASE_NAME=linux-x86_64-normal-server-release
git checkout -- modules.list src/java.desktop/share/classes/module-info.java
JBSDK=${JBRSDK_BASE_NAME}-linux-x64-b${build_number}
case "$bundle_type" in
"jfx")
git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch
git apply -p0 < jb/project/tools/patches/add_jfx_module.patch || do_exit $?
do_reset_changes=1
;;
"jcef")
git apply -p0 < jb/project/tools/patches/exclude_jfx_module.patch
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
do_reset_changes=1
;;
"jfx_jcef")
git apply -p0 < jb/project/tools/patches/add_jfx_module.patch || do_exit $?
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
do_reset_changes=1
;;
"dcevm")
git am jb/project/tools/patches/dcevm/*.patch
HEAD_REVISION=$(git rev-parse HEAD)
git am jb/project/tools/patches/dcevm/*.patch || do_exit $?
do_reset_dcevm=1
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
do_reset_changes=1
;;
"nomod")
git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch
git apply -p0 < jb/project/tools/patches/exclude_jfx_module.patch
WITH_IMPORT_MODULES=""
;;
"fd")
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
do_reset_changes=1
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
RELEASE_NAME=linux-x86_64-normal-server-fastdebug
JBSDK=${JBRSDK_BASE_NAME}-linux-x64-fastdebug-b${build_number}
;;
*)
echo "***ERR*** bundle was not specified" && do_exit 1
;;
esac
sh configure \
@@ -104,44 +124,44 @@ sh configure \
--with-version-build=${JDK_BUILD_NUMBER} \
--with-version-opt=b${build_number} \
$WITH_IMPORT_MODULES \
--enable-cds=yes || exit $?
--enable-cds=yes || do_exit $?
make images CONF=$RELEASE_NAME || exit $?
make clean images CONF=$RELEASE_NAME || do_exit $?
JSDK=build/$RELEASE_NAME/images/jdk
JBSDK=$JBRSDK_BASE_NAME-linux-x64-b$build_number
JSDK=build/${RELEASE_NAME}/images/jdk
echo Fixing permissions
chmod -R a+r $JSDK
BASE_DIR=build/$RELEASE_NAME/images
BASE_DIR=build/${RELEASE_NAME}/images
JBRSDK_BUNDLE=jbrsdk
rm -rf $BASE_DIR/$JBRSDK_BUNDLE
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || exit $?
rm -rf ${BASE_DIR}/${JBRSDK_BUNDLE}
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || do_exit $?
if [[ "$bundle_type" == *jcef* ]] || [[ "$bundle_type" == *dcevm* ]]; then
cp -R ${JCEF_PATH}/* $BASE_DIR/$JBRSDK_BUNDLE/lib || exit $?
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]] || [[ "${bundle_type}" == fd ]]; then
rsync -av ${JCEF_PATH}/ $BASE_DIR/$JBRSDK_BUNDLE/lib --exclude="modular-sdk" || do_exit $?
fi
if [ "$bundle_type" == "jfx_jcef" ]; then
if [ "${bundle_type}" == "jcef" ] || [ "${bundle_type}" == "fd" ]; then
echo Creating $JBSDK.tar.gz ...
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/release > release
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/release
tar -pcf $JBSDK.tar --exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man \
-C $BASE_DIR $JBRSDK_BUNDLE || exit $?
gzip $JBSDK.tar || exit $?
tar -pcf ${JBSDK}.tar --exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man \
-C ${BASE_DIR} ${JBRSDK_BUNDLE} || do_exit $?
gzip -f ${JBSDK}.tar || do_exit $?
fi
JBR_BUNDLE=jbr_${bundle_type}
create_jbr ${bundle_type}
create_jbr || do_exit $?
if [ "$bundle_type" == "jfx_jcef" ]; then
make test-image || exit $?
if [ "$bundle_type" == "jcef" ]; then
make test-image CONF=$RELEASE_NAME || do_exit $?
JBRSDK_TEST=$JBRSDK_BASE_NAME-linux-test-x64-b$build_number
echo Creating $JBSDK_TEST.tar.gz ...
tar -pcf $JBRSDK_TEST.tar -C $BASE_DIR --exclude='test/jdk/demos' test || exit $?
gzip $JBRSDK_TEST.tar || exit $?
fi
tar -pcf ${JBRSDK_TEST}.tar -C ${BASE_DIR} --exclude='test/jdk/demos' test || do_exit $?
gzip -f ${JBRSDK_TEST}.tar || do_exit $?
fi
do_exit 0

View File

@@ -1,90 +0,0 @@
#!/bin/bash -x
# The following parameters must be specified:
# 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
# bundle_type - specifies bundle to bu built; possible values:
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
# jfx - the bundle 1) jbr with javafx only will be created
#
# 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)
#
# Environment variables:
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
# By default imported modules should be located in ./modular-sdk
# JCEF_PATH - specifies the path to the directory where JCEF binaries are located.
# By default imported modules should be located in ./jcef_linux_x64
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
WITH_IMPORT_MODULES="--with-import-modules=${MODULAR_SDK_PATH:=./modular-sdk}"
JCEF_PATH=${JCEF_PATH:=./jcef_linux_x64}
source jb/project/tools/common.sh
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
sh configure \
--disable-warnings-as-errors \
$WITH_DEBUG_LEVEL \
--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-import-modules=./modular-sdk \
--enable-cds=yes || exit $?
make clean CONF=linux-x86_64-normal-server-fastdebug || exit $?
make images CONF=linux-x86_64-normal-server-fastdebug || exit $?
JBSDK=${JBRSDK_BASE_NAME}-linux-x64-fastdebug-b${build_number}
BASE_DIR=build/linux-x86_64-normal-server-fastdebug/images
JSDK=${BASE_DIR}/jdk
JBRSDK_BUNDLE=jbrsdk
echo Fixing permissions
chmod -R a+r $JSDK
rm -rf $BASE_DIR/$JBRSDK_BUNDLE
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || exit $?
cp -R jcef_linux_x64/* $BASE_DIR/$JBRSDK_BUNDLE/lib || exit $?
echo Creating $JBSDK.tar.gz ...
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/release > release
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/release
tar -pcf $JBSDK.tar \
--exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man \
-C $BASE_DIR ${JBRSDK_BUNDLE} || exit $?
gzip $JBSDK.tar || exit $?
JBR_BUNDLE=jbr
JBR_BASE_NAME=jbr-$JBSDK_VERSION
rm -rf $BASE_DIR/$JBR_BUNDLE
JBR=$JBR_BASE_NAME-linux-x64-fastdebug-b$build_number
echo Running jlink....
${JSDK}/bin/jlink \
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
--add-modules $(xargs < modules.list | sed s/" "//g | sed s/,$//g) \
--output ${BASE_DIR}/${JBR_BUNDLE} || exit $?
cp -R jcef_linux_x64/* $BASE_DIR/$JBR_BUNDLE/lib || 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 -czf $JBR.tar -C $BASE_DIR ${JBR_BUNDLE} || exit $?
gzip $JBR.tar || exit $?

View File

@@ -1,10 +0,0 @@
#!/bin/bash -x
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
script_dir=jb/project/tools/mac/scripts
${script_dir}/mkimages.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jcef" || exit $?
${script_dir}/mkimages.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx" || exit $?
${script_dir}/mkimages.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "dcevm" || exit $?
${script_dir}/mkimages.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx_jcef" || exit $?

View File

@@ -1,12 +1,16 @@
#!/bin/bash -x
# The following parameters must be specified:
# 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
# JBSDK_VERSION - specifies major version of OpenJDK e.g. 11_0_6 (instead of dots '.' underbars "_" are used)
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
# bundle_type - specifies bundle to bu built; possible values:
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
# jfx - the bundle 1) jbr with javafx only will be created
# bundle_type - specifies bundle to be built; possible values:
# jcef - the release bundles with jcef
# jfx - the release bundles with javafx
# jcef_jfx - the release bundles with jcef and javafx
# dcevm - the release bundles with dcevm patches
# nomod - the release bundles without any additional modules (jcef)
# fd - the fastdebug bundles which also include the jcef module
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
@@ -19,8 +23,8 @@
# Environment variables:
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
# By default imported modules should be located in ./modular-sdk
# JCEF_PATH - specifies the path to the directory where JCEF binaries are located.
# By default imported modules should be located in ./jcef_mac
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
# By default JCEF binaries should be located in ./jcef_mac
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
@@ -34,23 +38,20 @@ source jb/project/tools/common.sh
function create_jbr {
case "$1" in
"${bundle_type}_lw")
JBR_BASE_NAME=jbr_${bundle_type}_lw-${JBSDK_VERSION}
grep -v "jdk.compiler\|jdk.hotspot.agent" modules.list > modules_tmp.list
;;
"jfx" | "jcef" | "dcevm" | "nomod")
JBR_BUNDLE=jbr_${bundle_type}
case "${bundle_type}" in
"jfx" | "jcef" | "dcevm" | "nomod" | "fd")
JBR_BASE_NAME=jbr_${bundle_type}-${JBSDK_VERSION}
cat modules.list > modules_tmp.list
;;
"jfx_jcef")
JBR_BASE_NAME=jbr-${JBSDK_VERSION}
cat modules.list > modules_tmp.list
;;
*)
echo "***ERR*** bundle was not specified" && exit 1
echo "***ERR*** bundle was not specified" && do_exit 1
;;
esac
cat modules.list > modules_tmp.list
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
JRE_CONTENTS=${BASE_DIR}/${JBR_BUNDLE}/Contents
@@ -62,44 +63,64 @@ function create_jbr {
JBR=${JBR_BASE_NAME}-osx-x64-b${build_number}
echo Running jlink....
${BASE_DIR}/$JBRSDK_BUNDLE/Contents/Home/bin/jlink \
--module-path ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/jmods --no-man-pages --compress=2 \
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output ${JRE_HOME} || exit $?
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output ${JRE_HOME} || do_exit $?
grep -v "^JAVA_VERSION" ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release | grep -v "^MODULES" >> ${JRE_HOME}/release
cp -R ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/MacOS ${JRE_CONTENTS}
cp ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Info.plist ${JRE_CONTENTS}
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]]; then
rm -rf ${JRE_CONTENTS}/Frameworks || exit $?
cp -a ${JCEF_PATH}/Frameworks ${JRE_CONTENTS} || exit $?
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]] || [[ "${bundle_type}" == fd ]]; then
rm -rf ${JRE_CONTENTS}/Frameworks || do_exit $?
cp -a ${JCEF_PATH}/Frameworks ${JRE_CONTENTS} || do_exit $?
fi
echo Creating ${JBR}.tar.gz ...
rm -rf ${BASE_DIR}/jbr
cp -R ${BASE_DIR}/${JBR_BUNDLE} ${BASE_DIR}/jbr
COPYFILE_DISABLE=1 tar -pczf ${JBR}.tar.gz --exclude='*.dSYM' --exclude='man' -C ${BASE_DIR} jbr || exit $?
COPYFILE_DISABLE=1 tar -pczf ${JBR}.tar.gz --exclude='*.dSYM' --exclude='man' -C ${BASE_DIR} jbr || do_exit $?
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
}
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
WITH_DEBUG_LEVEL="--with-debug-level=release"
RELEASE_NAME=macosx-x86_64-normal-server-release
git checkout -- modules.list src/java.desktop/share/classes/module-info.java
JBSDK=${JBRSDK_BASE_NAME}-osx-x64-b${build_number}
case "$bundle_type" in
"jfx")
git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch
git apply -p0 < jb/project/tools/patches/add_jfx_module.patch || do_exit $?
do_reset_changes=1
;;
"jcef")
git apply -p0 < jb/project/tools/patches/exclude_jfx_module.patch
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
do_reset_changes=1
;;
"jfx_jcef")
git apply -p0 < jb/project/tools/patches/add_jfx_module.patch || do_exit $?
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
do_reset_changes=1
;;
"dcevm")
git am jb/project/tools/patches/dcevm/*.patch
HEAD_REVISION=$(git rev-parse HEAD)
git am jb/project/tools/patches/dcevm/*.patch || do_exit $?
do_reset_dcevm=1
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
do_reset_changes=1
;;
"nomod")
git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch
git apply -p0 < jb/project/tools/patches/exclude_jfx_module.patch
WITH_IMPORT_MODULES=""
;;
"fd")
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
do_reset_changes=1
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
RELEASE_NAME=macosx-x86_64-normal-server-fastdebug
JBSDK=${JBRSDK_BASE_NAME}-osx-x64-fastdebug-b${build_number}
;;
*)
echo "***ERR*** bundle was not specified" && do_exit 1
;;
esac
sh configure \
@@ -112,42 +133,45 @@ sh configure \
--with-version-opt=b${build_number} \
$WITH_IMPORT_MODULES \
--with-boot-jdk=`/usr/libexec/java_home -v 11` \
--enable-cds=yes || exit $?
--enable-cds=yes || do_exit $?
make clean images CONF=$RELEASE_NAME || exit $?
make clean CONF=$RELEASE_NAME || do_exit $?
make images CONF=$RELEASE_NAME || do_exit $?
JSDK=build/$RELEASE_NAME/images/jdk-bundle
JBSDK=${JBRSDK_BASE_NAME}-osx-x64-b${build_number}
JSDK=build/${RELEASE_NAME}/images/jdk-bundle
BASE_DIR=jre
JBRSDK_BUNDLE=jbrsdk
rm -rf $BASE_DIR
mkdir $BASE_DIR || exit $?
cp -a $JSDK/jdk-$JBSDK_VERSION_WITH_DOTS.jdk $BASE_DIR/$JBRSDK_BUNDLE || exit $?
mkdir $BASE_DIR || do_exit $?
cp -a $JSDK/jdk-$JBSDK_VERSION_WITH_DOTS.jdk $BASE_DIR/$JBRSDK_BUNDLE || do_exit $?
if [[ "$bundle_type" == *jcef* ]] || [[ "$bundle_type" == *dcevm* ]]; then
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]] || [[ "${bundle_type}" == fd ]]; then
cp -a ${JCEF_PATH}/Frameworks $BASE_DIR/$JBRSDK_BUNDLE/Contents/
fi
if [ "$bundle_type" == "jfx_jcef" ]; then
if [ "${bundle_type}" == "jcef" ] || [ "{$bundle_type}" == "fd" ]; then
echo Creating $JBSDK.tar.gz ...
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release > release
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release
COPYFILE_DISABLE=1 tar -pczf $JBSDK.tar.gz -C $BASE_DIR \
[ -f "${JBSDK}.tar.gz" ] && rm "${JBSDK}.tar.gz"
COPYFILE_DISABLE=1 tar -pczf ${JBSDK}.tar.gz -C ${BASE_DIR} \
--exclude='._*' --exclude='.DS_Store' --exclude='*~' \
--exclude='Home/demo' --exclude='Home/man' --exclude='Home/sample' \
$JBRSDK_BUNDLE || exit $?
${JBRSDK_BUNDLE} || do_exit $?
fi
JBR_BUNDLE=jbr_${bundle_type}
create_jbr "${bundle_type}" || exit $?
create_jbr || do_exit $?
if [ "$bundle_type" == "jfx_jcef" ]; then
make test-image || exit $?
if [ "$bundle_type" == "jcef" ]; then
make test-image CONF=$RELEASE_NAME || do_exit $?
JBRSDK_TEST=$JBRSDK_BASE_NAME-osx-test-x64-b$build_number
echo Creating $JBRSDK_TEST.tar.gz ...
COPYFILE_DISABLE=1 tar -pczf $JBRSDK_TEST.tar.gz -C build/macosx-x86_64-normal-server-release/images \
--exclude='test/jdk/demos' test || exit $?
fi
[ -f "${JBRSDK_TEST}.tar.gz" ] && rm "${JBRSDK_TEST}.tar.gz"
COPYFILE_DISABLE=1 tar -pczf ${JBRSDK_TEST}.tar.gz -C build/${RELEASE_NAME}/images \
--exclude='test/jdk/demos' test || do_exit $?
fi
do_exit 0

View File

@@ -1,99 +0,0 @@
#!/bin/bash -x
# The following parameters must be specified:
# 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
# bundle_type - specifies bundle to bu built; possible values:
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
# jfx - the bundle 1) jbr with javafx only will be created
#
# 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)
#
# Environment variables:
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
# By default imported modules should be located in ./modular-sdk
# JCEF_PATH - specifies the path to the directory where JCEF binaries are located.
# By default imported modules should be located in ./jcef_mac
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
WITH_IMPORT_MODULES="--with-import-modules=${MODULAR_SDK_PATH:=./modular-sdk}"
JCEF_PATH=${JCEF_PATH:=./jcef_mac}
source jb/project/tools/common.sh
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
sh configure \
--disable-warnings-as-errors \
$WITH_DEBUG_LEVEL \
--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_IMPORT_MODULES \
--with-boot-jdk=`/usr/libexec/java_home -v 11` \
--enable-cds=yes || exit $?
make clean CONF=macosx-x86_64-normal-server-fastdebug || exit $?
make images CONF=macosx-x86_64-normal-server-fastdebug || exit $?
JSDK=build/macosx-x86_64-normal-server-fastdebug/images/jdk-bundle
JBSDK=${JBRSDK_BASE_NAME}-osx-x64-fastdebug-b${build_number}
BASE_DIR=jre
JBRSDK_BUNDLE=jbrsdk
rm -rf $BASE_DIR
mkdir $BASE_DIR || exit $?
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
cp -a $JSDK/jdk-$JBSDK_VERSION_WITH_DOTS.jdk $BASE_DIR/$JBRSDK_BUNDLE || exit $?
echo Creating $JBSDK.tar.gz ...
cp -a ${JCEF_PATH}/Frameworks $BASE_DIR/$JBRSDK_BUNDLE/Contents/
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release > release
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release
COPYFILE_DISABLE=1 \
tar -pczf ${JBSDK}.tar.gz -C ${BASE_DIR} \
--exclude='._*' --exclude='.DS_Store' --exclude='*~' \
--exclude='Home/demo' --exclude='Home/man' --exclude='Home/sample' \
${JBRSDK_BUNDLE} || exit $?
JBR_BUNDLE=jbr
JRE_CONTENTS=$BASE_DIR/$JBR_BUNDLE/Contents
JRE_HOME=$JRE_CONTENTS/Home
JBR_BASE_NAME=jbr-$JBSDK_VERSION
mkdir -p $JRE_CONTENTS
if [ -d "$JRE_HOME" ]; then
rm -rf $JRE_HOME
fi
JBR=${JBR_BASE_NAME}-osx-x64-fastdebug-b${build_number}
$BASE_DIR/$JBRSDK_BUNDLE/Contents/Home/bin/jlink \
--module-path $BASE_DIR/$JBRSDK_BUNDLE/Contents/Home/jmods --no-man-pages --compress=2 \
--add-modules $(xargs < modules.list | sed s/" "//g) --output $JRE_HOME || exit $?
grep -v "^JAVA_VERSION" $BASE_DIR/$JBRSDK_BUNDLE/Contents/Home/release | grep -v "^MODULES" >> $JRE_HOME/release
cp -R $BASE_DIR/$JBRSDK_BUNDLE/Contents/MacOS $JRE_CONTENTS
cp $BASE_DIR/$JBRSDK_BUNDLE/Contents/Info.plist $JRE_CONTENTS
cp -a ${JCEF_PATH}/Frameworks ${JRE_CONTENTS} || exit $?
echo Creating $JBR.tar.gz ...
COPYFILE_DISABLE=1 tar -pczf $JBR.tar.gz --exclude='*.dSYM' --exclude='man' -C $BASE_DIR $JBR_BUNDLE || exit $?

View File

@@ -0,0 +1,30 @@
diff --git modules.list modules.list
index e23d793..368d022 100644
--- modules.list
+++ modules.list
@@ -54,4 +54,7 @@ jdk.security.jgss,
jdk.unsupported,
jdk.xml.dom,
jdk.zipfs,
-jdk.hotspot.agent
+jdk.hotspot.agent,
+jcef,
+gluegen.rt,
+jogl.all
diff --git src/java.desktop/share/classes/module-info.java src/java.desktop/share/classes/module-info.java
index b663b38..3e9acdc 100644
--- src/java.desktop/share/classes/module-info.java
+++ src/java.desktop/share/classes/module-info.java
@@ -109,7 +109,11 @@ module java.desktop {
// see make/GensrcModuleInfo.gmk
exports sun.awt to
jdk.accessibility,
- jdk.unsupported.desktop;
+ jdk.unsupported.desktop,
+ jcef,
+ jogl.all;
+
+ exports java.awt.peer to jcef;
exports java.awt.dnd.peer to jdk.unsupported.desktop;
exports sun.awt.dnd to jdk.unsupported.desktop;

View File

@@ -0,0 +1,18 @@
diff --git modules.list modules.list
index e23d793ca61..14b9a6c8e50 100644
--- modules.list
+++ modules.list
@@ -20,6 +20,13 @@ java.sql.rowset,
java.transaction.xa,
java.xml,
java.xml.crypto,
+javafx.base,
+javafx.controls,
+javafx.fxml,
+javafx.graphics,
+javafx.media,
+javafx.swing,
+javafx.web,
jdk.accessibility,
jdk.aot,
jdk.attach,

View File

@@ -0,0 +1,26 @@
From eb85e2e223b8530a3b82f4533d6a5b93280af610 Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
Date: Tue, 6 Oct 2020 22:15:31 +0200
Subject: [PATCH 51/51] AllowEnhancedClassRedefinition is false (disabled) by
default
---
src/hotspot/share/runtime/globals.hpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp
index 7720ceebc81..f7e3fd04593 100644
--- a/src/hotspot/share/runtime/globals.hpp
+++ b/src/hotspot/share/runtime/globals.hpp
@@ -2679,7 +2679,7 @@ define_pd_global(uint64_t,MaxRAM, 1ULL*G);
experimental(bool, UseFastUnorderedTimeStamps, false, \
"Use platform unstable time where supported for timestamps only") \
\
- product(bool, AllowEnhancedClassRedefinition, true, \
+ product(bool, AllowEnhancedClassRedefinition, false, \
"Allow enhanced class redefinition beyond swapping method " \
"bodies") \
\
--
2.23.0

View File

@@ -1,33 +0,0 @@
Index: src/java.desktop/share/classes/module-info.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/java.desktop/share/classes/module-info.java (revision 5ae6630e3ebc71beb9f9df63b1b5bc19c9405d1f)
+++ src/java.desktop/share/classes/module-info.java (date 1588168285537)
@@ -109,10 +109,7 @@
// see make/GensrcModuleInfo.gmk
exports sun.awt to
jdk.accessibility,
- jdk.unsupported.desktop,
- jcef;
-
- exports java.awt.peer to jcef;
+ jdk.unsupported.desktop;
exports java.awt.dnd.peer to jdk.unsupported.desktop;
exports sun.awt.dnd to jdk.unsupported.desktop;
Index: modules.list
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- modules.list (revision 5ae6630e3ebc71beb9f9df63b1b5bc19c9405d1f)
+++ modules.list (date 1588168285505)
@@ -61,5 +61,4 @@
jdk.unsupported,
jdk.xml.dom,
jdk.zipfs,
-jdk.hotspot.agent,
-jcef
+jdk.hotspot.agent

View File

@@ -1,21 +0,0 @@
Index: modules.list
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- modules.list (revision ab073976c4f85f154ff1421b7ac888eee86b6595)
+++ modules.list (date 1588171510146)
@@ -20,13 +20,6 @@
java.transaction.xa,
java.xml,
java.xml.crypto,
-javafx.base,
-javafx.controls,
-javafx.fxml,
-javafx.graphics,
-javafx.media,
-javafx.swing,
-javafx.web,
jdk.accessibility,
jdk.aot,
jdk.attach,

View File

@@ -1,10 +0,0 @@
#!/bin/bash -x
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
script_dir=jb/project/tools/windows/scripts
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jcef" || exit $?
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx" || exit $?
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "dcevm" || exit $?
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx_jcef" || exit $?

View File

@@ -1,12 +1,16 @@
#!/bin/bash -x
# The following parameters must be specified:
# 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
# JBSDK_VERSION - specifies major version of OpenJDK e.g. 11_0_6 (instead of dots '.' underbars "_" are used)
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
# bundle_type - specifies bundle to bu built; possible values:
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
# jfx - the bundle 1) jbr with javafx only will be created
# bundle_type - specifies bundle to be built; possible values:
# jcef - the release bundles with jcef
# jfx - the release bundles with javafx
# jcef_jfx - the release bundles with jcef and javafx
# dcevm - the release bundles with dcevm patches
# nomod - the release bundles without any additional modules (jcef)
# fd - the fastdebug bundles which also include the jcef module
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
@@ -19,104 +23,124 @@
# Environment variables:
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
# By default imported modules should be located in ./modular-sdk
# JCEF_PATH - specifies the path to the directory where JCEF binaries are located.
# By default imported modules should be located in ./jcef_win_x64
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
# By default JCEF binaries should be located in ./jcef_win_x64
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
bundle_type=$4
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
WORK_DIR=$(pwd)
WITH_IMPORT_MODULES="--with-import-modules=${MODULAR_SDK_PATH:=${WORK_DIR}/modular-sdk}"
JCEF_PATH=${JCEF_PATH:=./jcef_win_x64}
JCEF_PATH=${JCEF_PATH:=${WORK_DIR}/jcef_win_x64}
TOOLCHAIN_VERSION=${TOOLCHAIN_VERSION:=2015}
source jb/project/tools/common.sh
function create_jbr {
case "$1" in
"${bundle_type}_lw")
grep -v "jdk.compiler\|jdk.hotspot.agent" modules.list > modules_tmp.list
JBR_BUNDLE=jbr_${bundle_type}
case "${bundle_type}" in
"jfx" | "jcef" | "dcevm" | "nomod" | "fd")
JBR_BASE_NAME=jbr_${bundle_type}-${JBSDK_VERSION}
;;
"jfx" | "jcef" | "jfx_jcef" | "dcevm" | "nomod")
cat modules.list > modules_tmp.list
"jfx_jcef")
JBR_BASE_NAME=jbr-${JBSDK_VERSION}
;;
*)
echo "***ERR*** bundle was not specified" && exit 1
echo "***ERR*** bundle was not specified" && do_exit 1
;;
esac
cat modules.list > modules_tmp.list
rm -rf ${JBR_BUNDLE}
echo Running jlink....
${JSDK}/bin/jlink \
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output ${JBR_BUNDLE} || exit $?
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]]
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output ${JBR_BUNDLE} || do_exit $?
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]] || [[ "${bundle_type}" == fd ]]
then
cp -R ${JCEF_PATH}/* ${JBR_BUNDLE}/bin
rsync -av ${JCEF_PATH}/ ${JBR_BUNDLE}/bin --exclude="modular-sdk" || do_exit $?
fi
echo Modifying release info ...
cat ${JSDK}/release | tr -d '\r' | grep -v 'JAVA_VERSION' | grep -v 'MODULES' >> ${JBR_BUNDLE}/release
}
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
WORK_DIR=$(pwd)
WITH_DEBUG_LEVEL="--with-debug-level=release"
RELEASE_NAME=windows-x86_64-normal-server-release
git checkout -- modules.list src/java.desktop/share/classes/module-info.java
JBSDK=${JBRSDK_BASE_NAME}-windows-x64-b${build_number}
case "$bundle_type" in
"jfx")
echo "Excluding jcef modules"
git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch
git apply -p0 < jb/project/tools/patches/add_jfx_module.patch || do_exit $?
do_reset_changes=1
;;
"jcef")
echo "Excluding jfx modules"
git apply -p0 < jb/project/tools/patches/exclude_jfx_module.patch
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
do_reset_changes=1
;;
"jfx_jcef")
git apply -p0 < jb/project/tools/patches/add_jfx_module.patch || do_exit $?
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
do_reset_changes=1
;;
"dcevm")
echo "Adding dcevm patches"
git am jb/project/tools/patches/dcevm/*.patch
HEAD_REVISION=$(git rev-parse HEAD)
git am jb/project/tools/patches/dcevm/*.patch || do_exit $?
do_reset_dcevm=1
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
do_reset_changes=1
;;
"nomod")
git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch
git apply -p0 < jb/project/tools/patches/exclude_jfx_module.patch
WITH_IMPORT_MODULES=""
;;
"fd")
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
do_reset_changes=1
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
RELEASE_NAME=windows-x86_64-normal-server-fastdebug
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}-fastdebug
JBSDK=${JBRSDK_BASE_NAME}-windows-x64-fastdebug-b${build_number}
;;
*)
echo "***ERR*** bundle was not specified" && do_exit 1
;;
esac
PATH="/usr/local/bin:/usr/bin:${PATH}"
./configure \
sh ./configure \
--disable-warnings-as-errors \
$WITH_DEBUG_LEVEL \
--with-target-bits=64 \
--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_IMPORT_MODULES \
--with-toolchain-version=2015 \
--with-toolchain-version=${TOOLCHAIN_VERSION} \
--with-boot-jdk=${BOOT_JDK} \
--disable-ccache \
--enable-cds=yes || exit 1
--enable-cds=yes || do_exit $?
if [ "$bundle_type" == "jfx_jcef" ]; then
make LOG=info clean images CONF=$RELEASE_NAME test-image || exit 1
if [ "${bundle_type}" == "jcef" ]; then
make LOG=info clean images test-image CONF=$RELEASE_NAME || do_exit $?
else
make LOG=info clean images CONF=$RELEASE_NAME || exit 1
make LOG=info clean images CONF=$RELEASE_NAME || do_exit $?
fi
JSDK=build/$RELEASE_NAME/images/jdk
if [[ "$bundle_type" == *jcef* ]]; then
JBSDK=${JBRSDK_BASE_NAME}-windows-x64-b${build_number}
fi
BASE_DIR=build/$RELEASE_NAME/images
JBRSDK_BUNDLE=jbrsdk
rm -rf ${BASE_DIR}/${JBRSDK_BUNDLE} && rsync -a --exclude demo --exclude sample ${JSDK}/ ${JBRSDK_BUNDLE} || exit 1
cp -R ${JCEF_PATH}/* ${JBRSDK_BUNDLE}/bin
sed 's/JBR/JBRSDK/g' ${JSDK}/release > release
mv release ${JBRSDK_BUNDLE}/release
rm -rf ${BASE_DIR}/${JBRSDK_BUNDLE} && rsync -a --exclude demo --exclude sample ${JSDK}/ ${JBRSDK_BUNDLE} || do_exit $?
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]] || [[ "${bundle_type}" == fd ]]
then
rsync -av ${JCEF_PATH}/ ${JBRSDK_BUNDLE}/bin --exclude='modular-sdk' || do_exit $?
sed 's/JBR/JBRSDK/g' ${JSDK}/release > release
mv release ${JBRSDK_BUNDLE}/release
fi
JBR_BUNDLE=jbr_${bundle_type}
create_jbr ${bundle_type}
create_jbr || do_exit $?
do_exit 0

View File

@@ -1,76 +0,0 @@
#!/bin/bash -x
# The following parameters must be specified:
# 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
# bundle_type - specifies bundle to bu built; possible values:
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
# jfx - the bundle 1) jbr with javafx only will be created
#
# 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)
#
# Environment variables:
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
# By default imported modules should be located in ./modular-sdk
# JCEF_PATH - specifies the path to the directory where JCEF binaries are located.
# By default imported modules should be located in ./jcef_win_x64
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
WITH_IMPORT_MODULES="--with-import-modules=${MODULAR_SDK_PATH:=${WORK_DIR}/modular-sdk}"
JCEF_PATH=${JCEF_PATH:=./jcef_win_x64}
source jb/project/tools/common.sh
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
WORK_DIR=$(pwd)
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
RELEASE_NAME=windows-x86_64-normal-server-fastdebug
PATH="/usr/local/bin:/usr/bin:${PATH}"
./configure \
--disable-warnings-as-errors \
$WITH_DEBUG_LEVEL \
--with-target-bits=64 \
--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_IMPORT_MODULES \
--with-toolchain-version=2015 \
--with-boot-jdk=${BOOT_JDK} \
--disable-ccache \
--enable-cds=yes || exit 1
make LOG=info clean images CONF=$RELEASE_NAME || exit 1
JSDK=build/$RELEASE_NAME/images/jdk
JBSDK=${JBRSDK_BASE_NAME}-windows-x64-b${build_number}
BASE_DIR=build/$RELEASE_NAME/images
JBRSDK_BUNDLE=jbrsdk
rm -rf ${BASE_DIR}/${JBRSDK_BUNDLE} && rsync -a --exclude demo --exclude sample ${JSDK}/ ${JBRSDK_BUNDLE} || exit 1
cp -R ${JCEF_PATH}/* ${JBRSDK_BUNDLE}/bin
sed 's/JBR/JBRSDK/g' ${JSDK}/release > release
mv release ${JBRSDK_BUNDLE}/release
JBR_BUNDLE=jbr
JBR_BASE_NAME=jbr-$JBSDK_VERSION
rm -rf ${JBR_BUNDLE}
${JSDK}/bin/jlink \
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
--add-modules $(xargs < modules.list | sed s/" "//g) --output ${JBR_BUNDLE} || exit $?
cp -R ${JCEF_PATH}/* ${JBR_BUNDLE}/bin
echo Modifying release info ...
cat ${JSDK}/release | tr -d '\r' | grep -v 'JAVA_VERSION' | grep -v 'MODULES' >> ${JBR_BUNDLE}/release

View File

@@ -1,12 +1,16 @@
#!/bin/bash -x
# The following parameters must be specified:
# 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
# JBSDK_VERSION - specifies major version of OpenJDK e.g. 11_0_6 (instead of dots '.' underbars "_" are used)
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
# bundle_type - specifies bundle to bu built; possible values:
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
# jfx - the bundle 1) jbr with javafx only will be created
# bundle_type - specifies bundle to be built; possible values:
# jcef - the release bundles with jcef
# jfx - the release bundles with javafx
# jcef_jfx - the release bundles with jcef and javafx
# dcevm - the release bundles with dcevm patches
# nomod - the release bundles without any additional modules (jcef)
# fd - the fastdebug bundles which also include the jcef module
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
@@ -16,59 +20,69 @@
# 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)
#
# Environment variables:
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
# By default imported modules should be located in ./modular-sdk
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
# By default JCEF binaries should be located in ./jcef_win_x64
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
bundle_type=$4
source jb/project/tools/common.sh
function pack_jbr {
case "$1" in
"${bundle_type}_lw")
JBR_BASE_NAME=jbr_${bundle_type}_lw-${JBSDK_VERSION}
;;
"jfx" | "jcef" | "dcevm" | "nomod")
JBR_BUNDLE=jbr_${bundle_type}
case "${bundle_type}" in
"jfx" | "jcef" | "dcevm" | "nomod" | "fd")
JBR_BASE_NAME=jbr_${bundle_type}-${JBSDK_VERSION}
;;
"jfx_jcef")
JBR_BASE_NAME=jbr-${JBSDK_VERSION}
;;
*)
echo "***ERR*** bundle was not specified" && exit 1
echo "***ERR*** bundle was not specified" && do_exit 1
;;
esac
JBR=$JBR_BASE_NAME-windows-x64-b$build_number
echo Creating $JBR.tar.gz ...
rm -rf ${BASE_DIR}/jbr
chmod -R ug+rwx,o+rx ${BASE_DIR}/${JBR_BUNDLE}
cp -R ${BASE_DIR}/${JBR_BUNDLE} ${BASE_DIR}/jbr
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR jbr || exit 1
#rm -rf ${BASE_DIR}/${JBR_BUNDLE}
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR jbr || do_exit $?
}
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
WITH_DEBUG_LEVEL="--with-debug-level=release"
RELEASE_NAME=windows-x86_64-normal-server-release
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
JBR_BASE_NAME=jbr-$JBSDK_VERSION
JBSDK=${JBRSDK_BASE_NAME}-windows-x64-b${build_number}
case "$bundle_type" in
"fd")
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
RELEASE_NAME=windows-x86_64-normal-server-fastdebug
JBSDK=${JBRSDK_BASE_NAME}-windows-x64-fastdebug-b${build_number}
;;
esac
IMAGES_DIR=build/$RELEASE_NAME/images
JSDK=$IMAGES_DIR/jdk
JBSDK=$JBRSDK_BASE_NAME-windows-x64-b$build_number
BASE_DIR=.
if [ "$bundle_type" == "jfx_jcef" ]; then
if [ "${bundle_type}" == "jcef" ] || [ "${bundle_type}" == "fd" ]; then
JBRSDK_BUNDLE=jbrsdk
echo Creating $JBSDK.tar.gz ...
/usr/bin/tar -czf $JBSDK.tar.gz $JBRSDK_BUNDLE || exit 1
[ -f "$JBSDK.tar.gz" ] && rm "$JBSDK.tar.gz"
/usr/bin/tar -czf $JBSDK.tar.gz $JBRSDK_BUNDLE || do_exit $?
fi
JBR_BUNDLE=jbr_${bundle_type}
pack_jbr $bundle_type
if [ "$bundle_type" == "jfx_jcef" ]; then
if [ "$bundle_type" == "jcef" ]; then
JBRSDK_TEST=$JBRSDK_BASE_NAME-windows-test-x64-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
/usr/bin/tar -czf $JBRSDK_TEST.tar.gz -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
fi

View File

@@ -1,44 +0,0 @@
#!/bin/bash -x
# The following parameters must be specified:
# 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
# bundle_type - specifies bundle to bu built; possible values:
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
# jfx - the bundle 1) jbr with javafx only will be created
#
# 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
RELEASE_NAME=windows-x86_64-normal-server-fastdebug
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
JBR_BASE_NAME=jbr-$JBSDK_VERSION
IMAGES_DIR=build/$RELEASE_NAME/images
JSDK=$IMAGES_DIR/jdk
JBSDK=$JBRSDK_BASE_NAME-windows-x64-fastdebug-b$build_number
BASE_DIR=.
JBRSDK_BUNDLE=jbrsdk
echo Creating $JBSDK.tar.gz ...
/usr/bin/tar -czf $JBSDK.tar.gz $JBRSDK_BUNDLE || exit 1
JBR_BUNDLE=jbr
JBR_BASE_NAME=jbr-${JBSDK_VERSION}
JBR=$JBR_BASE_NAME-windows-x64-fastdebug-b$build_number
echo Creating $JBR.tar.gz ...
cp -R ${BASE_DIR}/${JBR_BUNDLE} ${BASE_DIR}/jbr
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR jbr || exit 1

View File

@@ -20,13 +20,6 @@ java.sql.rowset,
java.transaction.xa,
java.xml,
java.xml.crypto,
javafx.base,
javafx.controls,
javafx.fxml,
javafx.graphics,
javafx.media,
javafx.swing,
javafx.web,
jdk.accessibility,
jdk.aot,
jdk.attach,
@@ -61,5 +54,4 @@ jdk.security.jgss,
jdk.unsupported,
jdk.xml.dom,
jdk.zipfs,
jdk.hotspot.agent,
jcef
jdk.hotspot.agent

View File

@@ -89,7 +89,11 @@ final class CClipboard extends SunClipboard {
try {
byte[] bytes = DataTransferer.getInstance().translateTransferable(contents, flavor, format);
setData(bytes, format);
if (DataFlavor.javaFileListFlavor.equals(flavor)) {
writeObjects(bytes);
} else {
setData(bytes, format);
}
} catch (IOException e) {
// Fix 4696186: don't print exception if data with
// javaJVMLocalObjectMimeType failed to serialize.
@@ -127,6 +131,7 @@ final class CClipboard extends SunClipboard {
private native void declareTypes(long[] formats, SunClipboard newOwner);
private native void setData(byte[] data, long format);
private native void writeObjects(byte[] data);
void checkPasteboardAndNotify() {
if (checkPasteboardWithoutNotification()) {

View File

@@ -297,18 +297,6 @@ public class CInputMethod extends InputMethodAdapter {
if (component.getInputMethodRequests() == null) {
imInstance = null;
}
LWWindowPeer windowPeer = peer.getPlatformWindow().getPeer();
if (windowPeer.isSimpleWindow()) {
// A simple window gains focus. Cocoa won't dispatch IME events into the simple window, but into its owner.
// This IM represents the focused component in the simple window. We will use the owner as IME proxy.
// For that, this IM is set for the owner and is dropped for the simple window.
Window owner = windowPeer.getTarget().getOwner();
assert owner != null && owner.isActive();
long ownerPtr = getNativeViewPtr((LWComponentPeer)AWTAccessor.getComponentAccessor().getPeer(owner));
nativeNotifyPeer(ownerPtr, this);
imInstance = null;
}
}
if (peer != null) {

View File

@@ -174,6 +174,48 @@ JNF_COCOA_ENTER(env);
JNF_COCOA_EXIT(env);
}
/*
* Class: sun_lwawt_macosx_CClipboard
* Method: writeObjects
* Signature: ([BJ)V
*/
JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CClipboard_writeObjects
(JNIEnv *env, jobject inObject, jbyteArray inBytes, jlong inFormat)
{
if (inBytes == NULL) {
return;
}
JNF_COCOA_ENTER(env);
jint nBytes = (*env)->GetArrayLength(env, inBytes);
jbyte *rawBytes = (*env)->GetPrimitiveArrayCritical(env, inBytes, NULL);
CHECK_NULL(rawBytes);
NSData *bytesAsData = [NSData dataWithBytes:rawBytes length:nBytes];
(*env)->ReleasePrimitiveArrayCritical(env, inBytes, rawBytes, JNI_ABORT);
NSString *format = formatForIndex(inFormat);
NSMutableArray *formatArray = [NSMutableArray arrayWithCapacity:2];
const char *bytes = [bytesAsData bytes];
BOOL isStart=YES;
for (int i = 0; i < [bytesAsData length]; i++) {
if ((unsigned char)bytes[i] == 0) {
isStart = YES;
} else {
if (isStart) {
isStart = NO;
NSString *path = [NSString stringWithUTF8String:(const char *)&bytes[i]];
NSURL *fileURL = [NSURL fileURLWithPath:path relativeToURL:nil];
[formatArray addObject:fileURL];
}
}
}
[ThreadUtilities performOnMainThreadWaiting:YES block:^() {
[[NSPasteboard generalPasteboard] writeObjects:formatArray];
}];
JNF_COCOA_EXIT(env);
}
/*
* Class: sun_lwawt_macosx_CClipboard
* Method: getClipboardFormats

View File

@@ -90,7 +90,6 @@ JNF_COCOA_ENTER(env);
CGLCtxInfo *ctxinfo = (CGLCtxInfo *)oglc->ctxInfo;
#if USE_NSVIEW_FOR_SCRATCH
[ctxinfo->context makeCurrentContext];
[ctxinfo->context setView: ctxinfo->scratchSurface];
#else
[ctxinfo->context clearDrawable];
[ctxinfo->context makeCurrentContext];

View File

@@ -109,10 +109,7 @@ module java.desktop {
// see make/GensrcModuleInfo.gmk
exports sun.awt to
jdk.accessibility,
jdk.unsupported.desktop,
jcef;
exports java.awt.peer to jcef;
jdk.unsupported.desktop;
exports java.awt.dnd.peer to jdk.unsupported.desktop;
exports sun.awt.dnd to jdk.unsupported.desktop;

View File

@@ -143,10 +143,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
private static final int MAXIMUM_BUFFER_LENGTH_NET_WM_ICON = (2<<15) - 1;
static {
/* https://userbase.kde.org/KDE_System_Administration/Environment_Variables#KDE_FULL_SESSION */
final String kdeSession = AccessController.doPrivileged((PrivilegedAction<String>) () -> System.getenv("KDE_FULL_SESSION"));
final boolean isKDE = kdeSession != null && !kdeSession.isEmpty();
final boolean isKDE = XWM.getWMID() == XWM.KDE2_WM;
X11_DISABLE_OVERRIDE_FLAG =
GetPropertyAction.privilegedGetProperty("x11.disable.override.flag", isKDE ? "true" : "false").equalsIgnoreCase("true");
X11_DISABLE_OVERRIDE_XWINDOWPEER =

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 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
@@ -30,9 +30,11 @@
import java.io.File;
import java.io.FileInputStream;
import java.security.cert.*;
import java.text.DateFormat;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Set;
public class GetPolicyQualifiers {
@@ -52,6 +54,9 @@ public class GetPolicyQualifiers {
PKIXParameters params = new PKIXParameters(trustAnchors);
params.setPolicyQualifiersRejected(false);
params.setRevocationEnabled(false);
// Certificates expired on Oct 6th, 2020
params.setDate(DateFormat.getDateInstance(DateFormat.MEDIUM,
Locale.US).parse("July 01, 2020"));
List certList = Collections.singletonList(eeCert);
CertPath cp = cf.generateCertPath(certList);
PKIXCertPathValidatorResult result =

View File

@@ -0,0 +1,94 @@
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
import java.util.concurrent.TimeUnit;
import java.util.concurrent.CountDownLatch;
import java.awt.Color;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.*;
import javax.swing.JPanel;
public abstract class AccessibleComponentTest {
protected static volatile boolean testResult = true;
protected static volatile CountDownLatch countDownLatch;
protected static String INSTRUCTIONS;
protected static String exceptionString;
protected JFrame mainFrame;
protected static AccessibleComponentTest a11yTest;
public abstract CountDownLatch createCountDownLatch();
public void createUI(JPanel component, String testName) {
mainFrame = new JFrame(testName);
GridBagLayout layout = new GridBagLayout();
JPanel mainControlPanel = new JPanel(layout);
JPanel resultButtonPanel = new JPanel(layout);
GridBagConstraints gbc = new GridBagConstraints();
JTextArea instructionTextArea = new JTextArea();
instructionTextArea.setText(INSTRUCTIONS);
instructionTextArea.setEditable(false);
instructionTextArea.setBackground(Color.white);
gbc.gridx = 0;
gbc.gridy = 0;
gbc.fill = GridBagConstraints.HORIZONTAL;
mainControlPanel.add(instructionTextArea, gbc);
gbc.gridx = 0;
gbc.gridy = 1;
mainControlPanel.add(component);
JButton passButton = new JButton("Pass");
passButton.setActionCommand("Pass");
passButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
mainFrame.dispose();
countDownLatch.countDown();
}
});
JButton failButton = new JButton("Fail");
failButton.setActionCommand("Fail");
failButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
testResult = false;
mainFrame.dispose();
countDownLatch.countDown();
}
});
gbc.gridx = 0;
gbc.gridy = 0;
resultButtonPanel.add(passButton, gbc);
gbc.gridx = 1;
gbc.gridy = 0;
resultButtonPanel.add(failButton, gbc);
gbc.gridx = 0;
gbc.gridy = 2;
mainControlPanel.add(resultButtonPanel, gbc);
mainFrame.add(mainControlPanel);
mainFrame.pack();
mainFrame.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
mainFrame.dispose();
countDownLatch.countDown();
}
});
mainFrame.setVisible(true);
}
}

View File

@@ -0,0 +1,142 @@
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
/*
* @test
* @summary manual test for JBR-2504
* @author Artem.Semenov@jetbrains.com
* @run main/manual AccessibleJListTest
*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionListener;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
public class AccessibleJListTest extends AccessibleComponentTest {
private static final String[] NAMES = {"One", "Two", "Three", "Four", "Five"};
static JWindow window;
public static void main(String[] args) throws Exception {
a11yTest = new AccessibleJListTest();
countDownLatch = a11yTest.createCountDownLatch();
SwingUtilities.invokeLater(((AccessibleJListTest) a11yTest)::createSimpleList);
countDownLatch.await();
if (!testResult) {
throw new RuntimeException(a11yTest.exceptionString);
}
countDownLatch = a11yTest.createCountDownLatch();
SwingUtilities.invokeLater(((AccessibleJListTest) a11yTest)::createCombobox);
countDownLatch.await();
if (!testResult) {
throw new RuntimeException(a11yTest.exceptionString);
}
countDownLatch = a11yTest.createCountDownLatch();
SwingUtilities.invokeLater(((AccessibleJListTest) a11yTest)::createPushButton);
countDownLatch.await();
if (!testResult) {
throw new RuntimeException(a11yTest.exceptionString);
}
}
@java.lang.Override
public CountDownLatch createCountDownLatch() {
return new CountDownLatch(1);
}
public void createSimpleList() {
INSTRUCTIONS = "INSTRUCTIONS:\n"
+ "Check a11y of JList in a simple Window.\n\n"
+ "Turn screen reader on, and Tab to the list.\n"
+ "Press the up and down arrow buttons to move through the list.\n\n"
+ "If you can hear menu items tab further and press PASS, otherwise press FAIL.\n";
JPanel frame = new JPanel();
JList<String> list = new JList<>(NAMES);
frame.setLayout(new FlowLayout());
frame.add(list);
exceptionString = "Accessible JList simple list test failed!";
super.createUI(frame, "Accessible JList test");
}
public void createCombobox() {
INSTRUCTIONS = "INSTRUCTIONS:\n"
+ "Check a11y of JList in a combobox.\n\n"
+ "Turn screen reader on, and Tab to the combobox.\n"
+ "Press the up and down arrow buttons to move through the list.\n\n"
+ "If you can hear combobox items tab further and press PASS, otherwise press FAIL.\n";
JPanel frame = new JPanel();
JComboBox<String> combo = new JComboBox<>(NAMES);
frame.setLayout(new FlowLayout());
frame.add(combo);
exceptionString = "Accessible JList combobox test failed!";
super.createUI(frame, "Accessible JList test");
}
public void createPushButton() {
INSTRUCTIONS = "INSTRUCTIONS:\n"
+ "Check a11y of JList in a popup.\n\n"
+ "Turn screen reader on, and Tab to the show button and press space.\n"
+ "Press the up and down arrow buttons to move through the list.\n\n"
+ "If you can hear popup menu items tab further and press PASS, otherwise press FAIL.\n";
JPanel frame = new JPanel();
JButton button = new JButton("show");
button.setPreferredSize(new Dimension(100, 35));
button.addActionListener(new ActionListener() {
final Runnable dispose = () -> {
window.dispose();
window = null;
button.setText("show");
};
@Override
public void actionPerformed(ActionEvent e) {
if (window == null) {
Rectangle bounds = frame.getBounds();
window = new JWindow(mainFrame);
JList<String> winList = new JList<>(NAMES);
winList.addKeyListener(new KeyAdapter() {
@Override
public void keyPressed(KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
dispose.run();
}
}
});
window.add(winList);
window.setLocation(bounds.x + bounds.width + 20, bounds.y);
window.pack();
window.setVisible(true);
button.setText("hide (ESC)");
} else {
dispose.run();
}
}
});
frame.setLayout(new FlowLayout());
frame.add(button);
exceptionString = "Accessible JList push button test failed!";
super.createUI(frame, "Accessible JList test");
}
}

View File

@@ -0,0 +1,57 @@
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
/*
* @test
* @summary manual test for JBR-2649
* @author Artem.Semenov@jetbrains.com
* @run main/manual AccessibleJTableTest
*/
import javax.swing.*;
import java.awt.*;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
public class AccessibleJTableTest extends AccessibleComponentTest {
@Override
public CountDownLatch createCountDownLatch() {
return new CountDownLatch(1);
}
public void createUI() {
INSTRUCTIONS = "INSTRUCTIONS:\n"
+ "Check a11y of JTable in a simple Window.\n\n"
+ "Turn screen reader on, and Tab to the table.\n"
+ "On Windows press the arrow buttons to move through the table.\n\n"
+ "On MacOS, use the up and down arrow buttons to move through rows, and VoiceOver fast navigation to move through columns.\n\n"
+ "If you can hear table cells tab further and press PASS, otherwise press FAIL.\n";
final String[] columnNames = {"One", "Two", "Three"};
String[][] data = {
{"One1", "Two1", "Three1"},
{"One2", "Two2", "Three2"},
{"One3", "Two3", "Three3"},
{"One4", "Two4", "Three4"},
{"One5", "Two5", "Three5"}
};
JTable table = new JTable(data, columnNames);
JPanel panel = new JPanel();
panel.setLayout(new FlowLayout());
JScrollPane scrollPane = new JScrollPane(table);
panel.add(scrollPane);
panel.setFocusable(false);
exceptionString = "AccessibleJTable test failed!";
super.createUI(panel, "AccessibleJTableTest");
}
public static void main(String[] args) throws Exception {
AccessibleJTableTest test = new AccessibleJTableTest();
countDownLatch = test.createCountDownLatch();
SwingUtilities.invokeAndWait(test::createUI);
countDownLatch.await(15, TimeUnit.MINUTES);
if (!testResult) {
throw new RuntimeException(exceptionString);
}
}
}

View File

@@ -0,0 +1,158 @@
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.lang.reflect.InvocationTargetException;
/**
* @test
* @key headful
* @summary Regression test for JBR-2412. The test checks that mouse actions are handled on jcef browser after hide and show it.
* @run main/othervm MouseEventTest
*/
public class MouseEventTest {
private static Robot robot;
private static final int WIDTH = 400;
private static final int HEIGHT = 400;
private static CefBrowserFrame browserFrame = new CefBrowserFrame(WIDTH, HEIGHT);
public static void main(String[] args) throws InvocationTargetException, InterruptedException {
try {
robot = new Robot();
SwingUtilities.invokeAndWait(browserFrame::initUI);
robot.waitForIdle();
doMouseActions();
if (!browserFrame.isMouseActionPerformed()) {
throw new RuntimeException("Test FAILED. Some of mouse actions were not handled.");
}
browserFrame.resetMouseActionsPerformedFlag();
browserFrame.hideAndShowBrowser();
robot.delay(100);
doMouseActions();
if (!browserFrame.isMouseActionPerformed()) {
throw new RuntimeException("Test FAILED. Some of mouse actions were not handled.");
}
System.out.println("Test PASSED");
} catch (AWTException e) {
e.printStackTrace();
} finally {
browserFrame.getBrowser().dispose();
JBCefApp.getInstance().getCefApp().dispose();
SwingUtilities.invokeAndWait(browserFrame::dispose);
}
}
private static void doMouseActions() {
Point frameCenter = new Point(browserFrame.getLocationOnScreen().x + WIDTH /2,
browserFrame.getLocationOnScreen().y + HEIGHT /2);
robot.mouseMove(frameCenter.x, frameCenter.y);
robot.delay(100);
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.delay(100);
robot.mouseMove(frameCenter.x + 1, frameCenter.y);
robot.delay(100);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
robot.delay(100);
robot.mouseWheel(1);
robot.delay(100);
}
}
class CefBrowserFrame extends JFrame {
private final JBCefBrowser browser = new JBCefBrowser();
private final int width, height;
private volatile boolean mouseActionPerformed = false;
private MouseAdapter mouseAdapter = new MouseAdapter() {
@Override
public void mouseDragged(MouseEvent e) {
mouseActionPerformed = true;
System.out.println("mouseDragged");
}
@Override
public void mouseMoved(MouseEvent e) {
mouseActionPerformed = true;
System.out.println("mouseMoved");
}
@Override
public void mouseWheelMoved(MouseWheelEvent e) {
mouseActionPerformed = true;
System.out.println("mouseWheelMoved");
}
@Override
public void mouseClicked(MouseEvent e) {
mouseActionPerformed = true;
System.out.println("mouseClicked");
}
@Override
public void mousePressed(MouseEvent e) {
mouseActionPerformed = true;
System.out.println("mousePressed");
}
@Override
public void mouseReleased(MouseEvent e) {
mouseActionPerformed = true;
System.out.println("mouseReleased");
}
@Override
public void mouseEntered(MouseEvent e) {
mouseActionPerformed = true;
System.out.println("mouseEntered");
}
};
public CefBrowserFrame(int width, int height) {
this.width = width;
this.height = height;
}
public void initUI() {
browser.getComponent().addMouseMotionListener(mouseAdapter);
browser.getComponent().addMouseListener(mouseAdapter);
browser.getComponent().addMouseWheelListener(mouseAdapter);
getContentPane().add(browser.getCefBrowser().getUIComponent());
setSize(width, height);
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
addWindowListener(new WindowAdapter() {
@Override
public void windowClosed(WindowEvent e) {
browser.dispose();
}
});
setVisible(true);
}
public void hideAndShowBrowser() {
Container parent = browser.getComponent().getParent();
parent.remove(browser.getComponent());
SwingUtilities.invokeLater(() -> parent.add(browser.getComponent()));
}
public JBCefBrowser getBrowser() {
return browser;
}
public void resetMouseActionsPerformedFlag() {
mouseActionPerformed = false;
}
public boolean isMouseActionPerformed() {
return mouseActionPerformed;
}
}

View File

@@ -0,0 +1,90 @@
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
import javax.swing.*;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseWheelEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.lang.reflect.InvocationTargetException;
/**
* @test
* @key headful
* @summary Regression test for JBR-2639. The test checks that mouse wheel action is handled on jcef browser.
* @run main/othervm MouseWheelEventTest
*/
public class MouseWheelEventTest {
public static void main(String[] args) throws InvocationTargetException, InterruptedException {
final int width = 400;
final int height = 400;
CefBrowserFrame browserFrame = new CefBrowserFrame(width, height);
try {
Robot r = new Robot();
SwingUtilities.invokeAndWait(browserFrame::initUI);
r.waitForIdle();
r.mouseMove(browserFrame.getLocationOnScreen().x + width/2,
browserFrame.getLocationOnScreen().y + height/2);
r.delay(100);
r.mouseWheel(1);
r.delay(100);
if (browserFrame.isMouseWheelMoved()) {
System.out.println("Test PASSED");
} else {
throw new RuntimeException("Test FAILED. Mouse wheel action was not handled.");
}
} catch (AWTException e) {
e.printStackTrace();
} finally {
browserFrame.getBrowser().dispose();
JBCefApp.getInstance().getCefApp().dispose();
SwingUtilities.invokeAndWait(browserFrame::dispose);
}
}
}
class CefBrowserFrame extends JFrame {
private volatile boolean mouseWheelMoved = false;
private final JBCefBrowser browser = new JBCefBrowser();
private int width, height;
public CefBrowserFrame(int width, int height) {
this.width = width;
this.height = height;
}
public void initUI() {
browser.getComponent().addMouseWheelListener(new MouseAdapter() {
@Override
public void mouseWheelMoved(MouseWheelEvent e) {
mouseWheelMoved = true;
System.out.println("mouseWheelMoved");
}
});
getContentPane().add(browser.getCefBrowser().getUIComponent());
setSize(width, height);
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
addWindowListener(new WindowAdapter() {
@Override
public void windowClosed(WindowEvent e) {
browser.dispose();
}
});
setVisible(true);
}
public JBCefBrowser getBrowser() {
return browser;
}
public boolean isMouseWheelMoved() {
return mouseWheelMoved;
}
}

View File

@@ -577,7 +577,7 @@ java/awt/TextField/SelectionInvisibleTest/SelectionInvisibleTest.java
java/awt/Toolkit/DesktopProperties/rfe4758438.java 8193547 linux-all
java/awt/Toolkit/LockingKeyStateTest/LockingKeyStateTest.java 8208514 windows-all
java/awt/Toolkit/RealSync/Test.java 6849383 generic-all
java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java 6829250 windows-all,linux-all,macosx-all
java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java 6829250,8253398 windows-all,linux-all,macosx-all
java/awt/Toolkit/ToolkitPropertyTest/ToolkitPropertyTest_Enable.java 6847163 generic-all
java/awt/TrayIcon/ActionCommand/ActionCommand.java 8197575,8150540 macosx-all,windows-all
java/awt/TrayIcon/ActionEventMask/ActionEventMask.java 8197575,8150540 macosx-all,windows-all
@@ -596,6 +596,7 @@ java/awt/TrayIcon/PopupMenuLeakTest/PopupMenuLeakTest.java
java/awt/Window/8159168/SetShapeTest.java 8208507 generic-all
java/awt/Window/BackgroundIsNotUpdated/BackgroundIsNotUpdated.java 8142536 generic-all
java/awt/Window/Grab/GrabTest.java 8196019 macosx-all,windows-all,linux-all
java/awt/Window/GetScreenLocation/GetScreenLocationTest.java 8225787 linux-all
java/awt/Window/MultiWindowApp/ChildAlwaysOnTopTest.java 8215132,8194941 macosx-all,windows-all,linux-all
java/awt/Window/MultiWindowApp/MultiWindowAppTest.java 8159904 macosx-all,windows-all,linux-all
java/awt/Window/OwnedWindowsLeak/OwnedWindowsLeak.java 8225116 windows-all
@@ -636,6 +637,7 @@ java/awt/dnd/NoFormatsCrashTest/NoFormatsCrashTest.html
java/awt/dnd/URIListBetweenJVMsTest/URIListBetweenJVMsTest.html 8171510,7124379 macosx-all,linux-all
java/awt/dnd/URIListToFileListBetweenJVMsTest/URIListToFileListBetweenJVMsTest.html 8194947 generic-all
java/awt/event/ComponentEvent/MovedResizedTardyEventTest/MovedResizedTardyEventTest.html 6511207 generic-all
java/awt/event/ComponentEvent/MovedResizedTwiceTest/MovedResizedTwiceTest.java 8225787 linux-all
java/awt/event/HierarchyEvent/AncestorResized/AncestorResized.java 6618538 generic-all
java/awt/event/InputEvent/EventWhenTest/EventWhenTest.java 8168646 generic-all
java/awt/event/KeyEvent/CorrectTime/CorrectTime.java 6626492 generic-all
@@ -728,6 +730,7 @@ java/lang/String/StringRepeat.java
java/lang/StringCoding/CheckEncodings.sh 7008363 generic-all
java/lang/System/LoggerFinder/modules/JDKLoggerForImageTest.java nobug windows-6.1 fails on Windows 7 only
java/lang/System/LoggerFinder/modules/UnnamedLoggerForImageTest.java nobug windows-6.1 fails on Windows 7 only
java/lang/System/OsVersionTest.java 8253702 macosx-10.16
############################################################################