use internalized string for typename field to allow comparison using ==.
This commit is contained in:
parent
78cc65f88b
commit
d1e173039b
1 changed files with 5 additions and 0 deletions
|
@ -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 ();
|
||||||
|
|
Loading…
Add table
Reference in a new issue