openmrs/openmrs-core — pull request #788 by sashrika (2014-03-14 16:55:40+00:00)
Title: Trnk 4140 : Substitute deprecated method call in HibernateContextDAO

removed "ConfigHelper.getResourceAsStream" deprecatede method.

added junit test "should_mergeDefaultRuntimeProperties()" in ContextDAOTest.java class.
But when testing it throws java.util.ConcurrentModificationException.
as i read in http://docs.oracle.com/javase/6/docs/api/java/util/ConcurrentModificationException.html and http://stackoverflow.com/questions/1931180/how-do-i-synchronize-to-prevent-a-java-util-concurrentmodificationexception , the reason is , we change a element in a java Collection while we iterate through it .

One possible solution would be using ConcurrentHashMap. But here we use java.util.Property.

The other possible solution would be instead of changing the values while iterating through a collection, cache the changes and then copy them to the Collection.

I have used the latter approach here.