Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReflectiveOperationException incompatible with java 6 #349

Closed
secclesia opened this issue Apr 20, 2016 · 4 comments · Fixed by #350
Closed

ReflectiveOperationException incompatible with java 6 #349

secclesia opened this issue Apr 20, 2016 · 4 comments · Fixed by #350
Labels
Milestone

Comments

@secclesia
Copy link

When I try to run a Java 6 web application with the latest version of BootsFaces (0.8.0), server logs an error because class "ReflectiveOperationException" is not found and none page is displayed. Maybe you can change the exception class by another compatible with Java 6

@zhedar
Copy link
Collaborator

zhedar commented Apr 20, 2016

ReflectiveOperationException indeed requires Java 7, it can be safely replaced by a generic Exception though, because we won't do anything with it than log it directly and Method.invoke, which throws the Exceptions, is also available in JDK 6.

zhedar added a commit to zhedar/BootsFaces-OSP that referenced this issue Apr 20, 2016
use logger instead of syserr
corrected logger namespace

fixes TheCoder4eu#349
zhedar added a commit to zhedar/BootsFaces-OSP that referenced this issue Apr 20, 2016
use logger instead of syserr
corrected logger namespace

fixes TheCoder4eu#349
@zhedar
Copy link
Collaborator

zhedar commented Apr 20, 2016

Somehow detection of wrong JDK usage is broken.
Therefore I added the animal-sniffer maven plugin to check for wrong usages of new methods. That should provide an easy eay to check our code for Java 6 compatibility by running mvn animal-sniffer:check.

@elpaisa22 I should have removed all incompatibilities in the pending PR, so you can probably use the upcoming 0.8.2 version soon.

@secclesia
Copy link
Author

@zhedar That's great! Thank you.

I think there is still one thing with Java 6, the class "net.bootsfaces.utils.BsfUtils" has this annotation: "@SafeVarargs", but removing that, it compiles with maven perfectly.

Thanks again and I would like to congrat to you for yor project, it's a great idea and the components looks awesome!

@zhedar
Copy link
Collaborator

zhedar commented Apr 21, 2016

Oh, I stumbled upon that method with this annotation just yesterday. It's only used in one place, so I probably just remove it and replace it by new ArrayList<Node>(Arrays.asList(rootNode).

Thanks for your feedback! The bad news is, animal-sniffer didn't complain about that... So compiling with an actual JDK6 seems to be the safest way to check for compliance.

@zhedar zhedar added the bug label Apr 30, 2016
@zhedar zhedar added this to the v0.8.2 milestone Apr 30, 2016
@zhedar zhedar mentioned this issue May 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants