[MGNLDATA-154] The property automatedExecution/enabled should be optional when creating an importer Created: 05/Jul/12  Updated: 25/Jul/12  Resolved: 25/Jul/12

Status: Closed
Project: Magnolia Data Module (closed)
Component/s: None
Affects Version/s: 1.7.2
Fix Version/s: 1.7.3

Type: Improvement Priority: Neutral
Reporter: Jean-Francois Nadeau Assignee: Ondrej Chytil
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 10m
Time Spent: Not Specified
Original Estimate: 10m

Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

I created an importer for a data type. The importer works great but was giving me a NullPointerException when starting the server. It's because I did not create a content node and data node automatedExecution/enabled=>false. I did not create the node because I don't need scheduled execution. The importer is throwing a NPE because of this line of code in DataModule.java in the initImporter method:
if (importer.getAutomatedExecution().isEnabled()) { //getAutomatedExecution() return null

The property automatedExecution/enabled will not be mandatory if you replace with something like this:
if (importer.getAutomatedExecution() != null && importer.getAutomatedExecution().isEnabled()) {
You can also initialize AutomatedExecutionConfig to disable by default instead of leaving it null.

thanks



 Comments   
Comment by Milan Divilek [ 09/Jul/12 ]

Thanks for reporting Jean-Francois. It should be fixed for the next Data module version.

Generated at Mon Feb 12 05:11:53 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.