MohammadMu99 commented on code in PR #7259:
URL: https://github.com/apache/incubator-kie/pull/7259#discussion_r4534657830
##########
kogito-jbpm/jbpm-flow-migration/src/main/java/org/jbpm/flow/migration/impl/JsonMigrationPlanFileReader.java:
##########
@@ -49,9 +50,14 @@ public MigrationPlan read(InputStream is) throws IOException
{
MigrationPlan migrationPlan = objectMapper.readValue(is,
MigrationPlan.class);
LOGGER.trace("Read migration plan {} in json format",
migrationPlan);
+ if (migrationPlan.getProcessMigrationPlan() != null) {
+
migrationPlan.getProcessMigrationPlan().getVariableMigrationPlan().forEach(VariableMigrationPlan::validate);
+ }
return migrationPlan;
} catch (IOException e) {
throw new MigrationPlanFileFormatException("Error during
marshalling", e);
+ } catch (IllegalArgumentException e) {
+ throw new MigrationPlanFileFormatException("Invalid variable
migration plan: " + e.getMessage());
Review Comment:
Done, the original exception is now passed as the cause. I also widened the
MigrationPlanFileFormatException(String, IOException) constructor to accept a
Throwable, since this one is an IllegalArgumentException.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]