Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

What does "Compatibility annotation missing" mean?

effdjDec 1 2015 — edited Dec 1 2015

Hello,

I am running JDeveloper 11g release 1.  After I create a Java class that implements java.io.Serializable and declare the serialVersionUID (with a value of 1, for example) in accordance with the Java SE documentation, the JDeveloper IDE underlines the serialVersionUID variable with a warning that says, "Compatibility annotation missing serialVersionUID = 1."  What is the meaning of that warning?  I've dug into the web but haven't found a discussion of it anywhere.  To eliminate the warning, I right-click the serialVersionUID variable in the Java editor, click the Code Assist option, then click Add Annotation.  JDeveloper then precedes the variable's declaration with '@SuppressWarnings("compatibility:<seemingly random integer value>"),' where "<seemingly random integer value>" is a seemingly random integer value generated by JDeveloper.  I have seen remnants of that annotation on the web, and recommendations for using it, but I have not seen an explanation of what it is or why it is needed.  I also checked Oracle's Support site and found nothing there.

Can someone from the JDeveloper team or otherwise please explain this bizarre behavior in the IDE?

Thanks,

effdj

This post has been answered by kdario on Dec 1 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 29 2015
Added on Dec 1 2015
1 comment
439 views