Skip to content

Commit

Permalink
Merge pull request #6457 from laeubi/fix_maven_off_by_one
Browse files Browse the repository at this point in the history
Fix of-by-one error in AbstractBndMavenPlugin
  • Loading branch information
chrisrueger authored Feb 5, 2025
2 parents daf5ff0 + 5382286 commit 1588a4c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,8 @@ protected void reportErrorsAndWarnings(Builder builder) throws MojoFailureExcept
}
File f = location.file == null ? propertiesFile : new File(location.file);
markedFiles.add(f);
buildContext.addMessage(f, location.line, location.length, location.message, BuildContext.SEVERITY_WARNING,
buildContext.addMessage(f, location.line + 1, location.length, location.message,
BuildContext.SEVERITY_WARNING,
null);
}
List<String> errors = builder.getErrors();
Expand All @@ -556,7 +557,8 @@ protected void reportErrorsAndWarnings(Builder builder) throws MojoFailureExcept
}
File f = location.file == null ? propertiesFile : new File(location.file);
markedFiles.add(f);
buildContext.addMessage(f, location.line, location.length, location.message, BuildContext.SEVERITY_ERROR,
buildContext.addMessage(f, location.line + 1, location.length, location.message,
BuildContext.SEVERITY_ERROR,
null);
}
buildContext.setValue(MARKED_FILES, markedFiles);
Expand Down

0 comments on commit 1588a4c

Please sign in to comment.