auto-dev icon indicating copy to clipboard operation
auto-dev copied to clipboard

Automatically repair null Pointers

Open SuperCoderMan521 opened this issue 1 year ago • 1 comments

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

SuperCoderMan521 avatar May 25 '25 00:05 SuperCoderMan521

welcome to PR

phodal avatar May 25 '25 01:05 phodal