@@ -103,7 +103,7 @@ public AutomationPlan(ExtensionAutomation ext, File file) throws IOException {
103103 }
104104 LinkedHashMap <?, ?> jobData = (LinkedHashMap <?, ?>) jobObj ;
105105
106- Object jobType = jobData .get ("type" );
106+ Object jobType = jobData .remove ("type" );
107107 if (jobType == null ) {
108108 progress .error (
109109 Constant .messages .getString ("automation.error.job.notype" , jobType ));
@@ -113,7 +113,7 @@ public AutomationPlan(ExtensionAutomation ext, File file) throws IOException {
113113 if (job != null ) {
114114 try {
115115 job = job .newJob ();
116- Object jobName = jobData .get ("name" );
116+ Object jobName = jobData .remove ("name" );
117117 if (jobName != null ) {
118118 if (jobName instanceof String ) {
119119 job .setName ((String ) jobName );
@@ -132,7 +132,7 @@ public AutomationPlan(ExtensionAutomation ext, File file) throws IOException {
132132 continue ;
133133 }
134134
135- Object jobEnabled = jobData .get ("enabled" );
135+ Object jobEnabled = jobData .remove ("enabled" );
136136 if (jobEnabled != null ) {
137137 if (jobEnabled instanceof Boolean enableBool ) {
138138 job .setEnabled (enableBool );
@@ -143,7 +143,7 @@ public AutomationPlan(ExtensionAutomation ext, File file) throws IOException {
143143 }
144144 }
145145
146- Object alwaysRun = jobData .get ("alwaysRun" );
146+ Object alwaysRun = jobData .remove ("alwaysRun" );
147147 if (alwaysRun != null ) {
148148 if (alwaysRun instanceof Boolean jobBool ) {
149149 job .setAlwaysRun (jobBool );
0 commit comments