You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "Colm O hEigeartaigh (Jira)" <ji...@apache.org> on 2022/08/17 08:44:00 UTC

[jira] [Commented] (SANTUARIO-592) rg.apache.xml.security.test.dom.signature.ECDSASignatureTest.testOne fails on Java 1.8

    [ https://issues.apache.org/jira/browse/SANTUARIO-592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17580670#comment-17580670 ] 

Colm O hEigeartaigh commented on SANTUARIO-592:
-----------------------------------------------

The test is only to check to see if it's JDK 16 or upwards though, and if it's Java 8 the NumberFormatException is caught by the catch statement:
{code:java}
 try {
            int javaVersion = Integer.parseInt(System.getProperty("java.specification.version"));
            isJDK16up = javaVersion >= 16;
        } catch (NumberFormatException ex) {
            // ignore
        } {code}
Or am I missing something?

> rg.apache.xml.security.test.dom.signature.ECDSASignatureTest.testOne fails on Java 1.8
> --------------------------------------------------------------------------------------
>
>                 Key: SANTUARIO-592
>                 URL: https://issues.apache.org/jira/browse/SANTUARIO-592
>             Project: Santuario
>          Issue Type: Test
>          Components: Java
>    Affects Versions: Java 3.0.0
>            Reporter: Stefan Bluhm
>            Assignee: Colm O hEigeartaigh
>            Priority: Minor
>
> src/test/java/org/apache/xml/security/test/dom/signature/ECDSASignatureTest.java:72
>  
> {code:java}
> int javaVersion = Integer.parseInt(System.getProperty("java.specification.version"));{code}
>  
> java.specification.version returns 1.8. This will cause an error to Integer.parseInt.
> A fix could be
>  
> {code:java}
> int javaVersion = (int)Float.parseFloat(System.getProperty("java.specification.version"));{code}
>  
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)