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

José Andrés Cordero Benítez updated OAK-7457:
---------------------------------------------
    Attachment: fix-covariant-return-type-changed-OAK-7457.patch

> "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.18.0
>
>         Attachments: fix-covariant-return-type-changed-OAK-7457.patch
>
>
> 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
(v8.3.2#803003)

Reply via email to