Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0037230Openbravo ERPZ. Otherspublic2017-11-06 12:312018-01-03 12:39
alostale 
shuehner 
normalminorhave not tried
closedfixed 
5
 
3.0PR18Q1 
alostale
Core
No
0037230: JDK9: compilation warnings - Platform Team
Compiling Openbravo with Java 9 produces a big number of warnings. Most of them are caused by deprecation of methods.
1. Build Openbravo with Java 9
  -> Check warnings

Find attached warnings split by team [1].

---

[1] https://docs.google.com/a/openbravo.com/spreadsheets/d/1W0i8s183pX2s37rh8Qy3-G_nZi1kywLD-yeGqiMRaX8/edit?usp=sharing [^]
Most of these warnings are caused by deprecation, proposed alternatives in Java 9 are already present in Java 7 (which is current minimum requirement). Furthermore, these alternatives are generally better in terms of performance.

So, in all of these cases were alternative exists in Java 7, it should be used in favor of Java 9 deprecated one.
No tags attached.
related to feature request 0037083 closed alostale support JDK 9 
related to feature request 0031477 new shuehner Tracking issue to reduce the huge number of eclipse warnings in pi 
has duplicate defect 0032051 acknowledged platform review and remove occurrences of new BigDecimal(double) 
related to defect 0037231 closed collazoandy4 JDK9: compilation warnings - Functional Team 
related to defect 0037232 closed Retail JDK9: compilation warnings - Retail Team 
Issue History
2017-11-06 12:31alostaleNew Issue
2017-11-06 12:31alostaleAssigned To => platform
2017-11-06 12:31alostaleModules => Core
2017-11-06 12:31alostaleTriggers an Emergency Pack => No
2017-11-06 12:32alostaleCategoryA. Platform => Z. Others
2017-11-06 12:56alostaleFile Added: j9-warns
2017-11-06 12:56alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=16229#r16229
2017-11-06 12:57alostaleRelationship addedrelated to 0037083
2017-11-06 13:00alostaleRelationship addedhas duplicate 0032051
2017-11-06 13:01alostaleRelationship addedrelated to 0031477
2017-11-06 13:02alostaleIssue cloned0037231
2017-11-06 13:02alostaleRelationship addedrelated to 0037231
2017-11-06 13:03alostaleSummaryJDK9: compilation warnings => JDK9: compilation warnings - Platform Team
2017-11-06 13:04alostaleIssue cloned0037232
2017-11-06 13:04alostaleRelationship addedrelated to 0037232
2017-11-06 13:11alostaleStatusnew => acknowledged
2017-11-06 13:21alostaleFile Deleted: j9-warns
2017-11-06 13:21alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=16230#r16230
2017-12-14 17:18hgbotCheckin
2017-12-14 17:18hgbotNote Added: 0101044
2017-12-14 17:18hgbotStatusacknowledged => resolved
2017-12-14 17:18hgbotResolutionopen => fixed
2017-12-14 17:18hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/93673c76d8ccfe2404a513be8a5df28fc9041d7a [^]
2017-12-14 17:18alostaleAssigned Toplatform => shuehner
2017-12-14 17:18alostaleReview Assigned To => alostale
2017-12-14 17:18alostaleNote Added: 0101045
2017-12-14 17:18alostaleStatusresolved => closed
2017-12-14 17:18alostaleFixed in Version => 3.0PR18Q1
2018-01-03 12:39hudsonbotCheckin
2018-01-03 12:39hudsonbotNote Added: 0101526

Notes
(0101044)
hgbot   
2017-12-14 17:18   
Repository: erp/devel/pi
Changeset: 93673c76d8ccfe2404a513be8a5df28fc9041d7a
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Mon Dec 04 14:33:36 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/93673c76d8ccfe2404a513be8a5df28fc9041d7a [^]

fixed issue 37230. Fix java9 deprecation warnings.

