Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Revisions: Issue #38000 All Revisions ] Back to Issue ]
Summary 0038000: API change for ExternalConnectionPool.getInstance(String) method due to [deprecation] newInstance() warning removal
Revision 2018-02-26 16:05 by caristu
Description JDK 9 deprecates clazz.newInstance() method[1]. This is because this method effectively bypasses the compile-time exception checking that would otherwise be performed by the compiler.

To avoid this problem, this call can be replaced by clazz.getDeclaredConstructor().newInstance(). This sequence of calls is inferred to be able to throw the additional exception types InvocationTargetException and NoSuchMethodException.

Apply this internal replacement (see issue 0037943) in the getInstance(String) method of the ExternalConnectionPool class, forces to declare the thrown of this two exception types in this method declaration, which is an API change.

[1] https://docs.oracle.com/javase/9/docs/api/java/lang/Class.html [^]
Revision 2018-02-26 16:05 by caristu
Description JDK 9 deprecates clazz.newInstance() method[1]. This is because this method effectively bypasses the compile-time exception checking that would otherwise be performed by the compiler.

To avoid this problem, this call can be replaced by clazz.getDeclaredConstructor().newInstance(). This sequence of calls is inferred to be able to throw the additional exception types InvocationTargetException and NoSuchMethodException.

Doing this internal replacement (see issue 0037943) in the getInstance(String) method of the ExternalConnectionPool class, forces to declare the thrown of this two exception types in this method declaration, which is an API change.

[1] https://docs.oracle.com/javase/9/docs/api/java/lang/Class.html [^]
Revision 2018-02-26 13:42 by caristu
Description JDK 9 deprecates clazz.newInstance() method[1]. This is because this method effectively bypasses the compile-time exception checking that would otherwise be performed by the compiler.

To avoid this problem, this call can be replaced by clazz.getDeclaredConstructor().newInstance(). This sequence of calls is inferred to be able to throw the additional exception types InvocationTargetException and NoSuchMethodException.

Doing this internal replacement (see issue 0037943) in the getInstance() method of the ExternalConnectionPool class, forces to declare the thrown of this two exception types in this method declaration, which is an API change.

[1] https://docs.oracle.com/javase/9/docs/api/java/lang/Class.html [^]
Revision 2018-02-26 13:41 by caristu
Description JDK 9 deprecates clazz.newInstance() method[1]. This is because this method effectively bypasses the compile-time exception checking that would otherwise be performed by the compiler.

To avoid this problem, this call can be replaced by clazz.getDeclaredConstructor().newInstance(). This sequence of calls is inferred to be able to throw the additional exception types InvocationTargetException and NoSuchMethodException.

Doing this internal replacement (see issue 0037943) in the getInstance() method of the ExternalConnectionPool forces to declare the thrown of this two exception types in this method declaration, which is an API change.

[1] https://docs.oracle.com/javase/9/docs/api/java/lang/Class.html [^]


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker