jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Francesco Mari (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-7457) "Covariant return type change detected" warnings with java10
Date Wed, 05 Dec 2018 17:09:00 GMT

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

Francesco Mari commented on OAK-7457:
-------------------------------------

[~reschke], I fixed the Segment Store in OAK-7942. My solution was to create a wrapper for
{{ByteBuffer}} encapsulating the correct access pattern to the wrapped {{ByteBuffer}}. You
can find the wrapper class at {{org.apache.jackrabbit.oak.segment.spi.persistence.Buffer}}.
I don't know if this solution makes sense for the Document Node Store too. I wanted to give
you a heads up to save you from implementing similar code from scratch whenever you tackle
this issue.

> "Covariant return type change detected" warnings with java10
> ------------------------------------------------------------
>
>                 Key: OAK-7457
>                 URL: https://issues.apache.org/jira/browse/OAK-7457
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: documentmk, segment-tar
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>            Priority: Major
>             Fix For: 1.10
>
>
> We have quite a few warnings of type "Covariant return type change detected":
> {noformat}
> [INFO] C:\projects\apache\oak\trunk\oak-store-document\src\main\java\org\apache\jackrabbit\oak\plugins\document\persistentCache\broadcast\TCPBroadcaster.java:327:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.flip() has been
changed to java.nio.ByteBuffer java.nio.ByteBuffer.flip()
> [INFO] C:\projects\apache\oak\trunk\oak-store-document\src\main\java\org\apache\jackrabbit\oak\plugins\document\persistentCache\broadcast\UDPBroadcaster.java:135:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.limit(int) has
been changed to java.nio.ByteBuffer java.nio.ByteBuffer.limit(int)
> [INFO] C:\projects\apache\oak\trunk\oak-store-document\src\main\java\org\apache\jackrabbit\oak\plugins\document\persistentCache\broadcast\UDPBroadcaster.java:138:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.position(int) has
been changed to java.nio.ByteBuffer java.nio.ByteBuffer.position(int)
> [INFO] C:\projects\apache\oak\trunk\oak-store-document\src\main\java\org\apache\jackrabbit\oak\plugins\document\persistentCache\broadcast\TCPBroadcaster.java:226:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.position(int) has
been changed to java.nio.ByteBuffer java.nio.ByteBuffer.position(int)
> [INFO] C:\projects\apache\oak\trunk\oak-store-document\src\main\java\org\apache\jackrabbit\oak\plugins\document\persistentCache\broadcast\InMemoryBroadcaster.java:35:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.position(int) has
been changed to java.nio.ByteBuffer java.nio.ByteBuffer.position(int)
> [INFO] C:\projects\apache\oak\trunk\oak-store-document\src\main\java\org\apache\jackrabbit\oak\plugins\document\persistentCache\PersistentCache.java:519:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.limit(int) has
been changed to java.nio.ByteBuffer java.nio.ByteBuffer.limit(int)
> [INFO] C:\projects\apache\oak\trunk\oak-store-document\src\main\java\org\apache\jackrabbit\oak\plugins\document\persistentCache\PersistentCache.java:522:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.position(int) has
been changed to java.nio.ByteBuffer java.nio.ByteBuffer.position(int)
> [INFO] C:\projects\apache\oak\trunk\oak-store-document\src\main\java\org\apache\jackrabbit\oak\plugins\document\persistentCache\PersistentCache.java:535:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.position(int) has
been changed to java.nio.ByteBuffer java.nio.ByteBuffer.position(int)
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\data\SegmentDataV12.java:196:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.position(int) has
been changed to java.nio.ByteBuffer java.nio.ByteBuffer.position(int)
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\data\SegmentDataV12.java:197:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.limit(int) has
been changed to java.nio.ByteBuffer java.nio.ByteBuffer.limit(int)
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\data\SegmentDataUtils.java:57:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.position(int) has
been changed to java.nio.ByteBuffer java.nio.ByteBuffer.position(int)
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\data\SegmentDataUtils.java:58:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.limit(int) has
been changed to java.nio.ByteBuffer java.nio.ByteBuffer.limit(int)
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\file\tar\index\IndexWriter.java:110:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.position(int) has
been changed to java.nio.ByteBuffer java.nio.ByteBuffer.position(int)
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\file\tar\index\IndexLoaderV1.java:62:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.mark() has been
changed to java.nio.ByteBuffer java.nio.ByteBuffer.mark()
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\file\tar\index\IndexLoaderV1.java:64:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.reset() has been
changed to java.nio.ByteBuffer java.nio.ByteBuffer.reset()
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\file\tar\index\IndexLoaderV1.java:72:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.mark() has been
changed to java.nio.ByteBuffer java.nio.ByteBuffer.mark()
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\file\tar\index\IndexLoaderV1.java:101:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.reset() has been
changed to java.nio.ByteBuffer java.nio.ByteBuffer.reset()
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\file\tar\index\IndexLoaderV2.java:62:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.mark() has been
changed to java.nio.ByteBuffer java.nio.ByteBuffer.mark()
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\file\tar\index\IndexLoaderV2.java:64:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.reset() has been
changed to java.nio.ByteBuffer java.nio.ByteBuffer.reset()
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\file\tar\index\IndexLoaderV2.java:72:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.mark() has been
changed to java.nio.ByteBuffer java.nio.ByteBuffer.mark()
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\file\tar\index\IndexLoaderV2.java:101:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.reset() has been
changed to java.nio.ByteBuffer java.nio.ByteBuffer.reset()
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\file\tar\binaries\BinaryReferencesIndexLoader.java:71:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.position(int) has
been changed to java.nio.ByteBuffer java.nio.ByteBuffer.position(int)
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\file\tar\binaries\BinaryReferencesIndexLoader.java:73:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.rewind() has been
changed to java.nio.ByteBuffer java.nio.ByteBuffer.rewind()
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\file\tar\binaries\BinaryReferencesIndexLoaderV1.java:61:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.limit(int) has
been changed to java.nio.ByteBuffer java.nio.ByteBuffer.limit(int)
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\file\tar\binaries\BinaryReferencesIndexLoaderV1.java:63:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.position(int) has
been changed to java.nio.ByteBuffer java.nio.ByteBuffer.position(int)
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\file\tar\binaries\BinaryReferencesIndexLoaderV1.java:82:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.mark() has been
changed to java.nio.ByteBuffer java.nio.ByteBuffer.mark()
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\file\tar\binaries\BinaryReferencesIndexLoaderV1.java:84:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.reset() has been
changed to java.nio.ByteBuffer java.nio.ByteBuffer.reset()
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\file\tar\binaries\BinaryReferencesIndexLoaderV2.java:61:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.limit(int) has
been changed to java.nio.ByteBuffer java.nio.ByteBuffer.limit(int)
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\file\tar\binaries\BinaryReferencesIndexLoaderV2.java:63:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.position(int) has
been changed to java.nio.ByteBuffer java.nio.ByteBuffer.position(int)
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\file\tar\binaries\BinaryReferencesIndexLoaderV2.java:82:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.mark() has been
changed to java.nio.ByteBuffer java.nio.ByteBuffer.mark()
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\file\tar\binaries\BinaryReferencesIndexLoaderV2.java:84:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.reset() has been
changed to java.nio.ByteBuffer java.nio.ByteBuffer.reset()
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\file\tar\GraphLoader.java:78:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.mark() has been
changed to java.nio.ByteBuffer java.nio.ByteBuffer.mark()
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\file\tar\GraphLoader.java:80:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.reset() has been
changed to java.nio.ByteBuffer java.nio.ByteBuffer.reset()
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\file\tar\SegmentTarWriter.java:142:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.rewind() has been
changed to java.nio.ByteBuffer java.nio.ByteBuffer.rewind()
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\file\tar\FileAccess.java:72:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.position(int) has
been changed to java.nio.ByteBuffer java.nio.ByteBuffer.position(int)
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\file\tar\FileAccess.java:73:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.limit(int) has
been changed to java.nio.ByteBuffer java.nio.ByteBuffer.limit(int)
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\file\tar\SegmentTarManager.java:209:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.position(int) has
been changed to java.nio.ByteBuffer java.nio.ByteBuffer.position(int)
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\file\FileStore.java:489:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.rewind() has been
changed to java.nio.ByteBuffer java.nio.ByteBuffer.rewind()
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\memory\MemoryStore.java:118:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.rewind() has been
changed to java.nio.ByteBuffer java.nio.ByteBuffer.rewind()
> [INFO] C:\projects\apache\oak\trunk\oak-segment-tar\src\main\java\org\apache\jackrabbit\oak\segment\SegmentStream.java:156:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.position(int) has
been changed to java.nio.ByteBuffer java.nio.ByteBuffer.position(int)
> [INFO] C:\projects\apache\oak\trunk\oak-segment-azure\src\main\java\org\apache\jackrabbit\oak\segment\azure\AzureUtilities.java:69:
Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.rewind() has been
changed to java.nio.ByteBuffer java.nio.ByteBuffer.rewind()
> {noformat}
> I believe these will cause problems if we compile with java 10 but run on an earlier
VM.
> See also  https://jira.mongodb.org/browse/JAVA-2559



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message