INRIA / INRIA/spoon

SniperPrettyPrinter - Abstract keyword getting deleted

Open
#4,219 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
2k
Forks
392
Avg merge
11h 24m
Merged PRs (30d)
36

Description

When using SniperPrettyPrinter, for the below input the expected output is not generated. Transformation is working as expected but abstract keyword is getting deleted from another method of the same class.

Input :
`public @interface CtAnnotationMethodProcessor {
String totals();
abstract String subjectName() default "CSE";
}`

Expected :
`public @interface CtAnnotationMethodProcessor {
int totals();
abstract String subjectName() default "CSE";
}`

Actual :
`public @interface CtAnnotationMethodProcessor {
String totals();
String subjectName() default "CSE";
}`

Spoon print config :
launcher.getEnvironment().setPrettyPrinterCreator(() -> new SniperJavaPrettyPrinter(launcher.getEnvironment()));

Spoon version : 9.1.0-beta-10

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.