Affects Version/s: None
Fix Version/s: 1.7.0
addViolation is very verbose and does check for null on every violation. Instead we can initialize violations as non-null just return null from check if the list is empty.
ASF subversion and git services logged work - 07/Apr/15 15:45
- Time Spent:
Commit edc080c830d2e9689e973a8b8b3447d3bbf661b5 in accumulo's branch refs/heads/master from [~elserj]
[ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=edc080c ]
ACCUMULO-2325Attempt to make example constraints more efficient.
Partially applied patch from Vikram Srivastava. Due to the nature
of constraints, it is far more likely that it will never fire. As
such, it makes sense that we optimize for that case. Avoiding the
allocation of a new collection (as the code already did) is far
better than always allocating a new list/set for every invocation
of the constraint. Tests were directly applied from the original patch.