Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions src/java.desktop/share/classes/java/beans/Beans.java
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the copyright year be bumped to 2025?

Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,22 @@ public Beans() {}
* <p>
* Instantiate a JavaBean.
* </p>
* The bean is created based on a name relative to a class-loader.
* This name should be a dot-separated name such as "a.b.c".
* <p>
* The given name can indicate either a serialized object or a class.
* We first try to treat the beanName as a serialized object
* name then as a class name.
* <p>
* When using the beanName as a serialized object name we convert the
* given beanName to a resource pathname and add a trailing ".ser" suffix.
* We then try to load a serialized object from that resource.
* <p>
* For example, given a beanName of "x.y", Beans.instantiate would first
* try to read a serialized object from the resource "x/y.ser" and if
* that failed it would try to load the class "x.y" and create an
* instance of that class.
*
* @return a JavaBean
* @param cls the class-loader from which we should create
* the bean. If this is null, then the system
Expand All @@ -84,6 +100,22 @@ public static Object instantiate(ClassLoader cls, String beanName) throws IOExce
* <p>
* Instantiate a JavaBean.
* </p>
* The bean is created based on a name relative to a class-loader.
* This name should be a dot-separated name such as "a.b.c".
* <p>
* The given name can indicate either a serialized object or a class.
* We first try to treat the beanName as a serialized object
* name then as a class name.
* <p>
* When using the beanName as a serialized object name we convert the
* given beanName to a resource pathname and add a trailing ".ser" suffix.
* We then try to load a serialized object from that resource.
* <p>
* For example, given a beanName of "x.y", Beans.instantiate would first
* try to read a serialized object from the resource "x/y.ser" and if
* that failed it would try to load the class "x.y" and create an
* instance of that class.
*
* @return a JavaBean
*
* @param cls the class-loader from which we should create
Expand Down