Community
Participate
Working Groups
Build Identifier: If an class contains nonstatic subclasses, the subclass can only instanticated from classinstances only (i.e. factory-creational-pattern GoF). Often those subclasses requires params from the class. Sometimes users pass those values to the subclass via constructor-parameter, instead of pass those values directly to the subclassfield. Reproducible: Always Steps to Reproduce: public class TeaFactory{ String factoryFlavour="Earl Grey"; public class Teabag{ public final String flavour; Teabag(String factoryFlavour){ this.flavour = factoryFlavour; } } public TeabagNEW{ public final String flavour = factoryFlavour; } public Teabag produceTeabag(){ return new Teabag(factoryFlavour); } }
Can you please give a valid code snippet? The above snippet is invalid because of "public TeabagNEW{". Also, please clearly mention what error are you asking a quick fix for.
No, sorry.
Verified as invalid for Eclipse Luna 4.4 M7 Build id: I20140428-2000