Skip to content

[Bug]: DefaultMigrationService does not null-check fixer.update() result #217

@Splatcrafter

Description

@Splatcrafter

AI REVIEWED

Module: spring-boot-starter
File: spring/service/DefaultMigrationService.java (~line 425)
Severity: Medium

Summary

The result from fixer.update() is wrapped in MigrationResult.success() without null-checking. A faulty DataFixer implementation returning null would cause NPE.

Suggested Fix

Dynamic<?> result = fixer.update(type, data, from, to);
if (result == null) {
    return MigrationResult.failure(from, to, new IllegalStateException("DataFixer returned null"));
}
return MigrationResult.success(result, from, to);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions