• Bug
  • Status: Closed
  • 2 Major
  • Resolution: Fixed
  • ehcache-core
  • cdennis
  • Reporter: baresark
  • January 31, 2011
  • 0
  • Watchers: 1
  • July 27, 2012
  • January 31, 2011

Description

There is a mistake in And-criteria private constructor:

private And(And original, Criteria additional) { Criteria[] originalCriteria = original.getCriterion(); this.criterion = new Criteria[originalCriteria.length + 1]; System.arraycopy(originalCriteria, 0, criterion, 0, originalCriteria.length); originalCriteria[originalCriteria.length - 1] = additional; }

should be:

private And(And original, Criteria additional) { Criteria[] originalCriteria = original.getCriterion(); this.criterion = new Criteria[originalCriteria.length + 1]; System.arraycopy(originalCriteria, 0, criterion, 0, originalCriteria.length); this.criterion[originalCriteria.length] = additional; // «« correct }

Comments