You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Konrad Windszus (JIRA)" <ji...@apache.org> on 2017/10/19 14:09:00 UTC

[jira] [Comment Edited] (JCR-4191) baseline checks fails for jackrabbit-webdav under Java 9

    [ https://issues.apache.org/jira/browse/JCR-4191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16210741#comment-16210741 ] 

Konrad Windszus edited comment on JCR-4191 at 10/19/17 2:08 PM:
----------------------------------------------------------------

I think it is important to clearly understand what happens here and to have a closer look at the output of bnd's baselining report here:

With the overriding of the hashCode() in JCR-4100 the annotation {{jdk.internal.HotSpotIntrinsicCandidate}} being set by default on Object.hashCode() has been removed. This makes totally sense as the custom hashCode is no longer a candidate for being replaced by an intrinsic function.

This happens only when the baselining is executed with Java9, as only then the method {{java.lang.Object#hashCode()}} has the annotation {{jdk.internal.HotSpotIntrinsicCandidate}}. When being executed with Java8 or below the annotation is not there on {{java.lang.Object#hashCode()}}  and therefore no difference is being detected.

Nevertheless I agree with [~karlpauls] that baselining in bnd should ignore those special annotations, as those could also come and go if you first compile with Java9 and then with Java8 (so even without any actual code changes).


was (Author: kwin):
I think it is important to clearly understand what happens here and to have a closer look at the output of bnd's baselining report here:

With the overriding of the hashCode() in JCR-4100 the annotation {{jdk.internal.HotSpotIntrinsicCandidate}} being set by default on Object.hashCode() has been removed. This makes totally sense as the custom hashCode is no longer a candidate for being replaced by an intrinsic function.

Nevertheless I agree with [~karlpauls] that baselining in bnd should ignore those special annotations, as those could also come and go if you first compile with Java9 and then with Java8 (so even without any actual code changes).

> baseline checks fails for jackrabbit-webdav under Java 9
> --------------------------------------------------------
>
>                 Key: JCR-4191
>                 URL: https://issues.apache.org/jira/browse/JCR-4191
>             Project: Jackrabbit Content Repository
>          Issue Type: Sub-task
>          Components: jackrabbit-webdav
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>             Fix For: 2.16
>
>
> with:
> {noformat}
> [INFO] * org.apache.jackrabbit.webdav.lock                  changed    1.0.0      1.0.0      1.0.1      Version increase required
> [INFO]      ~ class org.apache.jackrabbit.webdav.lock.Scope
> [INFO]          ~ method hashCode()
> [INFO]              - annotated jdk.internal.HotSpotIntrinsicCandidate
> {noformat}
> Note that {{hashCode()}} was indeed added for JCR-4100, but why does have adding {{hashCode()}} have this effect, and only when the bunde plugin is *run* with Java 9?.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)