[ 
https://issues.apache.org/jira/browse/DERBY-6856?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rick Hillegas updated DERBY-6856:
---------------------------------
    Attachment: derby-6856-05-ac-roundingMode-Class.newInstance.diff

Attaching derby-6856-05-ac-roundingMode-Class.newInstance.diff. This patch 
eliminates many uses of methods which became deprecated in JDK 9 early access 
build 118.

1) The BigDecimal methods which used rounding constants have been deprecated in 
favor of sister methods which use the RoundingMode enum. See 
http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-May/040707.html

2) Class.newInstance() has been deprecated. I replaced its usages with calls to 
Class.getConstructor().newInstance(), instead. See 
http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-April/040283.html. 
This caused a number of follow-on corrections in order to account for the fact 
that Constructor.newInstance() throws NoSuchMethodException and 
InvocationTargetException in addition to the exceptions thrown by 
Class.newInstance(). I found that certain no-arg constructors had to be made 
public in order to not raise NoSuchMethodException when invoked by 
Constructor.newInstance(). These were mostly implementations of TypeCompiler. 
However, a particularly hard one to find was the package private constructor of 
the generated class ClassSizeCatalogImpl. That one caused the build to fail 
when generating the toursdb database.

There are some more deprecation warnings which need to be cleared up, related 
to the deprecation of java.util.Observable. See 
http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-April/040436.html. I 
will address those in a later patch. In addition, there are more deprecations 
which are hidden by compiler flags which suppress the details. I will address 
those later, too.

I have built with JDK 8 and am testing on that platform now. Once I have 
cleared up the problems on that platform, I will build and test with JDK 9 
build 118.

Touches the following files:

