[MAGNOLIA-2360] Need a clear warning or exception when a repo/workspace does not exist. Created: 10/Sep/08  Updated: 23/Jan/13  Resolved: 16/Sep/09

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: None
Fix Version/s: 4.1.1

Type: Improvement Priority: Major
Reporter: Magnolia International Assignee: Magnolia International
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File tree-wrong-workspace-name-exception.txt    
Issue Links:
duplicate
is duplicated by MAGNOLIA-2745 MgnlContext.getHierarchyManager with ... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)

 Description   

Currently, if you do MgnlContext.getHierarchyManager("some-random-name"), there's a high chance you'll end up with an intricate NullPointerException. This should fail early with a clear exception message.

See attachment for an example of a stacktrace when one tries to instanciate a tree with a wrongly configured workspace name. (see MGNLDMS-99)



 Comments   
Comment by Magnolia International [ 16/Sep/09 ]

now actually logs the message (the message wasn't logged previously, erroneous code path) and throws an IllegalArgumentException instead of letting an NPE blow up later)

Comment by Magnolia International [ 16/Sep/09 ]

leaving open for now: we might want to apply the same fix to ContentRepository.getRepositoryProvider ?

Comment by Magnolia International [ 16/Sep/09 ]

done for both ContentRepository.getRepositoryProvider and ContentRepository.getRepository()

Generated at Mon Feb 12 03:35:58 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.