Beans/frank.

I should probably add a test for this. Ha!
This commit is contained in:
Michael Bayne
2014-06-26 11:50:45 -07:00
parent 0583572f34
commit 1d826d903f
2 changed files with 5 additions and 4 deletions
@@ -267,7 +267,7 @@ public class PersistenceContext
Class<T> type, SchemaMigration migration)
{
DepotMarshaller<T> marshaller = getRawMarshaller(type);
marshaller.requireInitialized(
marshaller.requireNotInitialized(
"Migrations must be registered before initializeRepositories() is called.");
marshaller.registerMigration(migration);
}
@@ -456,10 +456,11 @@ public class DepotMarshaller<T extends PersistentRecord> implements QueryMarshal
}
/**
* Throws {@link IllegalStateException} with {@code msg} if this marshaller is not initialized.
* Throws {@link IllegalStateException} with {@code msg} if this marshaller is already
* initialized.
*/
public synchronized void requireInitialized (String msg) {
if (_meta == null) throw new IllegalStateException(msg);
public synchronized void requireNotInitialized (String msg) {
if (_meta != null) throw new IllegalStateException(msg);
}
/**