Skip to content
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
2 changes: 1 addition & 1 deletion make/conf/version-numbers.conf
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ DEFAULT_VERSION_CLASSFILE_MINOR=0
DEFAULT_VERSION_DOCS_API_SINCE=11
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="25 26"
DEFAULT_JDK_SOURCE_TARGET_VERSION=26
DEFAULT_PROMOTED_VERSION_PRE=ea
DEFAULT_PROMOTED_VERSION_PRE=
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2025, 2026, 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 @@ -82,8 +82,10 @@ public static boolean permits(String service, String algo) {
CryptoAlgorithmConstraints(String propertyName) {
super(null);
disabledServices = getAlgorithms(propertyName, true);
debug("Before " + Arrays.deepToString(disabledServices.toArray()));
for (String dk : disabledServices) {
String[] entries = disabledServices.toArray(new String[0]);
debug("Before " + Arrays.deepToString(entries));

for (String dk : entries) {
int idx = dk.indexOf(".");
if (idx < 1 || idx == dk.length() - 1) {
// wrong syntax: missing "." or empty service or algorithm
Expand Down
6 changes: 4 additions & 2 deletions src/java.desktop/share/classes/javax/swing/JPopupMenu.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2026, 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 @@ -960,7 +960,9 @@ public void setInvoker(Component invoker) {
if (oldInvoker != null) {
oldInvoker.removePropertyChangeListener("ancestor", propListener);
}
invoker.addPropertyChangeListener("ancestor", propListener);
if (invoker != null) {
invoker.addPropertyChangeListener("ancestor", propListener);
}
ui.installUI(this);
}
invalidate();
Expand Down
47 changes: 47 additions & 0 deletions test/jdk/javax/crypto/Cipher/TestDisabledWithOids.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/

/**
* @test
* @bug 8375549
* @summary Test JCE layer algorithm restriction using algorithms w/ oids
* @library /test/lib
* @run main/othervm -Djdk.crypto.disabledAlgorithms=Cipher.DES,Cipher.RSA/ECB/PKCS1Padding TestDisabledWithOids
* @run main/othervm -Djdk.crypto.disabledAlgorithms=Cipher.RSA/ECB/PKCS1Padding,Cipher.DES TestDisabledWithOids
*/
import java.security.NoSuchAlgorithmException;
import javax.crypto.Cipher;
import jdk.test.lib.Utils;

public class TestDisabledWithOids {
public static void main(String[] args) throws Exception {
String algo1 = "RSA/ECB/PKCS1Padding";
String algo2 = "DES";

Utils.runAndCheckException(() -> Cipher.getInstance(algo1),
NoSuchAlgorithmException.class);
Utils.runAndCheckException(() -> Cipher.getInstance(algo2),
NoSuchAlgorithmException.class);
System.out.println("Done");
}
}
12 changes: 10 additions & 2 deletions test/jdk/javax/swing/JPopupMenu/TestPopupInvoker.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2025, 2026, 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,13 +23,14 @@

/*
* @test
* @bug 4938801
* @bug 4938801 8376169
* @key headful
* @summary Verifies popup is removed when the component is removed
* @run main TestPopupInvoker
*/

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Container;
import java.awt.Robot;
import java.util.concurrent.CountDownLatch;
Expand All @@ -48,6 +49,7 @@ public class TestPopupInvoker {
static JFrame frame;
static JLabel label;
static Container pane;
static volatile Component invoker;

private static final CountDownLatch popupShown = new CountDownLatch(1);
private static final CountDownLatch popupHidden = new CountDownLatch(1);
Expand All @@ -73,6 +75,7 @@ public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
@Override
public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
popupHidden.countDown();
popupMenu.setInvoker(null);
}

@Override
Expand Down Expand Up @@ -106,6 +109,11 @@ public static void main(String[] args) throws Exception {
if (!popupHidden.await(1, SECONDS)) {
throw new RuntimeException("Popup is visible after component is removed");
}

SwingUtilities.invokeAndWait(() -> invoker = popupMenu.getInvoker());
if (invoker != null) {
throw new RuntimeException("Invoker is not null");
}
} finally {
SwingUtilities.invokeAndWait(() -> {
if (frame != null) {
Expand Down
Loading