Skip to content
Permalink
Browse files
8250859: Address reliance on default constructors in the Accessibilit…
…y APIs

Reviewed-by: prr
  • Loading branch information
c-cleary authored and Phil Race committed Sep 24, 2020
1 parent 89c5e49 commit a9d04408b3417a3da4d571d65bd804f89170f70f
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 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
@@ -79,6 +79,11 @@
@JavaBean(description = "Minimal information that all accessible objects return")
public abstract class AccessibleContext {

/**
* Constructor for subclasses to call.
*/
protected AccessibleContext() {}

/**
* The {@code AppContext} that should be used to dispatch events for this
* {@code AccessibleContext}.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 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
@@ -38,6 +38,11 @@
*/
public abstract class AccessibleHyperlink implements AccessibleAction {

/**
* Constructor for subclasses to call.
*/
protected AccessibleHyperlink() {}

/**
* Since the document a link is associated with may have changed, this
* method returns whether or not this Link is still valid (with respect to
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 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
@@ -38,6 +38,11 @@
@Deprecated
public class AccessibleResourceBundle extends ListResourceBundle {

/**
* Constructs an {@code AccessibleResourceBundle}.
*/
public AccessibleResourceBundle() {}

/**
* Returns the mapping between the programmatic keys and the localized
* display strings.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 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
@@ -45,6 +45,11 @@

public class AWTEventMonitor {

/**
* Constructs an {@code AWTEventMonitor}.
*/
public AWTEventMonitor() {}

/**
* The current component with keyboard focus.
*
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 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
@@ -45,6 +45,11 @@

public class AccessibilityEventMonitor {

/**
* Constructs an {@code AccessibilityEventMonitor}.
*/
public AccessibilityEventMonitor() {}

// listeners
/**
* The current list of registered {@link java.beans.PropertyChangeListener
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 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
@@ -46,6 +46,11 @@
*/
protected transient Object[] listenerList = NULL_ARRAY;

/**
* Constructs an {@code AccessibilityListenerList}.
*/
public AccessibilityListenerList() {}

/**
* Passes back the event listener list as an array of listener type, listener pairs.
* Note that for performance reasons, this implementation passes back the actual
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 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
@@ -37,6 +37,11 @@
*/
public class EventID {

/**
* Constructs an {@code EventID}.
*/
public EventID() {}

/**
* Maps to AWT Action support (i.e., ActionListener and ActionEvent)
*/
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 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
@@ -58,6 +58,10 @@
*/
public class SwingEventMonitor extends AWTEventMonitor {

/**
* Constructs a {@code SwingEventMonitor}.
*/

/**
* The master list of all listeners registered by other classes.
* This can only be publicly modified by calling the add or

1 comment on commit a9d0440

@bridgekeeper

This comment has been minimized.

Copy link

@bridgekeeper bridgekeeper bot commented on a9d0440 Sep 24, 2020

Please sign in to comment.