Code Monkey home page Code Monkey logo

Comments (7)

pitbulk avatar pitbulk commented on June 28, 2024

Hi @tonysgi

The toolkit tried to be compatible with java6 too.

It seems that we introduced a java7 dependency when used java.util.Objects to compare objects.

We should fix that and replace it with a solution that uses java.util.Objects when available, or a custom compare method.

Can you remove the imports and its use, instead of:

!Objects.equals(responseInResponseTo, requestId)

use

!responseInResponseTo.equals(requestId)

and let me know if there are more Java 7 dependencies?

from java-saml.

tonysgi avatar tonysgi commented on June 28, 2024

Thanks.

So I made the changes and the items that are left are:

HttpRequest.java

HttpRequest that = (HttpRequest) o; return Objects.equals(requestURL, that.requestURL) && Objects.equals(parameters, that.parameters);

and

public int hashCode() { return Objects.hash(requestURL, parameters); }

In Util.java in the validateXML method:

validator.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, ""); validator.setProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "");

The above has errors:

ACCESS_EXTERNAL_DTD cannot be resolved or is not a field
ACCESS_EXTERNAL_SCHEMA cannot be resolved or is not a field

from java-saml.

pitbulk avatar pitbulk commented on June 28, 2024

On HttpRequest.java you will need to replace the way requestURL is compared.

Related to the Objects.hash, maybe replace it by String.hashCode ?

Ty, it seems ACCESS_EXTERNAL_DTD and ACCESS_EXTERNAL_SCHEMA were introduced in Java 7.0 also.

from java-saml.

rr2013 avatar rr2013 commented on June 28, 2024

Hi tonysgi,

do you have the updated java 1.6 compatible java-saml library ? did you face any other issues? could you please share so that i can also use? thank you.

from java-saml.

andreivas avatar andreivas commented on June 28, 2024

Hello everyone,

Was anyone able to make a saml compatible with Java 1.6 by any chance?

Thanks

from java-saml.

scottescue avatar scottescue commented on June 28, 2024

@pitbulk Are you still willing to accept a PR that removes the Java 1.7 language features? If so, I'd like to finish this out.

from java-saml.

mguessan avatar mguessan commented on June 28, 2024

Just in case someone is interested, I had to compile java-saml under JDK 6 for an old WebSphere instance.

Fork is available at:
https://github.com/mguessan/java-saml

from java-saml.

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.