[bulkTagging] removing checks while performing the substring action so that it will fire an Exception if the paramneters are wrongly set

This commit is contained in:
Miriam Baglioni 2024-01-30 13:51:11 +01:00
parent ead08b0dd4
commit 07a373a0bd
2 changed files with 2 additions and 12 deletions

View File

@ -95,7 +95,7 @@ public class SparkAtomicActionScoreJob implements Serializable {
return projectScores.map((MapFunction<BipProjectModel, Project>) bipProjectScores -> {
Project project = new Project();
project.setId(bipProjectScores.getProjectId());
//project.setId(bipProjectScores.getProjectId());
project.setMeasures(bipProjectScores.toMeasures());
return project;
}, Encoders.bean(Project.class))

View File

@ -38,18 +38,8 @@ public class ExecSubstringAction implements Serializable {
}
public String execSubstring() {
int to = Integer.valueOf(this.to);
int from = Integer.valueOf(this.from);
if (to < from || from > this.value.length())
return "";
if (from < 0)
from = 0;
if (to > this.value.length())
to = this.value.length();
return this.value.substring(from, to);
return this.value.substring(Integer.valueOf(this.from), Integer.valueOf(this.to));
}
}