Skip to content

Commit

Permalink
Merge master HEAD 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 Jun 7, 2022
2 parents c7e4b63 + ceeea96 commit 5ccf02d
Show file tree
Hide file tree
Showing 85 changed files with 4,805 additions and 289 deletions.
1 change: 1 addition & 0 deletions make/conf/docs-modules.conf
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ DOCS_MODULES= \
jdk.hotspot.agent \
jdk.httpserver \
jdk.jpackage \
jdk.incubator.concurrent \
jdk.incubator.vector \
jdk.jartool \
jdk.javadoc \
Expand Down
3 changes: 2 additions & 1 deletion make/conf/module-loader-map.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 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
Expand Down Expand Up @@ -43,6 +43,7 @@ BOOT_MODULES= \
java.rmi \
java.security.sasl \
java.xml \
jdk.incubator.concurrent \
jdk.incubator.vector \
jdk.internal.vm.ci \
jdk.jfr \
Expand Down
26 changes: 13 additions & 13 deletions src/demo/share/java2d/J2DBench/src/j2dbench/Result.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -40,11 +40,11 @@

package j2dbench;

import java.util.Vector;
import java.util.Hashtable;
import java.util.Enumeration;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Vector;

public class Result {
public static final int RATE_UNKNOWN = 0;
Expand Down Expand Up @@ -243,7 +243,7 @@ public static int parseUnit(String c) {
int repsPerRun;
int unitsPerRep;
Vector times;
Hashtable modifiers;
LinkedHashMap modifiers;
Throwable error;

public Result(Test test) {
Expand Down Expand Up @@ -277,7 +277,7 @@ public void setError(Throwable t) {
this.error = t;
}

public void setModifiers(Hashtable modifiers) {
public void setModifiers(LinkedHashMap modifiers) {
this.modifiers = modifiers;
}

Expand All @@ -297,7 +297,7 @@ public long getUnitsPerRun() {
return ((long) getRepsPerRun()) * ((long) getUnitsPerRep());
}

public Hashtable getModifiers() {
public LinkedHashMap getModifiers() {
return modifiers;
}

Expand Down Expand Up @@ -423,11 +423,11 @@ public void summarize() {
System.out.println(test+" averaged "+getAverageString());
}
if (true) {
Enumeration enum_ = modifiers.keys();
Iterator iter_ = modifiers.keySet().iterator();
System.out.print(" with");
String sep = " ";
while (enum_.hasMoreElements()) {
Modifier mod = (Modifier) enum_.nextElement();
while (iter_.hasNext()) {
Modifier mod = (Modifier) iter_.next();
Object v = modifiers.get(mod);
System.out.print(sep);
System.out.print(mod.getAbbreviatedModifierDescription(v));
Expand All @@ -442,9 +442,9 @@ public void write(PrintWriter pw) {
"num-reps=\""+getRepsPerRun()+"\" "+
"num-units=\""+getUnitsPerRep()+"\" "+
"name=\""+test.getTreeName()+"\">");
Enumeration enum_ = modifiers.keys();
while (enum_.hasMoreElements()) {
Modifier mod = (Modifier) enum_.nextElement();
Iterator iter_ = modifiers.keySet().iterator();
while (iter_.hasNext()) {
Modifier mod = (Modifier) iter_.next();
Object v = modifiers.get(mod);
String val = mod.getModifierValueName(v);
pw.println(" <option "+
Expand Down
20 changes: 10 additions & 10 deletions src/demo/share/java2d/J2DBench/src/j2dbench/TestEnvironment.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -40,15 +40,15 @@

package j2dbench;

import java.awt.AlphaComposite;
import java.awt.Canvas;
import java.awt.Image;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Dimension;
import java.awt.AlphaComposite;
import java.awt.Color;
import java.awt.Image;
import java.awt.Toolkit;
import java.util.Hashtable;
import java.util.LinkedHashMap;

import j2dbench.tests.GraphicsTests;

Expand Down Expand Up @@ -105,12 +105,12 @@ public void runAllTests() {
Image srcImage;
boolean stopped;
ResultSet results;
Hashtable modifiers;
LinkedHashMap modifiers;
Timer timer;

public TestEnvironment() {
results = new ResultSet();
modifiers = new Hashtable();
modifiers = new LinkedHashMap();
timer = Timer.getImpl();
}

Expand Down Expand Up @@ -246,8 +246,8 @@ public void removeModifier(Modifier o) {
modifiers.remove(o);
}

public Hashtable getModifiers() {
return (Hashtable) modifiers.clone();
public LinkedHashMap getModifiers() {
return (LinkedHashMap) modifiers.clone();
}

public void record(Result result) {
Expand Down
11 changes: 6 additions & 5 deletions src/java.base/share/classes/java/lang/Double.java
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ public static String toHexString(double d) {
* a {@code NumberFormatException} be thrown, the regular
* expression below can be used to screen the input string:
*
* <pre>{@code
* {@snippet lang="java" :
* final String Digits = "(\\p{Digit}+)";
* final String HexDigits = "(\\p{XDigit}+)";
* // an exponent is 'e' or 'E' followed by an optionally
Expand Down Expand Up @@ -679,13 +679,14 @@ public static String toHexString(double d) {
* ")[pP][+-]?" + Digits + "))" +
* "[fFdD]?))" +
* "[\\x00-\\x20]*");// Optional trailing "whitespace"
*
* // @link region substring="Pattern.matches" target ="java.util.regex.Pattern#matches"
* if (Pattern.matches(fpRegex, myString))
* Double.valueOf(myString); // Will not throw NumberFormatException
* // @end
* else {
* // Perform suitable alternative action
* }
* }</pre>
* }
*
* @param s the string to be parsed.
* @return a {@code Double} object holding the value
Expand Down Expand Up @@ -1099,13 +1100,13 @@ public static long doubleToLongBits(double value) {
* <p>In all other cases, let <i>s</i>, <i>e</i>, and <i>m</i> be three
* values that can be computed from the argument:
*
* <blockquote><pre>{@code
* {@snippet lang="java" :
* int s = ((bits >> 63) == 0) ? 1 : -1;
* int e = (int)((bits >> 52) & 0x7ffL);
* long m = (e == 0) ?
* (bits & 0xfffffffffffffL) << 1 :
* (bits & 0xfffffffffffffL) | 0x10000000000000L;
* }</pre></blockquote>
* }
*
* Then the floating-point result equals the value of the mathematical
* expression <i>s</i>&middot;<i>m</i>&middot;2<sup><i>e</i>-1075</sup>.
Expand Down
4 changes: 2 additions & 2 deletions src/java.base/share/classes/java/lang/Float.java
Original file line number Diff line number Diff line change
Expand Up @@ -922,13 +922,13 @@ public static int floatToIntBits(float value) {
* <p>In all other cases, let <i>s</i>, <i>e</i>, and <i>m</i> be three
* values that can be computed from the argument:
*
* <blockquote><pre>{@code
* {@snippet lang="java" :
* int s = ((bits >> 31) == 0) ? 1 : -1;
* int e = ((bits >> 23) & 0xff);
* int m = (e == 0) ?
* (bits & 0x7fffff) << 1 :
* (bits & 0x7fffff) | 0x800000;
* }</pre></blockquote>
* }
*
* Then the floating-point result equals the value of the mathematical
* expression <i>s</i>&middot;<i>m</i>&middot;2<sup><i>e</i>-150</sup>.
Expand Down
4 changes: 2 additions & 2 deletions src/java.base/share/classes/java/lang/Integer.java
Original file line number Diff line number Diff line change
Expand Up @@ -1839,7 +1839,7 @@ public static int reverse(int i) {
* @see #expand
* @since 19
*/
// @IntrinsicCandidate
@IntrinsicCandidate
public static int compress(int i, int mask) {
// See Hacker's Delight (2nd ed) section 7.4 Compress, or Generalized Extract

Expand Down Expand Up @@ -1927,7 +1927,7 @@ public static int compress(int i, int mask) {
* @see #compress
* @since 19
*/
// @IntrinsicCandidate
@IntrinsicCandidate
public static int expand(int i, int mask) {
// Save original mask
int originalMask = mask;
Expand Down
4 changes: 2 additions & 2 deletions src/java.base/share/classes/java/lang/Long.java
Original file line number Diff line number Diff line change
Expand Up @@ -1978,7 +1978,7 @@ public static long reverse(long i) {
* @see #expand
* @since 19
*/
// @IntrinsicCandidate
@IntrinsicCandidate
public static long compress(long i, long mask) {
// See Hacker's Delight (2nd ed) section 7.4 Compress, or Generalized Extract

Expand Down Expand Up @@ -2066,7 +2066,7 @@ public static long compress(long i, long mask) {
* @see #compress
* @since 19
*/
// @IntrinsicCandidate
@IntrinsicCandidate
public static long expand(long i, long mask) {
// Save original mask
long originalMask = mask;
Expand Down
1 change: 1 addition & 0 deletions src/java.base/share/classes/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@
jdk.charsets,
jdk.compiler,
jdk.crypto.cryptoki,
jdk.incubator.concurrent,
jdk.incubator.vector,
jdk.jfr,
jdk.jshell,
Expand Down
3 changes: 3 additions & 0 deletions src/java.desktop/macosx/native/libawt_lwawt/font/AWTFont.m
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,9 @@ static OSStatus CreateFSRef(FSRef *myFSRefPtr, NSString *inPath)
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 ==
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,7 @@ protected void setContentsNative(Transferable contents) {
translateTransferable(contents, flavor, format);
publishClipboardData(format, bytes);
} catch (IOException e) {
// Fix 4696186: don't print exception if data with
// javaJVMLocalObjectMimeType failed to serialize.
// May remove this if-check when 5078787 is fixed.
if (!(flavor.isMimeTypeEqual(DataFlavor.javaJVMLocalObjectMimeType) &&
e instanceof java.io.NotSerializableException)) {
e.printStackTrace();
}
// Cannot be translated in this format, skip
}
}
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
package com.sun.jndi.ldap;

import java.io.*;
import java.util.ArrayList;
import java.util.Locale;
import java.util.Vector;
import java.util.Hashtable;
Expand Down Expand Up @@ -1577,15 +1578,15 @@ void processUnsolicited(BerDecoder ber) {


private void notifyUnsolicited(Object e) {
Vector<LdapCtx> unsolicitedCopy;
ArrayList<LdapCtx> unsolicitedCopy;
synchronized (unsolicited) {
unsolicitedCopy = new Vector<>(unsolicited);
unsolicitedCopy = new ArrayList<>(unsolicited);
if (e instanceof NamingException) {
unsolicited.setSize(0); // no more listeners after exception
}
}
for (int i = 0; i < unsolicitedCopy.size(); i++) {
unsolicitedCopy.elementAt(i).fireUnsolicited(e);
unsolicitedCopy.get(i).fireUnsolicited(e);
}
}

Expand Down
Loading

0 comments on commit 5ccf02d

Please sign in to comment.