[MAGNOLIA-6104] Modules or config framework should gracefully handle missing paths or missing properties Created: 04/Mar/15 Updated: 04/Mar/19 |
|
| Status: | Open |
| Project: | Magnolia |
| Component/s: | configuration |
| Affects Version/s: | 5.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Magnolia International | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | development, improvement, ux | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| 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)
|
||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||
| Story Points: | 5 | ||||||||
| Description |
|
Currently, modules do things like String magnoliaHome = MagnoliaConfigurationProperties.getProperty("magnolia.home"); configSourceFactory.yaml().from(Paths.get(magnoliaHome)) If magnolia.home is not defined, this throws the ugly exception below. There are several things we could do:
[INFO] [talledLocalContainer] 2015-03-04 11:18:22,784 ERROR info.magnolia.module.ModuleManagerImpl : Can't start module ui-framework [INFO] [talledLocalContainer] java.lang.NullPointerException [INFO] [talledLocalContainer] at sun.nio.fs.UnixPath.normalizeAndCheck(UnixPath.java:77) [INFO] [talledLocalContainer] at sun.nio.fs.UnixPath.<init>(UnixPath.java:71) [INFO] [talledLocalContainer] at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:281) [INFO] [talledLocalContainer] at java.nio.file.Paths.get(Paths.java:84) [INFO] [talledLocalContainer] at info.magnolia.ui.framework.UiFrameworkModule.start(UiFrameworkModule.java:84) |