Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix offset calculation bug handling multiple file areas #756

Merged
merged 7 commits into from
Nov 10, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix for offset order
Al Niessner authored and Al Niessner committed Nov 8, 2023

Verified

This commit was signed with the committer’s verified signature.
lann Lann
commit 6e2c21b2a9629510e2b98e9eb5c53e330fb03cea
Original file line number Diff line number Diff line change
@@ -72,11 +72,13 @@ public void validate() throws MalformedURLException, URISyntaxException {
EveryNCounter.getInstance().increment();
List<DataObject> offsetSorted = new ArrayList<DataObject>(label.getObjects());
for (int idx = 1 ; idx < offsetSorted.size() ; idx++) {
if (0 < comparator.compare (offsetSorted.get(idx-1), offsetSorted.get(idx))) {
getListener().addProblem(new ValidationProblem(
new ProblemDefinition(ExceptionType.WARNING, ProblemType.DATA_OBJECTS_OUT_OF_ORDER,
"Data Objects out of offset order"),
getTarget(), objectCounter, -1));
if (offsetSorted.get(idx-1).getDataFile().equals (offsetSorted.get(idx).getDataFile())) {
if (0 < comparator.compare (offsetSorted.get(idx-1), offsetSorted.get(idx))) {
getListener().addProblem(new ValidationProblem(
new ProblemDefinition(ExceptionType.WARNING, ProblemType.DATA_OBJECTS_OUT_OF_ORDER,
"Data Objects out of offset order"),
getTarget(), objectCounter, -1));
}
}
}
Collections.sort(offsetSorted, comparator);