[
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-06-aa-observable.diff
Attaching derby-6856-06-aa-observable.diff. This patch creates Derby
implementations of the now-deprecated Observer and Observable classes. Only the
methods currently used by Derby are implemented.
I will file an enhancement issue to re-visit these implementations. What I have
done is to use a Vector as the internal list of observers, just as
java.util.Observable does. It is possible that Derby could see some concurrency
benefits by using some structure from java.util.concurrent, instead. However, I
would like a Store expert to weigh in on this. It may be that there are
undocumented assumptions about Derby observers which require them to run their
callbacks one after the other rather than concurrently.
Note that another suggested amelioration of these deprecation warnings would be
to use a listener from the java.awt packages. This advice is given here:
http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-April/040436.html
However, I am reluctant to pull any java.awt classes into Derby after all of
the work which the community did in order to make Derby lean enough to run on
Java 8 compact profile 2. I think that the java.awt suggestion runs counter to
the spirit of Jigsaw.
I have built the patched code on JDK 8 and am running tests there. After I
cleanup the problems on JDK 8, I will rebuild and test on JDK 9.
Touches the following files:
-------------------------
M
java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derby.jar.lastcontents
M
java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derby.jar.lastcontents
A java/engine/org/apache/derby/iapi/services/monitor/DerbyObservable.java
A java/engine/org/apache/derby/iapi/services/monitor/DerbyObserver.java
Derby implementations of the deprecated Observable and Observer classes.
-------------------------
M java/engine/org/apache/derby/iapi/store/raw/xact/RawTransaction.java
M java/engine/org/apache/derby/impl/store/raw/data/BasePage.java
M java/engine/org/apache/derby/impl/store/raw/data/SyncOnCommit.java
M java/engine/org/apache/derby/impl/store/raw/data/TruncateOnCommit.java
M java/engine/org/apache/derby/impl/store/raw/data/DropOnCommit.java
M
java/engine/org/apache/derby/impl/store/raw/data/BaseContainerHandle.java
M
java/engine/org/apache/derby/impl/store/raw/data/StreamFileContainerHandle.java
M
java/engine/org/apache/derby/impl/store/raw/data/ContainerActionOnCommit.java
-------------------------
Corresponding adjustments to Derby's observers and observables.
> 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-6856-05-af-roundingMode-Class.getDeclaredConstructor.diff,
> derby-6856-05-ag-roundingMode-Class.newInstance.diff,
> derby-6856-06-aa-observable.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)