Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge jdk8u352-b05 to 0.35 #608

Merged
merged 13 commits into from
Sep 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,878 changes: 1,386 additions & 2,492 deletions README-builds.html

Large diffs are not rendered by default.

1,266 changes: 1,266 additions & 0 deletions README-builds.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion closed/openjdk-tag.gmk
Original file line number Diff line number Diff line change
@@ -1 +1 @@
OPENJDK_TAG := jdk8u352-b04
OPENJDK_TAG := jdk8u352-b05
62 changes: 62 additions & 0 deletions common/bin/update-build-readme.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/bin/bash

# Get an absolute path to this script, since that determines the top-level
# directory.
this_script_dir=`dirname $0`
TOPDIR=`cd $this_script_dir/../.. > /dev/null && pwd`

GREP=grep
MD_FILE=$TOPDIR/README-builds.md
HTML_FILE=$TOPDIR/README-builds.html

# Locate the markdown processor tool and check that it is the correct version.
locate_markdown_processor() {
if [ -z "$MARKDOWN" ]; then
MARKDOWN=`which markdown 2> /dev/null`
if [ -z "$MARKDOWN" ]; then
echo "Error: Cannot locate markdown processor" 1>&2
exit 1
fi
fi

# Test version
MARKDOWN_VERSION=`$MARKDOWN -version | $GREP version`
if [ "x$MARKDOWN_VERSION" != "xThis is Markdown, version 1.0.1." ]; then
echo "Error: Expected markdown version 1.0.1." 1>&2
echo "Actual version found: $MARKDOWN_VERSION" 1>&2
echo "Download markdown here: https://daringfireball.net/projects/markdown/" 1>&2
exit 1
fi

}

# Verify that the source markdown file looks sound.
verify_source_code() {
TOO_LONG_LINES=`$GREP -E -e '^.{80}.+$' $MD_FILE`
if [ "x$TOO_LONG_LINES" != x ]; then
echo "Warning: The following lines are longer than 80 characters:"
$GREP -E -e '^.{80}.+$' $MD_FILE
fi
}

# Convert the markdown file to html format.
process_source() {
echo "Generating html file from markdown"
cat > $HTML_FILE << END
<html>
<head>
<title>OpenJDK Build README</title>
</head>
<body>
END
${MARKDOWN} $MD_FILE >> $HTML_FILE
cat >> $HTML_FILE <<END
</body>
</html>
END
echo "Done"
}

locate_markdown_processor
verify_source_code
process_source
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,8 @@ public BufferedImage read(int imageIndex, ImageReadParam param)
this.clearCode = 1 << initCodeSize;
this.eofCode = clearCode + 1;

int code, oldCode = 0;
final int NULL_CODE = -1;
int code, oldCode = NULL_CODE;

int[] prefix = new int[4096];
byte[] suffix = new byte[4096];
Expand All @@ -960,6 +961,7 @@ public BufferedImage read(int imageIndex, ImageReadParam param)
codeMask = (1 << codeSize) - 1;

code = getCode(codeSize, codeMask);
oldCode = NULL_CODE;
if (code == eofCode) {
// Inform IIOReadProgressListeners of end of image
processImageComplete();
Expand All @@ -982,24 +984,21 @@ public BufferedImage read(int imageIndex, ImageReadParam param)
}
}

if (tableIndex >= prefix.length) {
throw new IIOException("Code buffer limit reached,"
+ " no End of Image tag present, possibly data is corrupted. ");
}

int ti = tableIndex;
int oc = oldCode;
if (NULL_CODE != oldCode && tableIndex < 4096) {
int ti = tableIndex;
int oc = oldCode;

prefix[ti] = oc;
suffix[ti] = initial[newSuffixIndex];
initial[ti] = initial[oc];
length[ti] = length[oc] + 1;
prefix[ti] = oc;
suffix[ti] = initial[newSuffixIndex];
initial[ti] = initial[oc];
length[ti] = length[oc] + 1;

++tableIndex;
if ((tableIndex == (1 << codeSize)) &&
(tableIndex < 4096)) {
++codeSize;
codeMask = (1 << codeSize) - 1;
++tableIndex;
if ((tableIndex == (1 << codeSize)) &&
(tableIndex < 4096)) {
++codeSize;
codeMask = (1 << codeSize) - 1;
}
}
}

Expand Down
16 changes: 15 additions & 1 deletion jdk/src/share/classes/java/lang/System.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1994, 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 @@ -559,6 +559,10 @@ public static native void arraycopy(Object src, int srcPos,
* <td>Java installation directory</td></tr>
* <tr><td><code>java.vm.specification.version</code></td>
* <td>Java Virtual Machine specification version</td></tr>
* <tr><td><code>java.specification.maintenance.version</code></td>
* <td>Java Runtime Environment specification maintenance
* version, may be interpreted as a positive integer
* <em>(optional, see below)</em></td></tr>
* <tr><td><code>java.vm.specification.vendor</code></td>
* <td>Java Virtual Machine specification vendor</td></tr>
* <tr><td><code>java.vm.specification.name</code></td>
Expand Down Expand Up @@ -610,6 +614,16 @@ public static native void arraycopy(Object src, int srcPos,
* <td>User's current working directory</td></tr>
* </table>
* <p>
* The {@code java.specification.maintenance.version} property is
* defined if the specification implemented by this runtime at the
* time of its construction had undergone a <a
* href="https://jcp.org/en/procedures/jcp2#3.6.4">maintenance
* release</a>. When defined, its value identifies that
* maintenance release. To indicate the first maintenance release
* this property will have the value {@code "1"}, to indicate the
* second maintenance release this property will have the value
* {@code "2"}, and so on.
* <p>
* Multiple paths in a system property value are separated by the path
* separator character of the platform.
* <p>
Expand Down
7 changes: 6 additions & 1 deletion jdk/src/share/classes/java/lang/ref/FinalReference.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -33,4 +33,9 @@ class FinalReference<T> extends Reference<T> {
public FinalReference(T referent, ReferenceQueue<? super T> q) {
super(referent, q);
}

@Override
public boolean enqueue() {
throw new InternalError("should never reach here");
}
}
23 changes: 19 additions & 4 deletions jdk/src/share/classes/java/lang/ref/Reference.java
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ public void clear() {
this.referent = null;
}


/* -- Queue operations -- */

/**
Expand All @@ -282,8 +281,8 @@ public boolean isEnqueued() {
}

/**
* Adds this reference object to the queue with which it is registered,
* if any.
* Clears this reference object and adds it to the queue with which
* it is registered, if any.
*
* <p> This method is invoked only by Java code; when the garbage collector
* enqueues references it does so directly, without invoking this method.
Expand All @@ -293,10 +292,27 @@ public boolean isEnqueued() {
* it was not registered with a queue when it was created
*/
public boolean enqueue() {
this.referent = null;
return this.queue.enqueue(this);
}


/**
* Throws {@link CloneNotSupportedException}. A {@code Reference} cannot be
* meaningfully cloned. Construct a new {@code Reference} instead.
*
* @apiNote This method is defined in Java SE 8 Maintenance Release 4.
*
* @return never returns normally
* @throws CloneNotSupportedException always
*
* @since 8
*/
@Override
protected Object clone() throws CloneNotSupportedException {
throw new CloneNotSupportedException();
}

/* -- Constructors -- */

Reference(T referent) {
Expand All @@ -307,5 +323,4 @@ public boolean enqueue() {
this.referent = referent;
this.queue = (queue == null) ? ReferenceQueue.NULL : queue;
}

}
Loading