Hi Robert,

The signature of flip() is not changed. There could be something
else here.

Did you see this issue with jdk 9 ea b40 or in any other
jdk 9 ea builds or in any 8u40 ea builds ?


If the issue is specific to 9 ea b41 or even specific to
9 ea builds, please file an incident and let me know the
incident number. I will take that forward.


Thank you.


Regards
Balchandra


On 12/ 9/14 07:33 PM, Robert Scholte wrote:
Hi,

I've tried to build Maven itself with this JDK version. It fails almost at the end when building Maven Compat.

The output:
[INFO] --- animal-sniffer-maven-plugin:1.10:check (check-java-1.6-compat) @ maven-compat --- [INFO] Checking unresolved references to org.codehaus.mojo.signature:java16:1.1 [ERROR] F:\java-workspace\apache-maven-maven\maven\maven-compat\src\main\java\org\apache\maven\repository\legacy\DefaultUpdateCheckManager.java:253: Undefined reference: java.nio.ByteBuffer java.nio.ByteBuffer.flip() [ERROR] F:\java-workspace\apache-maven-maven\maven\maven-compat\src\main\java\org\apache\maven\repository\legacy\DefaultUpdateCheckManager.java:278: Undefined reference: java.nio.ByteBuffer java.nio.ByteBuffer.flip() [INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Maven ...................................... SUCCESS [10.029s] [INFO] Maven Model ....................................... SUCCESS [20.897s] [INFO] Maven Artifact .................................... SUCCESS [8.487s] [INFO] Maven Plugin API .................................. SUCCESS [8.480s] [INFO] Maven Model Builder ............................... SUCCESS [20.078s] [INFO] Maven Settings .................................... SUCCESS [4.660s] [INFO] Maven Settings Builder ............................ SUCCESS [7.818s] [INFO] Maven Repository Metadata Model ................... SUCCESS [3.832s] [INFO] Maven Aether Provider ............................. SUCCESS [20.002s] [INFO] Maven Core ........................................ SUCCESS [1:14.777s] [INFO] Maven Compat ...................................... FAILURE [8.361s]
[INFO] Maven Embedder .................................... SKIPPED
[INFO] Apache Maven Distribution ......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

It seems like this method signature has changed: flip() used to return Buffer, now it returns ByteBuffer. In both cases we don't use the returned Buffer, only the flip()-method is called on its instance.

I could use some advice here: does it matter for JVM what kind of Object is returned, even though it's not used?

thanks,
Robert

--- code fragment ---
                Properties props = new Properties();

channel = new RandomAccessFile( touchfile, "rw" ).getChannel();
                lock = channel.lock( 0, channel.size(), false );

                if ( touchfile.canRead() )
                {
getLogger().debug( "Reading resolution-state from: " + touchfile ); ByteBuffer buffer = ByteBuffer.allocate( (int) channel.size() );

                    channel.read( buffer );
                    buffer.flip();

ByteArrayInputStream stream = new ByteArrayInputStream( buffer.array() );
                    props.load( stream );
                }

props.setProperty( key, Long.toString( System.currentTimeMillis() ) );

                if ( error != null )
                {
                    props.setProperty( key + ERROR_KEY_SUFFIX, error );
                }
                else
                {
                    props.remove( key + ERROR_KEY_SUFFIX );
                }

ByteArrayOutputStream stream = new ByteArrayOutputStream();

getLogger().debug( "Writing resolution-state to: " + touchfile );
                props.store( stream, "Last modified on: " + new Date() );

                byte[] data = stream.toByteArray();
                ByteBuffer buffer = ByteBuffer.allocate( data.length );
                buffer.put( data );
                buffer.flip();

                channel.position( 0 );
                channel.write( buffer );
--- code fragment ---


Op Tue, 09 Dec 2014 13:08:37 +0100 schreef Rory O'Donnell <rory.odonn...@oracle.com>:


Hi Robert & Kristian,

The initial changesets for JEP 220: Modular Run-Time Images [1] are available
with JDK 9 early-access build 41 [2].

To summarize (please see the JEP for details):

     - The "jre" subdirectory is no longer present in JDK images.

     - The user-editable configuration files in the "lib" subdirectory
        have been moved to the new "conf" directory.

     - The endorsed-standards override mechanism has been removed.

     - The extension mechanism has been removed.

     - rt.jar, tools.jar, and dt.jar have been removed.

- A new URI scheme for naming stored modules, classes, and resources
        has been defined.

- For tools that previously accessed rt.jar directly, a built-in NIO file-system provider has been defined to provide access to the class
        and resource files within a run-time image.

More details are available at Mark Reinhold's latest blog entry [3]

Rgds, Rory

[1] http://openjdk.java.net/jeps/220
[2] https://jdk9.java.net/download/
[3] http://mreinhold.org/blog/jigsaw-modular-images


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to