8250857: Address reliance on default constructors in the Java Beans API
Reviewed-by: prr
This commit is contained in:
parent
dce1aee4ef
commit
3148072079
src/java.desktop/share/classes/java/beans
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 2015, 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
|
||||
@ -59,6 +59,11 @@ import java.util.Vector;
|
||||
|
||||
public class Beans {
|
||||
|
||||
/**
|
||||
* Constructs a {@code Beans}.
|
||||
*/
|
||||
public Beans() {}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Instantiate a JavaBean.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2011, 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
|
||||
@ -52,6 +52,11 @@ public class Encoder {
|
||||
boolean executeStatements = true;
|
||||
private Map<Object, Object> attributes;
|
||||
|
||||
/**
|
||||
* Constructs an {@code Encoder}.
|
||||
*/
|
||||
public Encoder() {}
|
||||
|
||||
/**
|
||||
* Write the specified object to the output stream.
|
||||
* The serialized form will denote a series of
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, 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
|
||||
@ -87,6 +87,11 @@ package java.beans;
|
||||
|
||||
public abstract class PersistenceDelegate {
|
||||
|
||||
/**
|
||||
* Constructs a {@code PersistenceDelegate}.
|
||||
*/
|
||||
protected PersistenceDelegate() {}
|
||||
|
||||
/**
|
||||
* The {@code writeObject} is a single entry point to the persistence
|
||||
* and is used by an {@code Encoder} in the traditional
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 2011, 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,11 @@ package java.beans;
|
||||
|
||||
public class PropertyEditorManager {
|
||||
|
||||
/**
|
||||
* Constructs a {@code PropertyEditorManager}.
|
||||
*/
|
||||
public PropertyEditorManager() {}
|
||||
|
||||
/**
|
||||
* Registers an editor class to edit values of the given target class.
|
||||
* If the editor class is {@code null},
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 2016, 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
|
||||
@ -46,6 +46,11 @@ import java.security.PrivilegedAction;
|
||||
*/
|
||||
public class SimpleBeanInfo implements BeanInfo {
|
||||
|
||||
/**
|
||||
* Constructs a {@code SimpleBeanInfo}.
|
||||
*/
|
||||
public SimpleBeanInfo() {}
|
||||
|
||||
/**
|
||||
* Deny knowledge about the class and customizer of the bean.
|
||||
* You can override this if you wish to provide explicit info.
|
||||
|
Loading…
x
Reference in New Issue
Block a user