You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2020/06/18 21:20:29 UTC
[commons-validator] branch master updated: Trivial change to remove
instanceof comparison
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-validator.git
The following commit(s) were added to refs/heads/master by this push:
new 3c5ce4d Trivial change to remove instanceof comparison
new c27a65c Merge pull request #22 from coheigea/trivial_
3c5ce4d is described below
commit 3c5ce4d377997d8800afbb8d1eb8f1d2782eab26
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Thu Mar 5 12:16:55 2020 +0000
Trivial change to remove instanceof comparison
---
src/main/java/org/apache/commons/validator/Field.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/commons/validator/Field.java b/src/main/java/org/apache/commons/validator/Field.java
index d666ce8..e4c9748 100644
--- a/src/main/java/org/apache/commons/validator/Field.java
+++ b/src/main/java/org/apache/commons/validator/Field.java
@@ -496,9 +496,8 @@ public class Field implements Cloneable, Serializable {
public String getVarValue(String mainKey) {
String value = null;
- Object o = getVarMap().get(mainKey);
- if (o != null && o instanceof Var) {
- Var v = (Var) o;
+ Var v = getVarMap().get(mainKey);
+ if (v != null) {
value = v.getValue();
}