• Bug
  • Status: Closed
  • 2 Major
  • Resolution: Fixed
  • hhuynh
  • Reporter: tgautier
  • July 30, 2007
  • 0
  • Watchers: 0
  • September 06, 2007
  • August 14, 2007

Description

Product.java contains a public non-final field for price. In general this isn’t a very good practice, but with Terracotta it’s particularly bad.

Product.java needs to be rewritten so that there are proper getters and setters for the price, with synchronization and a read-lock for the getter. I also don’t agree with the particular code style for the setter which could be re-written as a synchronized method call.

Comments