ghostwriter icon indicating copy to clipboard operation
ghostwriter copied to clipboard

Exclude class level variable

Open otisonoza opened this issue 7 years ago • 2 comments

Excluding a class level variable is not possible and raises the following compiler error:

annotation type not applicable to this kind of declaration
        @Exclude
        ^
public class FlawDetails {
	@Exclude
	private String comment;

otisonoza avatar May 17 '17 08:05 otisonoza

Hi @otisonoza,

Thanks for letting me know! Indeed, that is a bug and not a feature. Will be fixed for the next release!

snorbi07 avatar May 17 '17 10:05 snorbi07

Status update:

  • ghostwriter-api needs to be updated to allow the exclude annotation on fields as well (simple matter)
  • field definition excludes are class definition local, so writing to a public field from a different class is a tricky case that needs some work

snorbi07 avatar May 20 '17 18:05 snorbi07