Giter Site home page Giter Site logo

Java 10 compatibility Issue about audit4j-core HOT 14 OPEN

audit4j avatar audit4j commented on September 22, 2024
Java 10 compatibility Issue

from audit4j-core.

Comments (14)

bcaure avatar bcaure commented on September 22, 2024

I don't have any problem with Java 10 besides method isJDK_N_OrHigher(int n)
Could you post your audit4j config?

from audit4j-core.

billdinger avatar billdinger commented on September 22, 2024

I'm also having the issue with java 11 @bcaure

java --version
java 11.0.4 2019-07-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.4+10-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.4+10-LTS, mixed mode

Exception being thrown is:

Caused by: org.audit4j.core.exception.InitializationException: Java version is not supported.
        at org.audit4j.core.Context.checkEnvironment(Context.java:315) ~[audit4j-core-2.5.0.jar:2.5.0]
        at org.audit4j.core.Context.init(Context.java:121) ~[audit4j-core-2.5.0.jar:2.5.0]

If I flip it to 1.8

java -version
java version "1.8.0_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)

it executes without issues. Using latest (2.5.0) of audit4j

from audit4j-core.

billdinger avatar billdinger commented on September 22, 2024

Hrrm I debugged this on my home PC and when manually substituting in the version number in private static boolean isJDK_N_OrHigher(int n) when running the test it works fine. I wonder if the issue more has to do with the System.getProperty("java.version"); on mac returning something weird. I'll take a look at work tomorrow when I get back.

from audit4j-core.

pauldambra avatar pauldambra commented on September 22, 2024

I'm getting this on trying to update a project to java 11 on my mac

from audit4j-core.

pauldambra avatar pauldambra commented on September 22, 2024

If I run System.out.println(System.getProperty("java.version")) in a shell in IntelliJ

I get 11.0.2 as the output

from audit4j-core.

pauldambra avatar pauldambra commented on September 22, 2024

@janithb any chance we could merge this (or fix it another way :))

I've an app at work that depends on this library (thank you for it btw) and we can't update to Java 11 because of this issue.

from audit4j-core.

billdinger avatar billdinger commented on September 22, 2024

@pauldambra I was able to eventually fix this on my mac by wiping out the JDK and doing a fresh install of adoptopenjdk. I'm still unsure what on my mac caused it but that did fix it.

from audit4j-core.

pauldambra avatar pauldambra commented on September 22, 2024

I can't risk having to try and do that through CI and into multiple application servers though

The code change I've proposed does remove the issue (I think)

It removes the need for this comment https://github.com/audit4j/audit4j-core/pull/94/files#diff-977dbf33e7beb1cd8309627cf774cbdfL53

from audit4j-core.

jamietanna avatar jamietanna commented on September 22, 2024

I'd be happy picking up this issue if that's OK? 😄

from audit4j-core.

pauldambra avatar pauldambra commented on September 22, 2024

Do you have commit permissions on this repo @jamietanna ?

We've forked here https://github.com/coopdigital/audit4j-core (although looks like we've not updated it yet :/)

from audit4j-core.

jamietanna avatar jamietanna commented on September 22, 2024

No I don't @pauldambra - I was thinking of raising a PR to this repo via a fork of my own

from audit4j-core.

pauldambra avatar pauldambra commented on September 22, 2024

from audit4j-core.

jamietanna avatar jamietanna commented on September 22, 2024

Oh sorry I didn't realise, that makes sense

from audit4j-core.

pauldambra avatar pauldambra commented on September 22, 2024

No worries :) #94 that's my PR

I don't have time to review yours this weekend (sorry!) you're welcome to review mine though!

from audit4j-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.