[JCRTOOLS-7] [Ex|Im]porter Sub Apps Throw Exception on Null 'Base Path' field Created: 29/Nov/15  Updated: 29/Mar/22  Resolved: 03/Dec/15

Status: Closed
Project: JCR Tools
Component/s: None
Affects Version/s: 1.0
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Bradley Andersen Assignee: Bradley Andersen
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File JCRTOOLS-7.patch     PNG File Screen Shot 2015-11-29 at 20.49.50.png    
Template:
Patch included:
Yes
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
Sprint: Basel 21
Story Points: 2
Team: Nucleus

 Description   

@Exporter sub app around L88:
<code>
final String rawBasePath = item.getItemProperty(JcrToolsConstants.BASE_PATH).getValue().toString();

</code>

@Importer sub app around L81:
<code>
final String path = item.getItemProperty(JcrToolsConstants.PATH).getValue().toString();
</code>

If user clears those fields, an "Internal error ..." (unhandled (null pointer) exception (see attached screenshot) occurs.

Suggested fix: in the event of null 'path' in either case, revert to default '/' path.


Generated at Mon Feb 12 02:17:02 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.