Skip to content

Commit

Permalink
ADS-2883 Upgrade to Oval 3.0 (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
gary-nosto authored Dec 29, 2020
1 parent 8cc27df commit 7811070
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion framework/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ require: &allDependencies
- net.sf.ehcache -> ehcache 2.10.6
- net.sf.ezmorph -> ezmorph 1.0.6
- net.sf.jsr107cache -> jsr107cache 1.1
- net.sf.oval -> oval 1.86
- net.sf.oval -> oval 3.0.0
- mysql -> mysql-connector-java 5.1.46
- oauth.signpost -> signpost-core 1.2.1.2
- org.apache.geronimo.specs -> geronimo-servlet_2.5_spec 1.2
Expand Down
Binary file removed framework/lib/oval-1.86.jar
Binary file not shown.
Binary file added framework/lib/oval-3.0.0.jar
Binary file not shown.
8 changes: 4 additions & 4 deletions framework/src/play/data/validation/ValidationPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ public void invocationFinally() {
static class Validator extends Guard {

public List<ConstraintViolation> validateAction(Method actionMethod) throws Exception {
List<ConstraintViolation> violations = new ArrayList<>();
Object instance = null;
// Patch for scala defaults
if (!Modifier.isStatic(actionMethod.getModifiers()) && actionMethod.getDeclaringClass().getSimpleName().endsWith("$")) {
Expand All @@ -123,9 +122,10 @@ public List<ConstraintViolation> validateAction(Method actionMethod) throws Exce
}
}
Object[] rArgs = ActionInvoker.getActionMethodArgs(actionMethod, instance);
validateMethodParameters(null, actionMethod, rArgs, violations);
validateMethodPre(null, actionMethod, rArgs, violations);
return violations;
ValidationCycle validationCycle = new ValidationCycle(new String[0]);
validateMethodParameters(null, actionMethod, rArgs, validationCycle);
validateMethodPre(null, actionMethod, rArgs, validationCycle);
return validationCycle.violations;
}
}
static Pattern errorsParser = Pattern.compile("\u0000([^:]*):([^\u0000]*)\u0000");
Expand Down

0 comments on commit 7811070

Please sign in to comment.