mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 08:24:13 +00:00
Do not display error location when unknown
Closes gh-36041
This commit is contained in:
+5
-3
@@ -365,9 +365,11 @@ public final class TestCompiler {
|
||||
if (diagnostic.getSource() != null) {
|
||||
message.append(' ');
|
||||
message.append(diagnostic.getSource().getName());
|
||||
message.append(' ');
|
||||
message.append(diagnostic.getLineNumber()).append(':')
|
||||
.append(diagnostic.getColumnNumber());
|
||||
if (diagnostic.getLineNumber() != -1 && diagnostic.getColumnNumber() != -1) {
|
||||
message.append(' ');
|
||||
message.append(diagnostic.getLineNumber()).append(':')
|
||||
.append(diagnostic.getColumnNumber());
|
||||
}
|
||||
}
|
||||
return message.toString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user