diff --git a/src/helma/objectmodel/db/DbMapping.java b/src/helma/objectmodel/db/DbMapping.java index 5448cfdd..4485b144 100644 --- a/src/helma/objectmodel/db/DbMapping.java +++ b/src/helma/objectmodel/db/DbMapping.java @@ -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 + // 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(); diff --git a/src/helma/objectmodel/db/Relation.java b/src/helma/objectmodel/db/Relation.java index be276ac3..c989d551 100644 --- a/src/helma/objectmodel/db/Relation.java +++ b/src/helma/objectmodel/db/Relation.java @@ -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!