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

XWIKI-19206: The entry type of a page in an extension is not honored upon...

XWIKI-19206: The entry type of a page in an extension is not honored upon install with EM if the extension depends on another extension which specifies a different entry type for the same page

(cherry picked from commit ef40a29f)
parent fd1ad653
No related branches found
No related tags found
No related merge requests found
...@@ -112,6 +112,8 @@ public XarExtensionPlan(ExtensionPlan plan, InstalledExtensionRepository xarRepo ...@@ -112,6 +112,8 @@ public XarExtensionPlan(ExtensionPlan plan, InstalledExtensionRepository xarRepo
pages = new HashMap<>(); pages = new HashMap<>();
this.previousXAREntries.put(wiki, pages); this.previousXAREntries.put(wiki, pages);
} }
// We want to replace the key too because the type might be different but HashMap keep the old one
pages.remove(entry);
pages.put(entry, xarPlanEntry); pages.put(entry, xarPlanEntry);
} }
} }
...@@ -138,6 +140,8 @@ public XarExtensionPlan(ExtensionPlan plan, InstalledExtensionRepository xarRepo ...@@ -138,6 +140,8 @@ public XarExtensionPlan(ExtensionPlan plan, InstalledExtensionRepository xarRepo
pages = new HashMap<>(); pages = new HashMap<>();
this.nextXAREntries.put(wiki, pages); this.nextXAREntries.put(wiki, pages);
} }
// We want to replace the key too because the type might be different but HashMap keep the old one
pages.remove(entry);
pages.put(entry, nextExtension); pages.put(entry, nextExtension);
} }
} catch (Exception e) { } catch (Exception e) {
......
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