Skip to content

Automatically repair null Pointers #393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
SuperCoderMan521 opened this issue May 25, 2025 · 1 comment
Open

Automatically repair null Pointers #393

SuperCoderMan521 opened this issue May 25, 2025 · 1 comment

Comments

@SuperCoderMan521
Copy link

SuperCoderMan521 commented May 25, 2025

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

@phodal
Copy link
Member

phodal commented May 25, 2025

welcome to PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants