On Mon, 1 Apr 2024 17:07:47 GMT, Suchismith Roy <s...@openjdk.org> wrote:

>> Allow support for both .a and .so files in AIX.
>> If .so file is not found, allow fallback to .a extension.
>> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516)
>
> Suchismith Roy has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   spaces

I adjust the comment which also answer your question.   Please add a AIX-only 
test to verify this behavior.

src/java.base/aix/classes/jdk/internal/loader/ClassLoaderHelper.java line 2:

> 1: /*
> 2:  * Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights 
> reserved.

Suggestion:

 * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.


New file.  Copyright header start year should be 2024.

src/java.base/aix/classes/jdk/internal/loader/ClassLoaderHelper.java line 38:

> 36:     /**
> 37:      * Returns true if loading a native library only if
> 38:      * it's present on the file system.

Suggestion:

     * Shared objects may be loaded from .a archive object on AIX and .so may 
not exist.
     * This method returns false so that loading of shared library continues if 
libname.so is not present.

src/java.base/aix/classes/jdk/internal/loader/ClassLoaderHelper.java line 48:

> 46:     * file may be located at the alternate location.
> 47:     * For most platforms, this behavior is not supported and returns null.
> 48:     */

Suggestion:

    /**
    * AIX implementation of JVM_LoadLibrary handles the alternate path name 
mapping.
    * If loading of the given library name with ".so" suffix fails, it will 
attempt to load the library of
    * the same name with ".a" suffix as the alternate name.
    * 
    * This method simply returns null.  It could implement the alternate name 
converting ".so" with ".a" suffix but redundant.

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

PR Review: https://git.openjdk.org/jdk/pull/17945#pullrequestreview-1971830272
PR Review Comment: https://git.openjdk.org/jdk/pull/17945#discussion_r1546680293
PR Review Comment: https://git.openjdk.org/jdk/pull/17945#discussion_r1546662648
PR Review Comment: https://git.openjdk.org/jdk/pull/17945#discussion_r1546679104

Reply via email to