Skip to content

Commit

Permalink
8250859: Address reliance on default constructors in the Accessibilit…
Browse files Browse the repository at this point in the history
…y APIs
  • Loading branch information
c-cleary committed Sep 14, 2020
1 parent 68da63d commit a2946ac
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 7 deletions.
@@ -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
Expand Down Expand Up @@ -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}.
Expand Down
@@ -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
Expand Down Expand Up @@ -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
Expand Down
@@ -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
Expand Down Expand Up @@ -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.
Expand Down
@@ -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
Expand Down Expand Up @@ -45,6 +45,11 @@

public class AWTEventMonitor {

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

/**
* The current component with keyboard focus.
*
Expand Down
@@ -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
Expand Down Expand Up @@ -45,6 +45,11 @@

public class AccessibilityEventMonitor {

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

// listeners
/**
* The current list of registered {@link java.beans.PropertyChangeListener
Expand Down
@@ -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
Expand Down Expand Up @@ -46,6 +46,11 @@ public class AccessibilityListenerList {
*/
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
Expand Down
@@ -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
Expand Down Expand Up @@ -37,6 +37,11 @@
*/
public class EventID {

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

/**
* Maps to AWT Action support (i.e., ActionListener and ActionEvent)
*/
Expand Down

0 comments on commit a2946ac

Please sign in to comment.