use internalized string for typename field to allow comparison using ==.

This commit is contained in:
hns 2002-09-05 13:37:55 +00:00
parent 78cc65f88b
commit d1e173039b

View file

@ -89,6 +89,7 @@ public final class DbMapping implements Updatable {
public DbMapping (Application app) { public DbMapping (Application app) {
this.app = app; this.app = app;
this.typename = null;
prop2db = new HashMap (); prop2db = new HashMap ();
db2prop = new HashMap (); db2prop = new HashMap ();
@ -105,6 +106,10 @@ public final class DbMapping implements Updatable {
this.app = app; this.app = app;
this.typename = typename; this.typename = typename;
// create a unique instance of the string. This is useful so
// we can compare types just by using == instead of equals.
if (typename != null)
typename = typename.intern ();
prop2db = new HashMap (); prop2db = new HashMap ();
db2prop = new HashMap (); db2prop = new HashMap ();