Ok. Sounds good.

-jon

> 
> [EMAIL PROTECTED] wrote:
> > 
> > > .......  why would we want RunData without a ServletConfig?  Other than
> > > compatibility.
> > 
> > Up until John made the change, we didn't need it. ;-)
> > 
> > Remember, Turbine is general purpose...just like database connections, not
> > everyone is going to need everything...we might as well allow people to
> > not have it if it is as simple as just having another method.
> 
> Right.  But there is no reason you should ever go without a
> ServerConfig... unless you really explicitly don't want one then you can
> pass null.
> 
> The problem is that if someone uses the original getRunData() then we
> might get NPEs in the core which is bad.  NPEs are something we want to
> avoid if at all possible.  
> 
> Removing the overload:
> 
> - requires everyone to explicitly pass null so that they know what they
> are getting into.  This also reduces the chances that this instance of
> RunData could get into the core.
> 
> - Make sure that getServletConfig() always has a value (unless someone
> does something stupid like the above) and that we don't get NPEs
> 
> So I am -1 on not deprecating this.  I don't think that the added
> flexibilty deserves adding potential bugs into the core.  Right now it
> won't manifest itself but as more apps call getServletConfig() we might
> have problems.  Granted we could *allow* it to return null but this is
> still a bad design.
> 
> I really think we should deprecate if for like 1 month and then remove
> the method.  Within Turbine.java we are doing it correctly so lets try
> to get this the excepted use.
> 
> Also.  Why would you ever want to run with a null ServletConfig?  It
> really doesn't make any sense to me.  You have the object so go ahead
> and keep it.  I mean you might get .000001% more memory and .0000% CPU
> by not having it...
> 
> If you agree to the above I would like to see:
> 
> public static RunData getRunData( HttpServletRequest req, 
>                                   HttpServletResponse res, 
>                                   ServletConfig config ) throws
> IOException {
> 
>     if(req == null || res || config == null) {
>         throw new IllegalArgumentException("no values may be null");
>     }
> 
> }
> 
> 
> Kevin
> 
> -- 
> Kevin A Burton ([EMAIL PROTECTED])
> http://relativity.yi.org
> Message to SUN:  "Open Source Java!"
> "For evil to win is for good men to do nothing."
> 
> 
> ------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]
> 
> 



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to