openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Sutter <>
Subject Re: What is pcVersionInit?
Date Wed, 28 Sep 2011 20:57:41 GMT
This is interesting.  I thought FindBugs ran against the java source, not
the class files.  The pcVersionInit field that you reference is a field that
is inserted into the bytecodes of an Entity class file during the OpenJPA
enhancement processing.  (FYI, any fields or methods that are prefaced by
"pc" indicate that it was inserted by our enhancement processing.  The "pc"
stands for "persistence capable".)

Is there an option on FindBugs to only run against the source?  Or, you
could run FindBugs before your build does the enhancement processing.


On Wed, Sep 28, 2011 at 3:18 PM, kostellodon <>wrote:

> Not a true problem I don't think, but a curiosity.
> I am using the version of JPA 1.2.3-SNAPSHOT which is included in WebSphere
> 7.
> I have a base class that contains common fields, such as id, insert user,
> insert datetime, etc, and this is annotated as @MappedSuperclass.  My
> entities all extend this base class.
> We are running FindBugs against our code, including the entities.  FindBugs
> is giving the following warning for all entities that extend my base class:
> Field <entity_name>.pcVersionInit masks field in superclass
> <package_name>.BasicEntity
> This class defines a field with the same name as a visible instance field
> in
> a superclass. This is confusing, and may indicate an error if methods
> update
> or access one of the fields when they wanted the other.
> Just for my own curiosity, where can I find out what pcVersionInit is?
> Also, I realize that this is probably not a problem, but what can be done
> to
> remove this warning?
> --
> View this message in context:
> Sent from the OpenJPA Users mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message