Skip to content

Commit

Permalink
Merge pull request #105 from atolcd/atolcd-bug-fixes
Browse files Browse the repository at this point in the history
Fix NPE when saving values in new iteration
  • Loading branch information
osarrat authored Sep 11, 2017
2 parents c632e87 + eda80d7 commit 30778ca
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -620,8 +620,8 @@ protected void onCommandSuccess(ListResult<IterationChange> result) {
Iterator<ValueEvent> valuesIterator = valueChanges.iterator();
while (valuesIterator.hasNext()) {
ValueEvent valueEvent = valuesIterator.next();

if (valueEvent.getIterationId() == iterationChange.getIterationId()) {
Integer iterationId = valueEvent.getIterationId();
if (iterationId != null && iterationId == iterationChange.getIterationId()) {
valuesIterator.remove();
}
}
Expand All @@ -634,7 +634,8 @@ protected void onCommandSuccess(ListResult<IterationChange> result) {
newIterationsTabItems.get(oldId).setIterationId(newId);

for (ValueEvent valueEvent : valueChanges) {
if (valueEvent.getIterationId() == oldId) {
Integer iterationId = valueEvent.getIterationId();
if (iterationId != null && iterationId == oldId) {
valueEvent.setIterationId(newId);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,8 @@ protected void onCommandSuccess(ListResult<IterationChange> result) {
Iterator<ValueEvent> valuesIterator = valueChanges.iterator();
while (valuesIterator.hasNext()) {
ValueEvent valueEvent = valuesIterator.next();

if (valueEvent.getIterationId() == iterationChange.getIterationId()) {
Integer iterationId = valueEvent.getIterationId();
if (iterationId != null && iterationId == iterationChange.getIterationId()) {
valuesIterator.remove();
}
}
Expand All @@ -561,7 +561,8 @@ protected void onCommandSuccess(ListResult<IterationChange> result) {
newIterationsTabItems.get(oldId).setIterationId(newId);

for (ValueEvent valueEvent : valueChanges) {
if (valueEvent.getIterationId() == oldId) {
Integer iterationId = valueEvent.getIterationId();
if (iterationId != null && iterationId == oldId) {
valueEvent.setIterationId(newId);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,8 @@ protected void onCommandSuccess(ListResult<IterationChange> result) {
Iterator<ValueEvent> valuesIterator = valueChanges.iterator();
while (valuesIterator.hasNext()) {
ValueEvent valueEvent = valuesIterator.next();

if (valueEvent.getIterationId() == iterationChange.getIterationId()) {
Integer iterationId = valueEvent.getIterationId();
if (iterationId != null && iterationId == iterationChange.getIterationId()) {
valuesIterator.remove();
}
}
Expand All @@ -594,7 +594,8 @@ protected void onCommandSuccess(ListResult<IterationChange> result) {
newIterationsTabItems.get(oldId).setIterationId(newId);

for (ValueEvent valueEvent : valueChanges) {
if (valueEvent.getIterationId() == oldId) {
Integer iterationId = valueEvent.getIterationId();
if (iterationId != null && iterationId == oldId) {
valueEvent.setIterationId(newId);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1521,8 +1521,8 @@ private void updateLayoutGroupIteration(ListResult<IterationChange> result) {
Iterator<ValueEvent> valuesIterator = valueChanges.iterator();
while (valuesIterator.hasNext()) {
ValueEvent valueEvent = valuesIterator.next();

if (valueEvent.getIterationId() == iterationChange.getIterationId()) {
Integer iterationId = valueEvent.getIterationId();
if (iterationId != null && iterationId == iterationChange.getIterationId()) {
valuesIterator.remove();
}
}
Expand All @@ -1535,7 +1535,8 @@ private void updateLayoutGroupIteration(ListResult<IterationChange> result) {
newIterationsTabItems.get(oldId).setIterationId(newId);

for (ValueEvent valueEvent : valueChanges) {
if (valueEvent.getIterationId() == oldId) {
Integer iterationId = valueEvent.getIterationId();
if (iterationId != null && iterationId == oldId) {
valueEvent.setIterationId(newId);
}
}
Expand Down

0 comments on commit 30778ca

Please sign in to comment.