in enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/AbstractStandardEnforcerRule.java [77:103]
protected static String formatLocation(MavenProject project, InputLocation location) {
StringBuilder buffer = new StringBuilder();
if (!location.getSource().getModelId().equals(getProjectId(project))) {
buffer.append(location.getSource().getModelId());
if (location.getSource().getLocation().length() > 0) {
if (buffer.length() > 0) {
buffer.append(", ");
}
buffer.append(location.getSource().getLocation());
}
}
if (location.getLineNumber() > 0) {
if (buffer.length() > 0) {
buffer.append(", ");
}
buffer.append("line ").append(location.getLineNumber());
}
if (location.getColumnNumber() > 0) {
if (buffer.length() > 0) {
buffer.append(", ");
}
buffer.append("column ").append(location.getColumnNumber());
}
return buffer.toString();
}