8250583: Address reliance on default constructors in java.management

Reviewed-by: alanb
This commit is contained in:
Joe Darcy 2020-07-25 12:49:09 -07:00
parent 5a365e8627
commit dfd3080c05
7 changed files with 42 additions and 7 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2020, 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
@ -50,6 +50,10 @@ public class AttributeChangeNotificationFilter implements NotificationFilter {
*/
private Vector<String> enabledAttributes = new Vector<String>();
/**
* Constructs an {@code AttributeChangeNotificationFilter}.
*/
public AttributeChangeNotificationFilter() {}
/**
* Invoked before sending the specified notification to the listener.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2020, 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
@ -50,6 +50,11 @@ import javax.management.loading.ClassLoaderRepository;
*/
@Deprecated
public class DefaultLoaderRepository {
/**
* Constructs an {@code DefaultLoaderRepository}.
*/
public DefaultLoaderRepository() {}
/**
* Go through the list of class loaders and try to load the requested class.
* The method will stop as soon as the class is found. If the class

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2020, 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
@ -68,6 +68,11 @@ public class NotificationFilterSupport implements NotificationFilter {
private List<String> enabledTypes = new Vector<String>();
/**
* Constructs a {@code NotificationFilterSupport}.
*/
public NotificationFilterSupport() {}
/**
* Invoked before sending the specified notification to the listener.
* <BR>This filter compares the type of the specified notification with each enabled type.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2020, 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
@ -41,6 +41,11 @@ public abstract class QueryEval implements Serializable {
private static ThreadLocal<MBeanServer> server =
new InheritableThreadLocal<MBeanServer>();
/**
* Constructor for subclasses to call.
*/
public QueryEval() {}
/**
* <p>Sets the MBean server on which the query is to be performed.
* The setting is valid for the thread performing the set.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2020, 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
@ -55,6 +55,11 @@ import javax.management.MBeanServerFactory;
@Deprecated
public class DefaultLoaderRepository {
/**
* Constructs a {@code DefaultLoaderRepository}.
*/
public DefaultLoaderRepository() {}
/**
* Go through the list of class loaders and try to load the requested
* class.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2020, 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
@ -76,6 +76,11 @@ public abstract class Monitor
extends NotificationBroadcasterSupport
implements MonitorMBean, MBeanRegistration {
/**
* Constructor for subclasses to call.
*/
public Monitor() {}
/*
* ------------------------------------------
* PACKAGE CLASSES

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2020, 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
@ -33,6 +33,12 @@ package javax.management.relation;
*/
public class RoleStatus {
/**
* Do not call.
*/
@Deprecated(since="16", forRemoval=true)
public RoleStatus() {}
//
// Possible problems
//