{noformat}
M       java/build/org/apache/derbyBuild/ClassSizeCrawler.java
M       java/tools/org/apache/derby/tools/ij.java
M       java/tools/org/apache/derby/tools/dblook.java
M       java/tools/org/apache/derby/impl/tools/ij/ConnectionEnv.java
M       java/tools/org/apache/derby/impl/tools/ij/xaHelper.java
M       java/tools/org/apache/derby/impl/tools/ij/util.java
M       java/tools/org/apache/derby/impl/tools/ij/ij.jj
M       java/tools/org/apache/derby/impl/tools/ij/utilMain.java
M       java/tools/org/apache/derby/impl/tools/planexporter/AccessDatabase.java
M       java/demo/toursdb/insertMaps.java
M       java/demo/nserverdemo/SimpleNetworkClientSample.java
M       java/demo/nserverdemo/SimpleNetworkServerSample.java
M       java/engine/org/apache/derby/iapi/services/cache/ClassSizeCatalog.java
M       java/engine/org/apache/derby/iapi/services/diag/DiagnosticUtil.java
M       java/engine/org/apache/derby/iapi/services/loader/InstanceGetter.java
M       java/engine/org/apache/derby/iapi/services/loader/ClassInfo.java
M       java/engine/org/apache/derby/iapi/types/SQLDecimal.java
M       java/engine/org/apache/derby/impl/sql/compile/TimeTypeCompiler.java
M       java/engine/org/apache/derby/impl/sql/compile/TimestampTypeCompiler.java
M       java/engine/org/apache/derby/impl/sql/compile/RefTypeCompiler.java
M       java/engine/org/apache/derby/impl/sql/compile/AggregateNode.java
M       java/engine/org/apache/derby/impl/sql/compile/BooleanTypeCompiler.java
M       java/engine/org/apache/derby/impl/sql/compile/OptimizerTracer.java
M       
java/engine/org/apache/derby/impl/sql/compile/UserDefinedTypeCompiler.java
M       java/engine/org/apache/derby/impl/sql/compile/CLOBTypeCompiler.java
M       
java/engine/org/apache/derby/impl/sql/compile/TypeCompilerFactoryImpl.java
M       java/engine/org/apache/derby/impl/sql/compile/LOBTypeCompiler.java
M       java/engine/org/apache/derby/impl/sql/compile/DateTypeCompiler.java
M       java/engine/org/apache/derby/impl/sql/compile/BitTypeCompiler.java
M       java/engine/org/apache/derby/impl/sql/compile/XMLTypeCompiler.java
M       java/engine/org/apache/derby/impl/sql/execute/GenericAggregator.java
M       java/engine/org/apache/derby/impl/sql/execute/UserDefinedAggregator.java
M       java/engine/org/apache/derby/impl/sql/catalog/SequenceUpdater.java
M       
java/engine/org/apache/derby/impl/jdbc/authentication/SpecificAuthenticationServiceImpl.java
M       java/engine/org/apache/derby/impl/services/jce/JCECipherFactory.java
M       
java/engine/org/apache/derby/impl/services/reflect/LoadedGeneratedClass.java
M       java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java
M       
java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java
M       java/engine/org/apache/derby/jdbc/ReferenceableDataSource.java
M       java/engine/org/apache/derby/catalog/Java5SystemProcedures.java
M       java/optional/org/apache/derby/optional/dump/DataFileVTI.java
M       java/drda/org/apache/derby/impl/drda/DecryptionManager.java
M       java/drda/org/apache/derby/impl/drda/XADatabase.java
M       java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
M       
java/testing/org/apache/derbyTesting/unitTests/store/T_RawStoreFactory.java
M       java/testing/org/apache/derbyTesting/system/nstest/NsTest.java
M       java/testing/org/apache/derbyTesting/system/oe/client/Submitter.java
M       java/testing/org/apache/derbyTesting/system/mailjdbc/utils/DbTasks.java
M       
java/testing/org/apache/derbyTesting/system/sttest/utils/CompressTable.java
M       java/testing/org/apache/derbyTesting/system/sttest/Sttest.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/i18n/UrlLocaleTest.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/lang/outparams30.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/lang/ConcurrentImplicitCreateSchema.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/lang/GetPropertyInfoTest.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/DataSourceTest.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/store/InterruptResilienceTest.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/store/Beetle6038.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/store/BootAllTest.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/store/EncryptionAESTest.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceReferenceTest.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceSerializationTest.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/J2EEDataSourceTest.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AutoloadTest.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DriverTest.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/InternationalConnectTest.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClientConnectionPoolDataSourceTest.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceTest.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_3_p6.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_1Indexing.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/SimplePerfTest_Verify.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_3_p3.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_Encrypted_1.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_3_p4.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/SimplePerfTest.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_3.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/tools/dblook_test.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/memory/ConnectionHandlingJunit.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ShutDownDBWhenNSShutsDownTest.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/PrepareStatementTest.java
M       java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java
M       java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java
M       
java/testing/org/apache/derbyTesting/functionTests/harness/FileCompare.java
M       java/testing/org/apache/derbyTesting/functionTests/harness/shutdown.java
M       java/testing/org/apache/derbyTesting/functionTests/harness/jvm.java
M       
java/testing/org/apache/derbyTesting/functionTests/harness/dbcleanup.java
M       
java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/SerializeDataSources.java
M       
java/testing/org/apache/derbyTesting/functionTests/util/corruptio/CorruptDiskStorageFactory.java
M       java/testing/org/apache/derbyTesting/functionTests/util/TestUtil.java
M       java/testing/org/apache/derbyTesting/junit/DriverManagerConnector.java
M       java/testing/org/apache/derbyTesting/junit/TestConfiguration.java
M       java/testing/org/apache/derbyTesting/junit/ConnectorSetup.java
M       java/testing/org/apache/derbyTesting/junit/JDBCDataSource.java
M       java/testing/org/apache/derbyTesting/perf/clients/Runner.java
M       java/client/org/apache/derby/jdbc/ClientDriver.java
M       java/client/org/apache/derby/client/ClientDataSourceFactory.java
M       java/client/org/apache/derby/client/am/ClientPreparedStatement.java
{noformat}


> Make it possible to build Derby using JDK 9
> -------------------------------------------
>
>                 Key: DERBY-6856
>                 URL: https://issues.apache.org/jira/browse/DERBY-6856
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.12.1.1
>            Reporter: Rick Hillegas
>         Attachments: derby-6856-01-ab-addShardingKey.diff, 
> derby-6856-01-ac-cleanup.diff, derby-6856-02-aa-addShardingKey.diff, 
> derby-6856-03-aa-autoboxingDeprecationWarnings.diff, 
> derby-6856-03-ab-autoboxingDeprecationWarnings.diff, 
> derby-6856-04-aa-autoboxingDeprecationWarnings-part2.diff, 
> derby-6856-04-ab-autoboxingDeprecationWarnings-part2.diff, 
> derby-6856-05-ac-roundingMode-Class.newInstance.diff
>
>
> Derby can't be built with JDK 9. Java 9 introduces new JDBC classes like 
> java.sql.ShardingKey and methods which refer to these new classes.
> In addition, project Jigsaw has created a new way to name classes (see 
> http://openjdk.java.net/jeps/220). This breaks the PropertySetter build tool 
> which we use so that old JVMs can compile Derby and so that Derby can be 
> compiled to run on old JVMs.
> It is likely that we will need to leave this issue open throughout the 
> development cycle of Java 9.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to