Skip to content

Commit

Permalink
Merge master jdk-11.0.21+2 into openj9-staging
Browse files Browse the repository at this point in the history
Signed-off-by: J9 Build <j9build@ca.ibm.com>
  • Loading branch information
j9build committed Aug 10, 2023
2 parents 6abca1f + 7ef7b20 commit f1daefc
Show file tree
Hide file tree
Showing 10 changed files with 174 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1377,8 +1377,9 @@ public void run() {
}
}
while (doIO && thread == curThread) {
if (newFramePosition >= 0) {
clipBytePosition = newFramePosition * frameSize;
int npf = newFramePosition; // copy into local variable
if (npf >= 0) {
clipBytePosition = npf * frameSize;
newFramePosition = -1;
}
int endFrame = getFrameLength() - 1;
Expand Down
4 changes: 4 additions & 0 deletions src/java.desktop/share/native/libharfbuzz/hb-subset.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@
#include "OT/Color/sbix/sbix.hh"
#include "hb-ot-os2-table.hh"
#include "hb-ot-post-table.hh"

#if !defined(AIX)
#include "hb-ot-post-table-v2subset.hh"
#endif

#include "hb-ot-cff1-table.hh"
#include "hb-ot-cff2-table.hh"
#include "hb-ot-vorg-table.hh"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1628,7 +1628,8 @@ protected DocPath defaultAction(Element e, Void p) {
if (!(lower.startsWith("mailto:")
|| lower.startsWith("http:")
|| lower.startsWith("https:")
|| lower.startsWith("file:"))) {
|| lower.startsWith("file:")
|| lower.startsWith("ftp:"))) {
text = "{@" + (new DocRootTaglet()).getName() + "}/"
+ redirectPathFromRoot.resolve(text).getPath();
text = replaceDocRootDir(text);
Expand Down
6 changes: 3 additions & 3 deletions test/jdk/ProblemList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ java/awt/MenuBar/8007006/bug8007006.java 8213122 windows-all
# below test fails only on Win 7
java/awt/font/FontNames/LocaleFamilyNames.java 8213129 windows-all

java/awt/GraphicsDevice/DisplayModes/CycleDMImage.java 7099223 linux-all,solaris-all,windows-all
java/awt/GraphicsDevice/DisplayModes/CycleDMImage.java 7099223,8274106 macosx-aarch64,linux-all,solaris-all,windows-all
java/awt/keyboard/AllKeyCode/AllKeyCode.java 8242930 macosx-all
java/awt/FullScreen/8013581/bug8013581.java 8169471 macosx-all
java/awt/event/MouseEvent/RobotLWTest/RobotLWTest.java 8233568 macosx-all
Expand Down Expand Up @@ -736,7 +736,6 @@ java/awt/Robot/HiDPIScreenCapture/ScreenCaptureGtkTest.java 8282270 linux-all
java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.java 8282270 windows-all

# Several tests which fail on some hidpi systems
java/awt/GraphicsDevice/DisplayModes/CycleDMImage.java 8274106 macosx-aarch64
java/awt/Window/8159168/SetShapeTest.java 8274106 macosx-aarch64
java/awt/image/multiresolution/MultiResolutionJOptionPaneIconTest.java 8274106 macosx-aarch64
javax/swing/JFrame/8175301/ScaledFrameBackgroundTest.java 8274106 macosx-aarch64
Expand Down Expand Up @@ -860,9 +859,10 @@ javax/rmi/ssl/SSLSocketParametersTest.sh 8162906 generic-
# jdk_jfr

jdk/jfr/event/sampling/TestNative.java 8202142 generic-all
jdk/jfr/event/sampling/TestStackFrameLineNumbers.java 8313802 linux-all,windows-all
jdk/jfr/event/runtime/TestNetworkUtilizationEvent.java 8228990,8229370 generic-all
jdk/jfr/event/compiler/TestCodeSweeper.java 8225209 generic-all
jdk/jfr/event/oldobject/TestLargeRootSet.java 8205651 generic-all

############################################################################

12 changes: 2 additions & 10 deletions test/jdk/com/sun/jdi/OptionTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 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
Expand Down Expand Up @@ -33,8 +33,6 @@
* @run driver OptionTest
*/

import java.net.ServerSocket;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class OptionTest extends Object {
Expand Down Expand Up @@ -127,18 +125,12 @@ public String[] run (String[] cmdStrings) {
}

public static void main(String[] args) throws Exception {
// find a free port
ServerSocket ss = new ServerSocket(0);
int port = ss.getLocalPort();
ss.close();
String address = String.valueOf(port);

String javaExe = System.getProperty("java.home") +
java.io.File.separator + "bin" +
java.io.File.separator + "java";
String targetClass = "HelloWorld";
String baseOptions = "transport=dt_socket" +
",address=" + address +
",address=0" +
",server=y" +
",suspend=n";

Expand Down
41 changes: 23 additions & 18 deletions test/jdk/com/sun/jdi/RunToExit.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 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
Expand Down Expand Up @@ -30,7 +30,6 @@
* @build VMConnection RunToExit Exit0
* @run driver RunToExit
*/
import java.net.ServerSocket;
import com.sun.jdi.Bootstrap;
import com.sun.jdi.VirtualMachine;
import com.sun.jdi.event.*;
Expand All @@ -41,6 +40,8 @@
import java.util.List;
import java.util.Iterator;
import java.util.concurrent.TimeUnit;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import jdk.test.lib.process.ProcessTools;

Expand All @@ -50,6 +51,9 @@ public class RunToExit {
static volatile int error_seen = 0;
static volatile boolean ready = false;

/* port the debuggee is listening on */
private static String address;

/*
* Find a connector by name
*/
Expand All @@ -66,12 +70,11 @@ private static Connector findConnector(String name) {
}

/*
* Launch a server debuggee with the given address
* Launch a server debuggee, detect debuggee listening port
*/
private static Process launch(String address, String class_name) throws Exception {
private static Process launch(String class_name) throws Exception {
String args[] = new String[]{
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address="
+ address,
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=0",
class_name
};
args = VMConnection.insertDebuggeeVMOptions(args);
Expand All @@ -92,8 +95,17 @@ private static Process launch(String address, String class_name) throws Exceptio
return p;
}

/* warm-up predicate for debuggee */
private static Pattern listenRegexp = Pattern.compile("Listening for transport \\b(.+)\\b at address: \\b(.+)\\b");

private static boolean isTransportListening(String line) {
return line.startsWith("Listening for transport dt_socket");
Matcher m = listenRegexp.matcher(line);
if (!m.matches()) {
return false;
}
// address is 2nd group
address = m.group(2);
return true;
}

private static void checkForError(String line) {
Expand All @@ -103,28 +115,21 @@ private static void checkForError(String line) {
}

/*
* - pick a TCP port
* - Launch a server debuggee: server=y,suspend=y,address=${port}
* - Launch a server debuggee: server=y,suspend=y,address=0
* - detect the port debuggee is listening on
* - run it to VM death
* - verify we saw no error
*/
public static void main(String args[]) throws Exception {
// find a free port
ServerSocket ss = new ServerSocket(0);
int port = ss.getLocalPort();
ss.close();

String address = String.valueOf(port);

// launch the server debuggee
Process process = launch(address, "Exit0");
Process process = launch("Exit0");

// attach to server debuggee and resume it so it can exit
AttachingConnector conn = (AttachingConnector)findConnector("com.sun.jdi.SocketAttach");
Map conn_args = conn.defaultArguments();
Connector.IntegerArgument port_arg =
(Connector.IntegerArgument)conn_args.get("port");
port_arg.setValue(port);
port_arg.setValue(address);

System.out.println("Connection arguments: " + conn_args);

Expand Down
2 changes: 1 addition & 1 deletion test/jdk/javax/sound/sampled/Clip/SetPositionHang.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

/**
* @test
* @bug 8266421
* @bug 8266421 8269091
* @summary Tests that Clip.setFramePosition/setMicrosecondPosition do not hang.
*/
public final class SetPositionHang implements Runnable {
Expand Down
83 changes: 59 additions & 24 deletions test/jdk/javax/swing/JTableHeader/6889007/bug6889007.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,42 @@

/*
@test
@key headful
@key headful
@bug 6889007
@summary No resize cursor during hovering mouse over JTable
@author Alexander Potochkin
*/

import javax.swing.*;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.Robot;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;
import javax.imageio.ImageIO;
import javax.swing.JFrame;
import javax.swing.plaf.basic.BasicTableHeaderUI;
import javax.swing.table.JTableHeader;
import java.awt.*;
import javax.swing.JTable;
import javax.swing.SwingUtilities;

public class bug6889007 {

static JFrame frame;
static Robot robot;
static volatile Point point;
static volatile int width;
static volatile int height;

public static void main(String[] args) throws Exception {
Robot robot = new Robot();
robot.setAutoDelay(20);
try {
robot = new Robot();
robot.setAutoDelay(100);

final JFrame frame = new JFrame();
frame.setUndecorated(true);
SwingUtilities.invokeAndWait(() -> {
frame = new JFrame();
frame.setUndecorated(true);

SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

JTableHeader th = new JTableHeader();
Expand All @@ -56,21 +70,33 @@ public void run() {
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
});
robot.waitForIdle();
robot.delay(1000);
SwingUtilities.invokeAndWait(() -> {
point = frame.getLocationOnScreen();
width = frame.getWidth();
height = frame.getHeight();
});
int shift = 10;
int x = point.x;
int y = point.y + height/2;
for(int i = -shift; i < width + 2*shift; i++) {
robot.mouseMove(x++, y);
robot.waitForIdle();
}
});
robot.waitForIdle();
Point point = frame.getLocationOnScreen();
int shift = 10;
int x = point.x;
int y = point.y + frame.getHeight()/2;
for(int i = -shift; i < frame.getWidth() + 2*shift; i++) {
robot.mouseMove(x++, y);
}
robot.waitForIdle();
// 9 is a magic test number
if (MyTableHeaderUI.getTestValue() != 9) {
throw new RuntimeException("Unexpected test number "
+ MyTableHeaderUI.getTestValue());
robot.waitForIdle();
// 9 is a magic test number
if (MyTableHeaderUI.getTestValue() != 9) {
throw new RuntimeException("Unexpected test number "
+ MyTableHeaderUI.getTestValue());
}
} finally {
SwingUtilities.invokeAndWait(() -> {
if (frame != null) {
frame.dispose();
}
});
}
System.out.println("ok");
}
Expand All @@ -83,6 +109,15 @@ protected void rolloverColumnUpdated(int oldColumn, int newColumn) {
Cursor cursor = Cursor.getPredefinedCursor(Cursor.E_RESIZE_CURSOR);
if (oldColumn != -1 && newColumn != -1 &&
header.getCursor() != cursor) {
try {
Dimension screenSize =
Toolkit.getDefaultToolkit().getScreenSize();
Rectangle screen = new Rectangle(0, 0,
(int) screenSize.getWidth(),
(int) screenSize.getHeight());
BufferedImage img = robot.createScreenCapture(screen);
ImageIO.write(img, "png", new java.io.File("image.png"));
} catch (Exception e) {}
throw new RuntimeException("Wrong type of cursor!");
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 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
Expand All @@ -23,7 +23,7 @@

/*
* @test
* @bug 4638015
* @bug 4638015 8248001
* @summary Determine if Hrefs are processed properly when they
* appear in doc comments.
* @author jamieh
Expand Down
Loading

0 comments on commit f1daefc

Please sign in to comment.