Fixed stupid bug in typename variable assignment in constructor.

This commit is contained in:
hns 2003-07-04 11:33:08 +00:00
parent 6236eba83e
commit 1f860b5fbf
2 changed files with 4 additions and 8 deletions

View file

@ -38,7 +38,7 @@ public final class DbMapping implements Updatable {
Application app;
// prototype name of this mapping
String typename;
private String typename;
// properties from where the mapping is read
SystemProperties props;
@ -134,13 +134,9 @@ public final class DbMapping implements Updatable {
*/
public DbMapping(Application app, String typename, SystemProperties props) {
this.app = app;
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();
}
this.typename = typename == null ? null : typename.intern();
prop2db = new HashMap();
db2prop = new HashMap();

View file

@ -149,7 +149,7 @@ public final class Relation {
if (otherType == null) {
throw new RuntimeException("DbMapping for " + proto +
" not found from " + ownType.typename);
" not found from " + ownType.getTypeName());
}
// make sure the type we're referring to is up to date!