javac "cannot find symbol" bug (?)
_
postolowicz at gmail.com
Fri Apr 7 14:51:18 UTC 2017
Indeed, it works with javac from jdk 9.
Thanks
2017-04-06 1:34 GMT+02:00 Maurizio Cimadamore <maurizio.cimadamore at oracle.com>:
> Hi,
> this could be related to this JEP:
>
> http://openjdk.java.net/jeps/216
>
> would it be possible for you to check if the same behavior occurs in JDK 9?
>
> Thanks
> Maurizio
>
>
>
> On 05/04/17 11:29, _ wrote:
>>
>> Hello,
>>
>> I discovered strange behavior of javac in my project: depending on
>> order of source files passed it compiles successfully or fail.
>>
>> Could you take a look at sample reproducible case at
>> https://bitbucket.org/postolowicz/javac-error ?
>>
>> Steps to reproduce:
>>
>> 1. Run `./gradlew build`
>> This depending on your luck may success or fail at buildling system-test
>> module.
>>
>> 2. Run `./compile-successful.sh`
>> It should succeed.
>>
>> 3. Run `./compile-failing.sh`
>> It should fail with message:
>>
>> system-test/src/main/java/postolowicz/systemtest/AbstractSystemTestWithoutDB.java:18:
>> error: cannot find symbol
>> protected class RunnerImpl extends ValidationRunner {
>> ^
>> symbol: class ValidationRunner
>> location: class AbstractSystemTestWithoutDB
>>
>> system-test/src/main/java/postolowicz/systemtest/AbstractSystemTestWithoutDB.java:13:
>> error: cannot find symbol
>> @Configuration
>> ^
>> symbol: class Configuration
>> location: class AbstractSystemTestWithoutDB
>>
>> system-test/src/main/java/postolowicz/systemtest/AbstractSystemTestWithoutDB.java:14:
>> error: cannot find symbol
>> @PropertySource(value = "", ignoreResourceNotFound = true)
>> ^
>> symbol: class PropertySource
>> location: class AbstractSystemTestWithoutDB
>>
>> system-test/src/main/java/postolowicz/systemtest/AbstractSystemTestWithoutDB.java:23:
>> error: method does not override or implement a method from a supertype
>> @Override
>> ^
>>
>> system-test/src/main/java/postolowicz/systemtest/AbstractSystemTestWithoutDB.java:28:
>> error: method does not override or implement a method from a supertype
>> @Override
>> ^
>> 5 errors
>>
>> The only difference between these two scripts is order of source files.
>>
>> Is it a bug or I miss something?
>>
>> Occurs for javac -version
>> javac 1.8.0_121
>>
>> TIA,
>> Radek Postołowicz
>
>
More information about the compiler-dev
mailing list