auto-dev
auto-dev copied to clipboard
Automatically repair null Pointers
Describe` the bug
private var appliedPatch = try { val apply = GenericPatchApplier.apply(oldCode, patch.hunks) apply } catch (e: Exception) { logger<SingleFileDiffSketch>().warn(AutoDevBundle.message("sketch.patch.failed.apply", patch.beforeFileName ?: ""), e) null }.
**
It will be null if the parsing fails
**
private var newCode = appliedPatch?.patchedText ?: ""
The newcode will be unavailable and empty Then, where newcode is used, the code cannot be repaired
welcome to PR