mirror of https://github.com/apache/openjpa.git
Formatting.
git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@443073 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
912c1262d6
commit
a9eaf4683b
|
@ -67,8 +67,8 @@ public class DiscriminatorMappingInfo
|
|||
return discrim.getMappingRepository().getMappingDefaults().
|
||||
getDiscriminatorValue(discrim, adapt);
|
||||
|
||||
if (_value.length() > 0 &&
|
||||
(_value.charAt(0) == '-' || Character.isDigit(_value.charAt(0)))) {
|
||||
if (_value.length() > 0 && (_value.charAt(0) == '-'
|
||||
|| Character.isDigit(_value.charAt(0)))) {
|
||||
try {
|
||||
if (_value.indexOf('.') == -1)
|
||||
return new Integer(_value);
|
||||
|
|
|
@ -1747,8 +1747,8 @@ public class BrokerImpl
|
|||
_flags &= ~FLAG_ACTIVE;
|
||||
_flags &= ~FLAG_FLUSHED;
|
||||
|
||||
if (_transEventManager != null &&
|
||||
_transEventManager.hasEndListeners()) {
|
||||
if (_transEventManager != null
|
||||
&& _transEventManager.hasEndListeners()) {
|
||||
_transEventManager.fireEvent(new TransactionEvent(this,
|
||||
status == Status.STATUS_COMMITTED
|
||||
? TransactionEvent.AFTER_COMMIT_COMPLETE
|
||||
|
@ -3016,11 +3016,9 @@ public class BrokerImpl
|
|||
StateManagerImpl sm;
|
||||
for (Iterator itr = states.iterator(); itr.hasNext();) {
|
||||
sm = (StateManagerImpl) itr.next();
|
||||
if (!sm.isPersistent()) {
|
||||
if (sm.getPCState() != PCState.TCLEAN)
|
||||
sm.nontransactional();
|
||||
if (!sm.isPersistent())
|
||||
itr.remove();
|
||||
} else if (!sm.getMetaData().isDetachable()) {
|
||||
else if (!sm.getMetaData().isDetachable()) {
|
||||
sm.release(true);
|
||||
itr.remove();
|
||||
}
|
||||
|
|
|
@ -55,13 +55,11 @@ class ENonTransState
|
|||
}
|
||||
|
||||
PCState beforeRead(StateManagerImpl context, int field) {
|
||||
error("embed-ref", context);
|
||||
return null;
|
||||
return error("embed-ref", context);
|
||||
}
|
||||
|
||||
PCState beforeWrite(StateManagerImpl context, int field, boolean mutate) {
|
||||
error("embed-ref", context);
|
||||
return null;
|
||||
return error("embed-ref", context);
|
||||
}
|
||||
|
||||
PCState beforeOptimisticWrite(StateManagerImpl context, int field,
|
||||
|
|
|
@ -1127,9 +1127,9 @@ public class MetaDataRepository
|
|||
public NonPersistentMetaData addNonMappedInterface(Class iface) {
|
||||
if (iface == null)
|
||||
return null;
|
||||
synchronized(this) {
|
||||
if (!iface.isInterface())
|
||||
throw new MetaDataException(_loc.get("not-non-mapped", iface));
|
||||
synchronized(this) {
|
||||
if (_nonMapped.containsKey(iface))
|
||||
return (NonPersistentMetaData)_nonMapped.get(iface);
|
||||
if (getCachedMetaData(iface) != null)
|
||||
|
|
|
@ -433,10 +433,11 @@ public class ValueMetaDataImpl
|
|||
_attach = vmd.getCascadeAttach();
|
||||
_refresh = vmd.getCascadeRefresh();
|
||||
_typeOverride = vmd.getTypeOverride();
|
||||
_serialized = vmd.isSerialized();
|
||||
if (_embeddedMeta != null)
|
||||
_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)
|
||||
setEmbedded(vmd.isEmbedded());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue