[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: |
|
||||||||
| Issue Links: |
|
||||||||
| 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 |
| 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() |