[MAGNOLIA-4883] SecurityUtil.updateKeys() fails with NPE when key.location is not specified Created: 04/Mar/13 Updated: 02/Apr/13 Resolved: 29/Mar/13 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | core |
| Affects Version/s: | 4.5 |
| Fix Version/s: | 4.5.9 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Roman Kovařík | Assignee: | Roman Kovařík |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| 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
|
| Date of First Response: |
| Description |
|
SecurityUtil.updateKeys() throw NPE when key.location is not specified: String path = SystemProperty.getProperty(KEY_LOCATION_PROPERTY); ... File keystore = new File(path); One can run into this when migrating without adding magnolia.author.key.location parameter. |
| Comments |
| Comment by Jan Haderka [ 29/Mar/13 ] |
|
I think throwing IAE is wrong. missing location is not the argument. IllegalStateException seems better to me since instance is in a state that is not valid when this property is missing. Also the log message and exception message should be pbly same. And I don't think you need to declare runtime exceptions |