You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2020/08/27 21:22:40 UTC

[commons-crypto] branch master updated (54c9028 -> d8f9087)

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-crypto.git.


    from 54c9028  More startup debug logging.
     new b4b6bb3  Formatting.
     new 186944d  Fix spelling 'Itenium' -> 'Itanium'.
     new fddc51e  More debug loging.
     new d8f9087  Remove extra blank lines.

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/commons/crypto/NativeCodeLoader.java    |  4 +++
 .../java/org/apache/commons/crypto/OsInfo.java     | 30 ++++++++--------------
 .../org/apache/commons/crypto/OpenSslInfoNative.c  |  2 --
 3 files changed, 15 insertions(+), 21 deletions(-)


[commons-crypto] 04/04: Remove extra blank lines.

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-crypto.git

commit d8f9087ee7ac27e9033b5176cd4b6d28cd147bf2
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Aug 27 17:22:24 2020 -0400

    Remove extra blank lines.
---
 src/main/native/org/apache/commons/crypto/OpenSslInfoNative.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/main/native/org/apache/commons/crypto/OpenSslInfoNative.c b/src/main/native/org/apache/commons/crypto/OpenSslInfoNative.c
index 50365b1..740ad1e 100644
--- a/src/main/native/org/apache/commons/crypto/OpenSslInfoNative.c
+++ b/src/main/native/org/apache/commons/crypto/OpenSslInfoNative.c
@@ -138,5 +138,3 @@ JNIEXPORT jstring JNICALL Java_org_apache_commons_crypto_OpenSslInfoNative_OpenS
   jstring answer = (*env)->NewStringUTF(env,dlsym_OpenSSL_version(type));
   return answer;
 }
-
-


[commons-crypto] 03/04: More debug loging.

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-crypto.git

commit fddc51e7357290a262c3f0d5c2acce881cb46e4e
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Aug 27 17:13:16 2020 -0400

    More debug loging.
---
 src/main/java/org/apache/commons/crypto/NativeCodeLoader.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/main/java/org/apache/commons/crypto/NativeCodeLoader.java b/src/main/java/org/apache/commons/crypto/NativeCodeLoader.java
index 2844124..01da07d 100644
--- a/src/main/java/org/apache/commons/crypto/NativeCodeLoader.java
+++ b/src/main/java/org/apache/commons/crypto/NativeCodeLoader.java
@@ -113,6 +113,9 @@ final class NativeCodeLoader {
         // TODO Find a better way to do this later.
         if (isDebug()) {
             System.out.println(String.format(format, args));
+            if (args != null && args.length > 0 && args[0] instanceof Throwable) {
+                ((Throwable) args[0]).printStackTrace(System.out);
+            }
         }
     }
 
@@ -178,6 +181,7 @@ final class NativeCodeLoader {
             }
             return extractedLibFile;
         } catch (final IOException e) {
+            debug("Ignoring %s", e);
             return null;
         }
     }


[commons-crypto] 01/04: Formatting.

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-crypto.git

commit b4b6bb3ebd5e3c853aacc831205cb4d062ed3812
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Aug 27 16:59:44 2020 -0400

    Formatting.
---
 .../java/org/apache/commons/crypto/OsInfo.java     | 26 ++++++++--------------
 1 file changed, 9 insertions(+), 17 deletions(-)

diff --git a/src/main/java/org/apache/commons/crypto/OsInfo.java b/src/main/java/org/apache/commons/crypto/OsInfo.java
index 0517da8..382542a 100644
--- a/src/main/java/org/apache/commons/crypto/OsInfo.java
+++ b/src/main/java/org/apache/commons/crypto/OsInfo.java
@@ -22,8 +22,8 @@ import java.util.HashMap;
 import java.util.Locale;
 
 /**
- * Provides OS name and architecture name.
- * Used by the JNI make process to get information from the build environment.
+ * Provides OS name and architecture name. Used by the JNI make process to get
+ * information from the build environment.
  */
 final class OsInfo {
     private final static HashMap<String, String> archMapping = new HashMap<>();
@@ -109,8 +109,7 @@ final class OsInfo {
     }
 
     /**
-     * The main method.
-     * This is used by the JNI make processing in Makefile.common
+     * The main method. This is used by the JNI make processing in Makefile.common
      *
      * @param args the argv.
      */
@@ -154,25 +153,20 @@ final class OsInfo {
     static String getArchName() {
         // if running Linux on ARM, need to determine ABI of JVM
         final String osArch = System.getProperty("os.arch");
-        if (osArch.startsWith("arm")
-                && System.getProperty("os.name").contains("Linux")) {
+        if (osArch.startsWith("arm") && System.getProperty("os.name").contains("Linux")) {
             final String javaHome = System.getProperty("java.home");
             try {
                 // determine if first JVM found uses ARM hard-float ABI
-                final String[] cmdarray = {
-                        "/bin/sh",
-                        "-c",
-                        "find '"
-                                + javaHome
-                                + "' -name 'libjvm.so' | head -1 | xargs readelf -A | "
+                final String[] cmdarray = { "/bin/sh", "-c",
+                        "find '" + javaHome + "' -name 'libjvm.so' | head -1 | xargs readelf -A | "
                                 + "grep 'Tag_ABI_VFP_args: VFP registers'" };
                 final int exitCode = Runtime.getRuntime().exec(cmdarray).waitFor();
                 if (exitCode == 0) {
                     return "armhf";
                 }
-            } catch (final IOException e) { //NOPMD
+            } catch (final IOException e) { // NOPMD
                 // ignored: fall back to "arm" arch (soft-float ABI)
-            } catch (final InterruptedException e) { //NOPMD
+            } catch (final InterruptedException e) { // NOPMD
                 // ignored: fall back to "arm" arch (soft-float ABI)
             }
         } else {
@@ -199,9 +193,7 @@ final class OsInfo {
             return "Linux";
         } else if (osName.contains("AIX")) {
             return "AIX";
-        }
-
-        else {
+        } else {
             return osName.replaceAll("\\W", "");
         }
     }


[commons-crypto] 02/04: Fix spelling 'Itenium' -> 'Itanium'.

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-crypto.git

commit 186944d8622570272767c032d3e233285c56b370
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Aug 27 17:01:36 2020 -0400

    Fix spelling 'Itenium' -> 'Itanium'.
---
 src/main/java/org/apache/commons/crypto/OsInfo.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/commons/crypto/OsInfo.java b/src/main/java/org/apache/commons/crypto/OsInfo.java
index 382542a..6021e54 100644
--- a/src/main/java/org/apache/commons/crypto/OsInfo.java
+++ b/src/main/java/org/apache/commons/crypto/OsInfo.java
@@ -85,11 +85,11 @@ final class OsInfo {
         archMapping.put("em64t", X86_64);
         archMapping.put("universal", X86_64); // Needed for openjdk7 in Mac
 
-        // Itenium 64-bit mappings
+        // Itanium 64-bit mappings
         archMapping.put(IA64, IA64);
         archMapping.put("ia64w", IA64);
 
-        // Itenium 32-bit mappings, usually an HP-UX construct
+        // Itanium 32-bit mappings, usually an HP-UX construct
         archMapping.put(IA64_32, IA64_32);
         archMapping.put("ia64n", IA64_32);