You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Rick Hillegas (JIRA)" <ji...@apache.org> on 2017/01/15 18:49:26 UTC

[jira] [Updated] (DERBY-6856) Make it possible to build Derby using JDK 9

     [ 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-10-aa-disable-permissions-subverting-test.diff

Attaching derby-6856-10-aa-disable-permissions-subverting-test.diff. This patch disables a test case which fails on JDK 9.

The failing test tries to subvert class access controls in order to create a situation in which serialization is subverted. This kind of fiddling with access controls is not allowed in JDK 9.  The test could probably be re-written by hand-editting the serialized forms of java permissions. If we ever need to de-serialize Derby permissions, we may want to do that. However, I am not aware of any situation in which Derby de-serializes java permissions. I am reluctant to put more effort into testing our defenses against a non-problem.

The junit tests run cleanly with this patch on jdk 9 build 151. I am re-running the tests on jdk 8 now.


Touches the following files:

-----------------------

M       java/testing/org/apache/derbyTesting/junit/BaseTestCase.java

New method to report whether the current VM level is 1.8.

-----------------------

M       java/testing/org/apache/derbyTesting/unitTests/junit/SystemPrivilegesPermissionTest.java

Disables a test case if the VM level is not 1.8.


> 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-6856-07-aa-oneMoreNewInstance.diff, derby-6856-08-aa-cleanupJavadoc.diff, derby-6856-09-aa-javadocEntities.diff, derby-6856-10-aa-disable-permissions-subverting-test.diff, derby-6856-XX-ab-base.diff, derby-6856-XX-ac-base.diff, PTest.java, ptestScript
>
>
> 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)