2 Replies Latest reply on May 18, 2009 10:44 PM by israel.bgf

    Annotation: @In(required=false)

    israel.bgf
      Shouldnt the required=false on @In, @Out annotations be default? Why would i want an exception to be throwed when i try to inject/outject something?

      Is there any performance issue in add the @AutoCreate annotation on classes to supress this problem?

      Thks,
      Israel.
        • 1. Re: Annotation: @In(required=false)
          clerum

          Why wouldn't you want an exception to be thrown if a null component is being injected or outjected?


          I think the default behavior protects the user from a NPE unless they explictly override it. It Helped me quite a bit as I was just starting with the framework. As I've gotten more comfortable I have seen places where I can safely turn off the requirement but it's definitely a smaller percentage of my bijections that have a required=false

          • 2. Re: Annotation: @In(required=false)
            israel.bgf
            In fact i dont have many points that needs required=false, but it still looks that it should be default for me. I dunno.

            Anyway, thks for the opinion. :)