public class LazyInit {
	static Object foo;

	// This should be reported
	public static Object getFoo() {
		if (foo == null)
			foo = new Object();
		return foo;
	}

	// This should not be reported
	public synchronized static Object sgetFoo() {
		if (foo == null)
			foo = new Object();
		return foo;
	}
}

public class LazyInit {
	static Object foo;
	static volatile Object bar;

	// This should be reported
	public static Object getFoo() {
		if (foo == null)
			foo = new Object();
		return foo;
	}
	// This should be reported
	public static Object getBar() {
		if (bar == null)
			bar = new Object();
		return bar;
	}

	// This should not be reported
	public synchronized static Object sgetFoo() {
		if (foo == null)
			foo = new Object();
		return foo;
	}
}

Check that volatile statics don't get flagged
Check that volatile statics don't get flagged


git-svn-id: e7d6bde23f017c9ff4efd468d79d66def666766b@1966 eae3c2d3-9b19-0410-a86e-396b6ccb6ab3
