8000 static import only from classes and interfaces · Issue #293 · rabbitmq/rabbitmq-java-client · GitHub
[go: up one dir, main page]

Skip to content

static import only from classes and interfaces #293

New issue
8000

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

Closed
rapgro opened this issue Jul 12, 2017 · 8 comments
Closed

static import only from classes and interfaces #293

rapgro opened this issue Jul 12, 2017 · 8 comments

Comments

@rapgro
Copy link
rapgro commented Jul 12, 2017

These errors occur for rabbitmq-java-client version 4.1.1 with openjdk 1.8 on Fedora 26. It's a compiler bug, possible workaround is given on stackoverflow.
https://stackoverflow.com/questions/11782076/static-import-only-from-classes-and-interfaces
http://bugs.java.com/bugdatabase/view_bug.do?bug_id=7159016

[ERROR] /home/builder/fedora-scm/rabbitmq-java-client/rabbitmq-java-client-4.1.1/src/test/java/com/rabbitmq/client/test/ChannelRpcTimeoutIntegrationTest.java:[30,1] static import only from classes and interfaces
[ERROR] /home/builder/fedora-scm/rabbitmq-java-client/rabbitmq-java-client-4.1.1/src/test/java/com/rabbitmq/client/test/ChannelRpcTimeoutIntegrationTest.java:[31,1] static import only from classes and interfaces
[ERROR] /home/builder/fedora-scm/rabbitmq-java-client/rabbitmq-java-client-4.1.1/src/test/java/com/rabbitmq/client/test/functional/Metrics.java:[35,1] static import only from classes and interfaces
[ERROR] /home/builder/fedora-scm/rabbitmq-java-client/rabbitmq-java-client-4.1.1/src/test/java/com/rabbitmq/client/test/functional/Metrics.java:[36,1] static import only from classes and interfaces
[ERROR] /home/builder/fedora-scm/rabbitmq-java-client/rabbitmq-java-client-4.1.1/src/test/java/com/rabbitmq/client/test/functional/Metrics.java:[37,1] static import only from classes and interfaces
[ERROR] /home/builder/fedora-scm/rabbitmq-java-client/rabbitmq-java-client-4.1.1/src/test/java/com/rabbitmq/client/test/FrameTest.java:[18,1] static import only from classes and interfaces
[ERROR] /home/builder/fedora-scm/rabbitmq-java-client/rabbitmq-java-client-4.1.1/src/test/java/com/rabbitmq/client/test/StandardMetricsCollectorTest.java:[23,1] static import only from classes and interfaces
[ERROR] /home/builder/fedora-scm/rabbitmq-java-client/rabbitmq-java-client-4.1.1/src/test/java/com/rabbitmq/client/test/AMQChannelTest.java:[35,1] static import only from classes and interfaces
[ERROR] /home/builder/fedora-scm/rabbitmq-java-client/rabbitmq-java-client-4.1.1/src/test/java/com/rabbitmq/client/test/ChannelRpcTimeoutIntegrationTest.java:[30,1] static import only from classes and interfaces
[ERROR] /home/builder/fedora-scm/rabbitmq-java-client/rabbitmq-java-client-4.1.1/src/test/java/com/rabbitmq/client/test/ChannelRpcTimeoutIntegrationTest.java:[31,1] static import only from classes and interfaces
[ERROR] /home/builder/fedora-scm/rabbitmq-java-client/rabbitmq-java-client-4.1.1/src/test/java/com/rabbitmq/client/test/functional/Metrics.java:[35,1] static import only from classes and interfaces
[ERROR] /home/builder/fedora-scm/rabbitmq-java-client/rabbitmq-java-client-4.1.1/src/test/java/com/rabbitmq/client/test/functional/Metrics.java:[36,1] static import only from classes and interfaces
[ERROR] /home/builder/fedora-scm/rabbitmq-java-client/rabbitmq-java-client-4.1.1/src/test/java/com/rabbitmq/client/test/functional/Metrics.java:[37,1] static import only from classes and interfaces
[ERROR] /home/builder/fedora-scm/rabbitmq-java-client/rabbitmq-java-client-4.1.1/src/test/java/com/rabbitmq/client/test/FrameTest.java:[18,1] static import only from classes and interfaces
[ERROR] /home/builder/fedora-scm/rabbitmq-java-client/rabbitmq-java-client-4.1.1/src/test/java/com/rabbitmq/client/test/StandardMetricsCollectorTest.java:[23,1] static import only from classes and interfaces
[ERROR] /home/builder/fedora-scm/rabbitmq-java-client/rabbitmq-java-client-4.1.1/src/test/java/com/rabbitmq/client/test/AMQChannelTest.java:[35,1] static import only from classes and interfaces
@michaelklishin
Copy link
Contributor

The bug is reported for JDK 7 and fixed in JDK 8b43, and this library's 5.0 release will require JDK 8.

We will switch to wildcard static imports but if Fedora 26 uses a JDK 8 version affected, it sounds like the package could use some updating?

@rapgro
8000
Copy link
Author
rapgro commented Jul 12, 2017

I use java-1.8.0-openjdk-devel-1:1.8.0.131-7.b12.fc26

@michaelklishin
Copy link
Contributor

@rapgro please give the tip of 4.1.x-stable a try.

@rapgro
Copy link
Author
rapgro commented Jul 13, 2017

Do you mean to build from latest commits of the 4.1.x-stable branch? I assumed to build successfully from official tarball releases, so could you provide a 4.1.2 with the patch for static imports applied?

@michaelklishin
Copy link
Contributor

@rapgro there are no tarball releases of this client, as of 4.0 it is only released to Maven repositories. If you are referring to GitHub source tarballs, they are produced automatically for GitHub for any tag that's pushed. While we can push a tag it should be no different from producing a tarball from your local repository on the right branch.

@michaelklishin
Copy link
Contributor

Since the files that use static imports all seem to be in tests (which makes sense, given that we are importing functions from Hamcrest and Mockito), another option should be using -Dmaven.test.skip=true in your build system.

@rapgro
Copy link
Author
rapgro commented Jul 13, 2017

Well, running the tests is nice after built for RPM.

@michaelklishin
Copy link
Contributor

@rapgro I have pushed a tag that points to daa6300. GitHub will produce a source tarball from it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0