ciera / crystalsaf

Automatically exported from code.google.com/p/crystalsaf
3 stars 2 forks source link

Static field initializers are part of constructor CFGs #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a class with a static field with an initializer.
2. Create a constructor for this class.
3. Create a CFG for the constructor.

What is the expected output? What do you see instead?

The CFG for the constructor will include nodes for the initializers of the
static fields.  Instead, static fields should be skipped in constructors.

Example:  The constructor below will include nodes for "PRESENT = new
Object()", even though PRESENT is a static field.

public class C {
    private static final Object PRESENT = new Object();
    public C() {
    }
}

Original issue reported on code.google.com by kevin.bi...@gmail.com on 24 Jul 2008 at 9:00

GoogleCodeExporter commented 9 years ago

Original comment by ciera.christopher on 1 Aug 2008 at 1:16

GoogleCodeExporter commented 9 years ago
fix and tests are in

Original comment by ciera.christopher on 1 Aug 2008 at 1:29

GoogleCodeExporter commented 9 years ago
This works for me now; thanks for the quick fix!

Original comment by kevin.bi...@gmail.com on 11 Sep 2008 at 3:20