Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0038000 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | minor | N/A | 2018-02-26 13:41 | 2018-03-14 19:17 | |||
Reporter | caristu | View Status | public | |||||
Assigned To | jarmendariz | |||||||
Priority | high | Resolution | fixed | Fixed in Version | 3.0PR18Q2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 8b986621e742 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | caristu | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0038000: API change for ExternalConnectionPool.getInstance(String) method due to [deprecation] newInstance() warning removal | |||||||
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 [^] | |||||||
Steps To Reproduce | In description | |||||||
Proposed Solution | Replace current declaration: public final synchronized static ExternalConnectionPool getInstance( String externalConnectionPoolClassName) throws InstantiationException, IllegalAccessException, ClassNotFoundException { ... With just: public static final synchronized ExternalConnectionPool getInstance( String externalConnectionPoolClassName) throws ReflectiveOperationException { ... as ReflectiveOperationException is a superclass for all the exceptions we can possible throw with this method. | |||||||
Tags | Approved | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||||
|
Notes | |
(0103179) hgbot (developer) 2018-03-13 09:48 |
Repository: erp/devel/api-checks Changeset: 8b986621e742c72b0b0c1483f7777728b6ea1c15 Author: Javier Armendáriz <javier.armendariz <at> openbravo.com> Date: Tue Mar 13 09:47:00 2018 +0100 URL: http://code.openbravo.com/erp/devel/api-checks/rev/8b986621e742c72b0b0c1483f7777728b6ea1c15 [^] Fixes issue 38000: Handle new Exception thrown by newInstance method --- M java/reference/java.japi.gz --- |
(0103252) caristu (developer) 2018-03-14 19:17 |
Verified |
Issue History | |||
Date Modified | Username | Field | Change |
2018-02-26 13:41 | caristu | New Issue | |
2018-02-26 13:41 | caristu | Assigned To | => platform |
2018-02-26 13:41 | caristu | Modules | => Core |
2018-02-26 13:41 | caristu | Triggers an Emergency Pack | => No |
2018-02-26 13:41 | caristu | Relationship added | related to 0037943 |
2018-02-26 13:42 | caristu | Description Updated | View Revisions |
2018-02-26 13:46 | caristu | Proposed Solution updated | |
2018-02-26 13:46 | caristu | Proposed Solution updated | |
2018-02-26 16:05 | caristu | Summary | API change for ExternalConnectionPool.getInstance() method due to [deprecation] newInstance() warning removal => API change for ExternalConnectionPool.getInstance(String) method due to [deprecation] newInstance() warning removal |
2018-02-26 16:05 | caristu | Description Updated | View Revisions |
2018-02-26 16:05 | caristu | Description Updated | View Revisions |
2018-03-08 16:13 | alostale | Tag Attached: Approved | |
2018-03-13 09:45 | jarmendariz | Assigned To | platform => jarmendariz |
2018-03-13 09:45 | jarmendariz | Status | new => scheduled |
2018-03-13 09:48 | hgbot | Checkin | |
2018-03-13 09:48 | hgbot | Note Added: 0103179 | |
2018-03-13 09:48 | hgbot | Status | scheduled => resolved |
2018-03-13 09:48 | hgbot | Resolution | open => fixed |
2018-03-13 09:48 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/api-checks/rev/8b986621e742c72b0b0c1483f7777728b6ea1c15 [^] |
2018-03-13 09:50 | jarmendariz | Review Assigned To | => caristu |
2018-03-14 19:17 | caristu | Note Added: 0103252 | |
2018-03-14 19:17 | caristu | Status | resolved => closed |
2018-03-14 19:17 | caristu | Fixed in Version | => 3.0PR18Q2 |
2018-03-14 19:18 | caristu | Relationship added | related to 0038095 |
Copyright © 2000 - 2009 MantisBT Group |