8250856: Address reliance on default constructors in the AWT APIs

Reviewed-by: prr
This commit is contained in:
Sergey Bylokhov 2020-08-11 05:30:52 +01:00
parent 62a67c5d90
commit dce1aee4ef
15 changed files with 96 additions and 15 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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,12 @@ package java.awt.event;
* @since 1.1
*/
public abstract class ComponentAdapter implements ComponentListener {
/**
* Constructs a {@code ComponentAdapter}.
*/
protected ComponentAdapter() {}
/**
* Invoked when the component's size changes.
*/

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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,12 @@ package java.awt.event;
* @since 1.1
*/
public abstract class ContainerAdapter implements ContainerListener {
/**
* Constructs a {@code ContainerAdapter}.
*/
protected ContainerAdapter() {}
/**
* Invoked when a component has been added to the container.
*/

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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,12 @@ package java.awt.event;
* @since 1.1
*/
public abstract class FocusAdapter implements FocusListener {
/**
* Constructs a {@code FocusAdapter}.
*/
protected FocusAdapter() {}
/**
* Invoked when a component gains the keyboard focus.
*/

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 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
@ -49,6 +49,11 @@ package java.awt.event;
*/
public abstract class HierarchyBoundsAdapter implements HierarchyBoundsListener
{
/**
* Constructs a {@code HierarchyBoundsAdapter}.
*/
protected HierarchyBoundsAdapter() {}
/**
* Called when an ancestor of the source is moved.
*/

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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
@ -51,6 +51,12 @@ package java.awt.event;
* @since 1.1
*/
public abstract class KeyAdapter implements KeyListener {
/**
* Constructs a {@code KeyAdapter}.
*/
protected KeyAdapter() {}
/**
* Invoked when a key has been typed.
* This event occurs when a key press is followed by a key release.

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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,12 @@ package java.awt.event;
* @since 1.1
*/
public abstract class MouseAdapter implements MouseListener, MouseWheelListener, MouseMotionListener {
/**
* Constructs a {@code MouseAdapter}.
*/
protected MouseAdapter() {}
/**
* {@inheritDoc}
*/

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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
@ -54,6 +54,12 @@ package java.awt.event;
* @since 1.1
*/
public abstract class MouseMotionAdapter implements MouseMotionListener {
/**
* Constructs a {@code MouseMotionAdapter}.
*/
protected MouseMotionAdapter() {}
/**
* Invoked when a mouse button is pressed on a component and then
* dragged. Mouse drag events will continue to be delivered to

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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 @@ package java.awt.event;
public abstract class WindowAdapter
implements WindowListener, WindowStateListener, WindowFocusListener
{
/**
* Constructs a {@code WindowAdapter}.
*/
protected WindowAdapter() {}
/**
* Invoked when a window has been opened.
*/