src.samples.java.ex.USFW_Sample Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fb-contrib Show documentation
Show all versions of fb-contrib Show documentation
An auxiliary findbugs.sourceforge.net plugin for java bug detectors that fall outside the narrow scope of detectors to be packaged with the product itself.
package ex;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;
@Component
public class USFW_Sample {
private String s;
public void writeToField() {
s = "Hello";
}
}
@Controller
@Scope("singleton")
class USFW1_Sample {
private String s;
public void writeToField() {
s = "Hello";
}
}
@Repository
@Scope(scopeName = "singleton")
class USFW2_Sample {
private String s;
public void writeToField() {
s = "Hello";
}
}
@Service
@Scope("prototype")
class USFW3_Sample {
private String s;
public void fpWriteToField() {
s = "Hello";
}
}