1

I have the following warning

The serializable class myClassD4 does not declare a static final serialVersionUID field of type long

From this interesting discussion https://stackoverflow.com/a/285809/813853 I know what to do to handle this warning.

BUT my problem is kind of different, it is related to Eclipse parametrization. When I get this warning, I do right click. And choose completion action :

Add generated serial version id

the problem is that this add a comment block , something like /* ** */. That I don't want. Please, how to get rid of that ? I have looked on the configuration of Eclipse but not found it YET.

Community
  • 1
  • 1

2 Answers2

1

Found it :)

Window -> Preferences -> Java -> Code Style -> Code Templates -> Comments -> Fields

All I have to do is to edit the default string.

0

The only way that I know is to turn off comment-generation for ALL fields (=instance vairables). This is how to do it: Windows -> Preferences -> Java -> Code Style -> Code Template . Open Comments tab, click on Fields, click on Edit button and remove the text

Sharon Ben Asher
  • 13,849
  • 5
  • 33
  • 47