Error in dependency
based make:
The make should
delete "obsolete files" only if the java file for said obsolete file has been
deleted.
I am often running
into problems of the following form:
1) Select A.java
(where class A is a JUnit TestCase)
2) Right click,
choose compile
3) The system
creates A.class
4) Right click, and
choose "Test"
5) The system
deletes A.class
6) JUnit complains
that it cannot find A.class
This is obviously
incorrect behavior, and makes it impossible to run TestCases that are never
referenced by other classes.
Likewise, if there
are classes that will be loaded by reflection, it is vital that the make process
not delete these classes. The safest solution is to recompile any files that
clearly need recompilation, and to delete any files whose source file has been
removed.
-----------------------------------
Error in parsing:
(this error has been around since at least IntelliJ
2.0)
Create a class A
with nested class B, e.g.:
public class
A {
public class
B {}
}
Create a class C
that constructs a new B, e.g.:
public class
C
{
void foo(A
arg)
{
arg.new B();
}
}
This code will
compile perfectly. However, IntelliJ IDEA will mark the line "arg.new B()" as an
error: "Cannot resolve symbol B".
On the other hand,
if you replace the line "arg.new B()" with the line "arg.new A.B()", then
IntelliJ IDEA will accept this line as valid, but you will get a syntax error
when you compile.
-----------------------------------------
Sincerely,
Dwight Rodgers
