Formatting.

git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@443073 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
A. Abram White 2006-09-13 18:57:13 +00:00
parent 912c1262d6
commit a9eaf4683b
26 changed files with 33 additions and 36 deletions

View File

@ -67,8 +67,8 @@ public class DiscriminatorMappingInfo
return discrim.getMappingRepository().getMappingDefaults(). return discrim.getMappingRepository().getMappingDefaults().
getDiscriminatorValue(discrim, adapt); getDiscriminatorValue(discrim, adapt);
if (_value.length() > 0 && if (_value.length() > 0 && (_value.charAt(0) == '-'
(_value.charAt(0) == '-' || Character.isDigit(_value.charAt(0)))) { || Character.isDigit(_value.charAt(0)))) {
try { try {
if (_value.indexOf('.') == -1) if (_value.indexOf('.') == -1)
return new Integer(_value); return new Integer(_value);

View File

@ -1747,8 +1747,8 @@ public class BrokerImpl
_flags &= ~FLAG_ACTIVE; _flags &= ~FLAG_ACTIVE;
_flags &= ~FLAG_FLUSHED; _flags &= ~FLAG_FLUSHED;
if (_transEventManager != null && if (_transEventManager != null
_transEventManager.hasEndListeners()) { && _transEventManager.hasEndListeners()) {
_transEventManager.fireEvent(new TransactionEvent(this, _transEventManager.fireEvent(new TransactionEvent(this,
status == Status.STATUS_COMMITTED status == Status.STATUS_COMMITTED
? TransactionEvent.AFTER_COMMIT_COMPLETE ? TransactionEvent.AFTER_COMMIT_COMPLETE
@ -3016,11 +3016,9 @@ public class BrokerImpl
StateManagerImpl sm; StateManagerImpl sm;
for (Iterator itr = states.iterator(); itr.hasNext();) { for (Iterator itr = states.iterator(); itr.hasNext();) {
sm = (StateManagerImpl) itr.next(); sm = (StateManagerImpl) itr.next();
if (!sm.isPersistent()) { if (!sm.isPersistent())
if (sm.getPCState() != PCState.TCLEAN)
sm.nontransactional();
itr.remove(); itr.remove();
} else if (!sm.getMetaData().isDetachable()) { else if (!sm.getMetaData().isDetachable()) {
sm.release(true); sm.release(true);
itr.remove(); itr.remove();
} }

View File

@ -55,13 +55,11 @@ class ENonTransState
} }
PCState beforeRead(StateManagerImpl context, int field) { PCState beforeRead(StateManagerImpl context, int field) {
error("embed-ref", context); return error("embed-ref", context);
return null;
} }
PCState beforeWrite(StateManagerImpl context, int field, boolean mutate) { PCState beforeWrite(StateManagerImpl context, int field, boolean mutate) {
error("embed-ref", context); return error("embed-ref", context);
return null;
} }
PCState beforeOptimisticWrite(StateManagerImpl context, int field, PCState beforeOptimisticWrite(StateManagerImpl context, int field,

View File

@ -1127,9 +1127,9 @@ public class MetaDataRepository
public NonPersistentMetaData addNonMappedInterface(Class iface) { public NonPersistentMetaData addNonMappedInterface(Class iface) {
if (iface == null) if (iface == null)
return null; return null;
synchronized(this) {
if (!iface.isInterface()) if (!iface.isInterface())
throw new MetaDataException(_loc.get("not-non-mapped", iface)); throw new MetaDataException(_loc.get("not-non-mapped", iface));
synchronized(this) {
if (_nonMapped.containsKey(iface)) if (_nonMapped.containsKey(iface))
return (NonPersistentMetaData)_nonMapped.get(iface); return (NonPersistentMetaData)_nonMapped.get(iface);
if (getCachedMetaData(iface) != null) if (getCachedMetaData(iface) != null)

View File

@ -433,10 +433,11 @@ public class ValueMetaDataImpl
_attach = vmd.getCascadeAttach(); _attach = vmd.getCascadeAttach();
_refresh = vmd.getCascadeRefresh(); _refresh = vmd.getCascadeRefresh();
_typeOverride = vmd.getTypeOverride(); _typeOverride = vmd.getTypeOverride();
_serialized = vmd.isSerialized();
if (_embeddedMeta != null) if (_embeddedMeta != null)
_embeddedMeta.setDescribedType(vmd.getDeclaredType()); _embeddedMeta.setDescribedType(vmd.getDeclaredType());
// don't allow copy to override embedded; don't copy serialized at all // don't allow copy to override embedded
if (_embedded == null) if (_embedded == null)
setEmbedded(vmd.isEmbedded()); setEmbedded(vmd.isEmbedded());
} }