- 
    Bug 
- 
    Resolution: Fixed
- 
     P4 P4
- 
    None
- 
        b13
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build | 
|---|---|---|---|---|---|---|
| JDK-8281397 | 11.0.16-oracle | Vicente Arturo Romero Zaldivar | P4 | Resolved | Fixed | b01 | 
| JDK-8280103 | 11.0.15 | Liam Miller-Cushon | P4 | Resolved | Fixed | b01 | 
                    SimpleFileObject overrides getName() to use the user path, but inherits the default implementation of getShortName() which uses a canonical path. Is this inconsistency deliberate?
Demo:
$ cat A.java
public class B {
int f() {}
}
$ ln -s A.java B.java
# the raw diagnostic formatter uses getShortName(), which uses the canonical path A.java
$ javac -XDrawDiagnostics B.java
A.java:2:12: compiler.err.missing.ret.stmt
1 error
# the default diagnostic formatter uses getName(), which uses the user path B.java
$ javac B.java
B.java:2: error: missing return statement
int f() {}
^
1 error
            
Demo:
$ cat A.java
public class B {
int f() {}
}
$ ln -s A.java B.java
# the raw diagnostic formatter uses getShortName(), which uses the canonical path A.java
$ javac -XDrawDiagnostics B.java
A.java:2:12: compiler.err.missing.ret.stmt
1 error
# the default diagnostic formatter uses getName(), which uses the user path B.java
$ javac B.java
B.java:2: error: missing return statement
int f() {}
^
1 error
- backported by
- 
                    JDK-8280103 SimpleFileObject inconsistency between getName and getShortName -           
- Resolved
 
-         
- 
                    JDK-8281397 SimpleFileObject inconsistency between getName and getShortName -           
- Resolved
 
-         
 
        