Linked Questions

Popular Questions

You get this popup.

However, I cannot figure out what to put into -excludes. I have tried adding all four below and I still see the reference I do not want from ClassName.nameOfFieldInClass!

  1. org.package.ClassName
  2. org.package.ClassName:referent
  3. org.package.ClassName:nameOfFieldInClass
  4. ClassName:nameOfFieldInClass

and it still displays the references I do not want to see! The documentation isn't very help from the popup: "Fields of certain classes which should be ignored when finding paths. For example this allows paths through Weak or Soft Reference referents to be ignored."

The online documentation is even worse "-excludes Fields of certain classes which should be ignored when finding paths. For example this allows paths through Weak or Soft Reference referents to be ignored."

What do I put in -excludes?

Looking through the openjdk source code, I see that both WeakReference and SoftReference have a private referent field. As a result, -excludes should be (fullClassName):(variableName). Now I just need to figure out why it's not working on my heap. Maybe the convention is different for a static field?

Related Questions