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

leerho pushed a commit to branch update_7.0.X
in repository https://gitbox.apache.org/repos/asf/datasketches-memory.git


The following commit(s) were added to refs/heads/update_7.0.X by this push:
     new af5970a7 Fix JDK detection problem
af5970a7 is described below

commit af5970a7f857395f826ec060bf7378cdc1895ed1
Author: Lee Rhodes <[email protected]>
AuthorDate: Thu May 14 16:44:32 2026 -0700

    Fix JDK detection problem
---
 datasketches-memory-java11/pom.xml                                   | 5 +----
 .../java/org/apache/datasketches/memory/internal/ResourceImpl.java   | 4 ++--
 .../java/org/apache/datasketches/memory/internal/ResourceTest.java   | 0
 datasketches-memory-java17_21/pom.xml                                | 5 +----
 .../java/org/apache/datasketches/memory/internal/ResourceImpl.java   | 4 ++--
 .../java/org/apache/datasketches/memory/internal/ResourceTest.java   | 2 +-
 6 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/datasketches-memory-java11/pom.xml 
b/datasketches-memory-java11/pom.xml
index 618d0310..341636dd 100644
--- a/datasketches-memory-java11/pom.xml
+++ b/datasketches-memory-java11/pom.xml
@@ -111,9 +111,6 @@ under the License.
               <value>0</value> 
             </property>
           </properties>
-          <dependenciesToScan>
-            
<dependency>${project.basedir}/../org.apache.datasketches:datasketches-memory-common</dependency>
-          </dependenciesToScan>
         </configuration>
       </plugin>
 
@@ -158,7 +155,7 @@ under the License.
             <goals><goal>add-test-source</goal></goals>
             <configuration>
               <sources>
-                
<source>${project.basedir}/datasketches-memory-common/src/test/java</source>
+                
<source>${project.basedir}/../datasketches-memory-common/src/test/java</source>
               </sources>
             </configuration>
           </execution>
diff --git 
a/datasketches-memory-java11/src/main/java/org/apache/datasketches/memory/internal/ResourceImpl.java
 
b/datasketches-memory-java11/src/main/java/org/apache/datasketches/memory/internal/ResourceImpl.java
index ea972c99..5553e480 100644
--- 
a/datasketches-memory-java11/src/main/java/org/apache/datasketches/memory/internal/ResourceImpl.java
+++ 
b/datasketches-memory-java11/src/main/java/org/apache/datasketches/memory/internal/ResourceImpl.java
@@ -85,7 +85,7 @@ public abstract class ResourceImpl implements Resource {
   static {
     final String jdkVer = System.getProperty("java.version");
     JDK_MAJOR = parseJavaVersion(jdkVer);
-    unsupportedJDK = "Not supported for this JDK " + JDK_MAJOR + ". Please use 
JDK 11.";
+    unsupportedJDK = "JDK Not supported.  Please use JDK 11. Given JDK: ";
     checkJavaVersion(JDK_MAJOR);
   }
 
@@ -147,7 +147,7 @@ public abstract class ResourceImpl implements Resource {
    */
   static void checkJavaVersion(final int jdkMajor) {
     final boolean ok = jdkMajor == 11; 
-    if (!ok) { throw new IllegalArgumentException(unsupportedJDK);
+    if (!ok) { throw new IllegalArgumentException(unsupportedJDK + jdkMajor);
     }
   }
 
diff --git 
a/datasketches-memory-common/src/test/java/org/apache/datasketches/memory/internal/ResourceTest.java
 
b/datasketches-memory-java11/src/test/java/org/apache/datasketches/memory/internal/ResourceTest.java
similarity index 100%
copy from 
datasketches-memory-common/src/test/java/org/apache/datasketches/memory/internal/ResourceTest.java
copy to 
datasketches-memory-java11/src/test/java/org/apache/datasketches/memory/internal/ResourceTest.java
diff --git a/datasketches-memory-java17_21/pom.xml 
b/datasketches-memory-java17_21/pom.xml
index 63465ae2..18994ac3 100644
--- a/datasketches-memory-java17_21/pom.xml
+++ b/datasketches-memory-java17_21/pom.xml
@@ -107,9 +107,6 @@ under the License.
               <value>0</value> 
             </property>
           </properties>
-          <dependenciesToScan>
-            
<dependency>${project.basedir}/../org.apache.datasketches:datasketches-memory-common</dependency>
-          </dependenciesToScan>
         </configuration>
       </plugin>
 
@@ -154,7 +151,7 @@ under the License.
             <goals><goal>add-test-source</goal></goals>
             <configuration>
               <sources>
-                
<source>${project.basedir}/datasketches-memory-common/src/test/java</source>
+                
<source>${project.basedir}/../datasketches-memory-common/src/test/java</source>
               </sources>
             </configuration>
           </execution>
diff --git 
a/datasketches-memory-java17_21/src/main/java/org/apache/datasketches/memory/internal/ResourceImpl.java
 
b/datasketches-memory-java17_21/src/main/java/org/apache/datasketches/memory/internal/ResourceImpl.java
index a88d47c3..299edf01 100644
--- 
a/datasketches-memory-java17_21/src/main/java/org/apache/datasketches/memory/internal/ResourceImpl.java
+++ 
b/datasketches-memory-java17_21/src/main/java/org/apache/datasketches/memory/internal/ResourceImpl.java
@@ -85,7 +85,7 @@ public abstract class ResourceImpl implements Resource {
   static {
     final String jdkVer = System.getProperty("java.version");
     JDK_MAJOR = parseJavaVersion(jdkVer);
-    unsupportedJDK = "Not supported for this JDK " + JDK_MAJOR + ". Please use 
JDK 17 or 21.";
+    unsupportedJDK = "JDK Not supported.  Please use JDK 17 or 21. Given JDK: 
";
     checkJavaVersion(JDK_MAJOR);
   }
 
@@ -147,7 +147,7 @@ public abstract class ResourceImpl implements Resource {
    */
   static void checkJavaVersion(final int jdkMajor) {
     final boolean ok = ( (jdkMajor == 17) || (jdkMajor == 21) ); 
-    if (!ok) { throw new IllegalArgumentException(unsupportedJDK);
+    if (!ok) { throw new IllegalArgumentException(unsupportedJDK + jdkMajor);
     }
   }
 
diff --git 
a/datasketches-memory-common/src/test/java/org/apache/datasketches/memory/internal/ResourceTest.java
 
b/datasketches-memory-java17_21/src/test/java/org/apache/datasketches/memory/internal/ResourceTest.java
similarity index 98%
rename from 
datasketches-memory-common/src/test/java/org/apache/datasketches/memory/internal/ResourceTest.java
rename to 
datasketches-memory-java17_21/src/test/java/org/apache/datasketches/memory/internal/ResourceTest.java
index b72d8bf7..a5457966 100644
--- 
a/datasketches-memory-common/src/test/java/org/apache/datasketches/memory/internal/ResourceTest.java
+++ 
b/datasketches-memory-java17_21/src/test/java/org/apache/datasketches/memory/internal/ResourceTest.java
@@ -126,7 +126,7 @@ public class ResourceTest {
   public void checkJdkString() {
     String jdkVer;
     int jdkMaj;
-    String[] good1_Strings = {"11.1.21_abc", "11", "11.0._abc"};
+    String[] good1_Strings = {"17.1.21_abc", "21", "21.0._abc"};
     int len = good1_Strings.length;
     for (int i = 0; i < len; i++) {
       jdkVer = good1_Strings[i];


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to