serialVersionUID error highlighting

Does anyone else find this particular error detector intensely annoying?

I mean, I'd love to turn it on, but I keep naively expecting it to provide me with an intention action to actually create a serialVersionUID when it doesn't find one. Instead the blaster thing just taunts me with the fact that one is lacking, and I'm left fumbling about on the command line trying to create one.

8 comments
Comment actions Permalink

Yep {:-)

There was a discussion with Dave a month or two back, and I thought that he put this on his queue.

http://www.intellij.net/forums/thread.jsp?forum=22&thread=123284


Nick

0
Comment actions Permalink

In article <2961015.1111075722774.JavaMail.itn@is.intellij.net>,
Hani Suleiman <hani@formicary.net> wrote:

Does anyone else find this particular error detector intensely annoying?

I mean, I'd love to turn it on, but I keep naively expecting it to provide me
with an intention action to actually create a serialVersionUID when it
doesn't find one. Instead the blaster thing just taunts me with the fact that
one is lacking, and I'm left fumbling about on the command line trying to
create one.


Yup and there was an intention which just generated 1L, and that in
itself was useless, so it seems Dave took it out until he could
implement the whole thing.

R

0
Comment actions Permalink

I gave an implementation of a SerialVersionUIDBuilder to Dave a little
more than a week ago and he has integrated it into InspectionGadgets.
Look for it when the new EAP build arrives. It generates the
SerialVersionUID from the source, so you don't even need a class file.
One caveat: I'm still testing it and it could be it has some problems on
files which use java 5 features.

Bas

Hani Suleiman wrote:

Does anyone else find this particular error detector intensely
annoying?

I mean, I'd love to turn it on, but I keep naively expecting it to
provide me with an intention action to actually create a
serialVersionUID when it doesn't find one. Instead the blaster thing
just taunts me with the fact that one is lacking, and I'm left
fumbling about on the command line trying to create one.

0
Comment actions Permalink

>Does anyone else find this particular error detector intensely annoying?

Each and every inspection comes free with an on-off switch. I only turn on about 80% of them myself.

>I mean, I'd love to turn it on, but I keep naively expecting it to provide me with an intention action to actually create a serialVersionUID when it doesn't find one. Instead the blaster thing just taunts me with the fact that one is lacking, and I'm left fumbling about on the command line trying to create one.

Should be fixed in the current EAP, assuming it got in the build. Much thanks to Bas for supplying the PsiClass->serialVersionUID generation code, when I despaired.

--Dave Griffith

0
Comment actions Permalink


If the 1L version isn't there, it means something went wrong in the build, as it was supposed to go directly to Bas's generated value. I'll look into it.

(I still say 1L is a preferable value for newly created classes, but that's another discussion.)

--Dave Griffith

0
Comment actions Permalink

>Does anyone else find this particular error detector
intensely annoying?

Each and every inspection comes free with an on-off
switch. I only turn on about 80% of them myself.

I know I know! It was just such a teaser, it told me what was wrong, but didn't offer to fix it. I was almost as if it was taunting me, rather than providing help.

Should be fixed in the current EAP, assuming it got
in the build. Much thanks to Bas for supplying the
PsiClass->serialVersionUID generation code, when I
despaired.

It isn't ;) Now I don't even get any warning that the class has no UID.

0
Comment actions Permalink


Fixed. Should be in the next EAP. Thanks again to Bas.

--Dave Griffith

0
Comment actions Permalink


Fixed. Should be in the next EAP. Thanks again to Bas.

--Dave Griffith

0

Please sign in to leave a comment.