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

8250859: Address reliance on default constructors in the Accessibility APIs #174

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -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