Skip to content
Snippets Groups Projects
Commit 04657c45 authored by Thomas Mortagne's avatar Thomas Mortagne
Browse files

[misc] Improve codestyle

parent a1ba22b4
No related branches found
No related tags found
No related merge requests found
...@@ -122,19 +122,16 @@ private void updateBackLinks(DocumentRenamedEvent event, Predicate<EntityReferen ...@@ -122,19 +122,16 @@ private void updateBackLinks(DocumentRenamedEvent event, Predicate<EntityReferen
} }
} }
boolean popLevelProgress = false; if (!wikiIds.isEmpty()) {
try { this.progressManager.pushLevelProgress(wikiIds.size(), this);
if (wikiIds.size() > 0) {
this.progressManager.pushLevelProgress(wikiIds.size(), this); try {
popLevelProgress = true; for (String wikiId : wikiIds) {
} this.progressManager.startStep(this);
for (String wikiId : wikiIds) { updateBackLinks(event, canEdit, wikiId);
this.progressManager.startStep(this); this.progressManager.endStep(this);
updateBackLinks(event, canEdit, wikiId); }
this.progressManager.endStep(this); } finally {
}
} finally {
if (popLevelProgress) {
this.progressManager.popLevelProgress(this); this.progressManager.popLevelProgress(this);
} }
} }
...@@ -145,6 +142,7 @@ private void updateBackLinks(DocumentRenamedEvent event, Predicate<EntityReferen ...@@ -145,6 +142,7 @@ private void updateBackLinks(DocumentRenamedEvent event, Predicate<EntityReferen
this.logger.info("Updating the back-links for document [{}] in wiki [{}].", event.getSourceReference(), wikiId); this.logger.info("Updating the back-links for document [{}] in wiki [{}].", event.getSourceReference(), wikiId);
List<DocumentReference> backlinkDocumentReferences = List<DocumentReference> backlinkDocumentReferences =
this.modelBridge.getBackLinkedReferences(event.getSourceReference(), wikiId); this.modelBridge.getBackLinkedReferences(event.getSourceReference(), wikiId);
this.progressManager.pushLevelProgress(backlinkDocumentReferences.size(), this); this.progressManager.pushLevelProgress(backlinkDocumentReferences.size(), this);
try { try {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment