-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Eclipse Compiler vs Javac #81
Comments
Here is the workaround.
|
I don't know if |
Note that you are using the raw type
Or
Both versions are compiled fine for me. Also it should be noted that I see two error messages reported by javac, and the second one is more interesting:
This actually means that the inferred type of the stream elements is I admit that the first message about inaccessible class is very confusing. I think it's actually a javac problem, but the problem is in the message only. You cannot expect that such code compiles. |
The first case didn’t work. The second case worked! Using <Class<?>> always gets me. I am using Java version… java version "1.8.0_73" Java(TM) SE Runtime Environment (build 1.8.0_73-b02) Java HotSpot(TM) 64-Bit Server VM (build 25.73-b02, mixed mode) -Nathan From: Tagir Valeev [mailto:notifications@github.com] Note that you are using the raw type Class. Using raw types is almost always bad idea. In any case it does not worth fixing the compilation of code involving raw types. Try these variations: StreamEx. And (better) StreamEx.<Class<?>> Also which javac version are you using? — |
I edited the message after posting it (fixing the first case). It seems that you've answered to the e-mail notification which shows the first version of the post. |
The following code compiles just find with the Eclipse IDE compiler. However,
javac
can't compile it.Here is the error message from
javac
.It seems that
javac
isn't able to resolve the generic return type oftakeWhile()
.The text was updated successfully, but these errors were encountered: