From 119899bc69a5936d2e38065d8a05705c6d37e66f Mon Sep 17 00:00:00 2001 From: Kevin Walls Date: Thu, 23 Jan 2025 11:06:11 +0000 Subject: [PATCH] 8345048: Remove the jmx.extend.open.types compatibility property Reviewed-by: cjplummer, amenkov, sspitsyn --- .../share/classes/javax/management/openmbean/OpenType.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/java.management/share/classes/javax/management/openmbean/OpenType.java b/src/java.management/share/classes/javax/management/openmbean/OpenType.java index a81359a7fe9..de2663bdc7f 100644 --- a/src/java.management/share/classes/javax/management/openmbean/OpenType.java +++ b/src/java.management/share/classes/javax/management/openmbean/OpenType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, 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 @@ -194,10 +194,7 @@ public abstract class OpenType implements Serializable { if (this.getClass().getClassLoader() == null) return; // We trust bootstrap classes. if (overridesGetClassName(this.getClass())) { - if (System.getProperty("jmx.extend.open.types") == null) { - throw new SecurityException("Cannot override getClassName() " + - "unless -Djmx.extend.open.types"); - } + throw new SecurityException("Cannot override getClassName()"); } }