Author: max.andersen(a)jboss.com
Date: 2007-09-24 15:58:18 -0400 (Mon, 24 Sep 2007)
New Revision: 14026
Modified:
branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/TemplateHelper.java
Log:
stop double checking removal since properties can be used to overwrite settings and hence
can result in the same key be removed twice.
Modified:
branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/TemplateHelper.java
===================================================================
---
branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/TemplateHelper.java 2007-09-23
21:11:34 UTC (rev 14025)
+++
branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/TemplateHelper.java 2007-09-24
19:58:18 UTC (rev 14026)
@@ -157,7 +157,7 @@
public void removeFromContext(String key, Object expected) {
log.trace("removeFromContext " + key + "=" + expected);
Object replaced = internalRemoveFromContext(key);
- if(replaced==null) throw new IllegalStateException(key + " did not exist in
template context.");
+ //if(replaced==null) throw new IllegalStateException(key + " did not exist
in template context.");
/*if(replaced!=expected) { //FREEMARKER-TODO: how can i validate this ? or maybe
not needed to validate since mutation is considered bad ?
throw new IllegalStateException("expected " + key + " to be bound
to " + expected + " but was to " + replaced);
}*/
Show replies by date