mirror of https://github.com/apache/openjpa.git
Avoid potential NPE; fix error msg.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@590143 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cd2f9e978e
commit
73b35874f0
|
@ -463,10 +463,11 @@ public class StateManagerImpl
|
|||
// merge the fetchgroup required fields to the original
|
||||
// fields only the fields are not already loaded and
|
||||
// are not in the original fields.
|
||||
for (int j = 0; j < fgFields.length(); j++) {
|
||||
if (fgFields.get(j) && !fields.get(j) && !_loaded.get(j))
|
||||
fields.set(j);
|
||||
}
|
||||
if (fgFields != null)
|
||||
for (int j = 0; j < fgFields.length(); j++) {
|
||||
if (fgFields.get(j) && !fields.get(j) &&!_loaded.get(j))
|
||||
fields.set(j);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -816,7 +817,8 @@ public class StateManagerImpl
|
|||
|
||||
SaveFieldManager saved = getSaveFieldManager();
|
||||
if (saved == null)
|
||||
throw new InternalException(_loc.get("no-saved-fields"));
|
||||
throw new InternalException(_loc.get("no-saved-fields",
|
||||
getManagedInstance()));
|
||||
|
||||
FieldMetaData[] fmds = getMetaData().getFields();
|
||||
for (int i = 0; i < fmds.length; i++) {
|
||||
|
|
Loading…
Reference in New Issue