Avoid constructors deprecated in java9. When fixing apply the following rules:
- The following applies to new Long, new Integer, new Boolean, ... equally
- new Long(20) -> 20L when needing Long object
  just use long literal auto-boxing will auto-convert to Long
- Long l = new Long(String) -> Long.valueOf
- long l = new Long(String) -> Long.parseLong
- sometimes code did new Long(...).longValue
  Replace that by directly using parseLong to return primitive instead
- in ReportingUtils.java instead of defining double constant and using it for
  only new Float -> change constant to be directly float instead

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/report/ReportingUtils.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/EnumUIDefinition.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/LinkUIDefinition.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/StringUIDefinition.java
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServlet.java
M modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
M modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonToDataConverter.java
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/CustomQuerySelectorDatasource.java
M src-core/src/org/openbravo/base/MultipartRequest.java
M src-core/src/org/openbravo/database/ConnectionProviderImpl.java
M src-test/src/org/openbravo/test/dal/DalStoredProcedureTest.java
M src-test/src/org/openbravo/test/dal/ValidationTest.java
M src-test/src/org/openbravo/test/role/inheritance/AccessPropagation.java
M src-test/src/org/openbravo/test/role/inheritance/AccessPropagationNotInherited.java
M src-test/src/org/openbravo/test/role/inheritance/DeletedAccessPropagation.java
M src-test/src/org/openbravo/test/role/inheritance/HorizontalInheritance.java
M src-test/src/org/openbravo/test/role/inheritance/RecalculatePermissions.java
M src-test/src/org/openbravo/test/role/inheritance/RoleInheritanceRestrictions.java
M src-test/src/org/openbravo/test/role/inheritance/VerticalInheritance.java
M src-test/src/org/openbravo/test/xml/EntityXMLImportTestBusinessObject.java
M src-wad/src/org/openbravo/wad/WadConnection.java
M src/org/openbravo/base/ServerVersionChecker.java
M src/org/openbravo/base/model/Column.java
M src/org/openbravo/base/model/Property.java
M src/org/openbravo/base/model/domaintype/BooleanDomainType.java
M src/org/openbravo/base/model/domaintype/ButtonDomainType.java
M src/org/openbravo/base/model/domaintype/LongDomainType.java
M src/org/openbravo/dal/core/OBInterceptor.java
M src/org/openbravo/dal/xml/XMLTypeConverter.java
M src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java
M src/org/openbravo/erpCommon/ad_forms/TranslationManager.java
M src/org/openbravo/erpCommon/ad_process/ApplyModulesCallServlet.java
M src/org/openbravo/erpCommon/businessUtility/WindowTabs.java
M src/org/openbravo/erpCommon/modules/ImportModule.java
M src/org/openbravo/erpCommon/modules/ModuleReferenceDataClientTree.java
M src/org/openbravo/erpCommon/modules/ModuleReferenceDataOrgTree.java
M src/org/openbravo/erpCommon/modules/ModuleTree.java
M src/org/openbravo/erpCommon/obps/ActivationKey.java
M src/org/openbravo/erpCommon/obps/CheckCleanCache.java
M src/org/openbravo/erpCommon/utility/GenericTree.java
M src/org/openbravo/erpCommon/utility/GenericTreeServlet.java
M src/org/openbravo/erpCommon/utility/JRFieldProviderDataSource.java
M src/org/openbravo/erpCommon/utility/OpenPentaho.java
M src/org/openbravo/erpCommon/utility/Utility.java
M src/org/openbravo/erpCommon/utility/WindowTree.java
M src/org/openbravo/erpCommon/utility/reporting/printing/PrintController.java
M src/org/openbravo/service/importprocess/ImportProcessUtils.java
---
(0101045)
alostale   
2017-12-14 17:18   
reviewed
(0101526)
hudsonbot   
2018-01-03 12:39   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/c81e0d3cbab5 [^]
Maturity status: Test