That is not the point david.  It is normal case for the code to return 
an empty set; it is in the java docs.  He should check for it. 
Exceptions are only for exceptional cases not regular program flow.  He 
is being lazy.

If he coded it correctly in the first place it would not need a comment.

He needs to fix this code.

-dain

David Jencks wrote:
> A comment might make it clearer what is going on, but I think Andy is
> right-- if the query returns, there will be an element in it, so the
> iterator().next() is sure to succeed.  The exception would come from
> executing the query -- right?
> 
> david
> 
> On 2002.08.16 19:35:35 -0400 Andreas Schaefer wrote:
> 
>>Hi Dain
>>
>>
>>>That is no excuse.  The exceptional case is the MBeanServer is having 
>>>issues.  So to quote you "get off your fat ass".  This code is 
>>>confusing, and just plane wrong.  Fix it.
>>
>>No, it is an exception when no server is available therefore this
>>is correct or do you check every String parameter if it is null
>>before applying a method on it ?
>>
>>BTW Alex problem is not there !
>>
>>Have fun - Andy
>>
>>
>>
>>
>>-------------------------------------------------------
>>This sf.net email is sponsored by: OSDN - Tired of that same old
>>cell phone?  Get a new here for FREE!
>>https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
>>_______________________________________________
>>Jboss-development mailing list
>>[EMAIL PROTECTED]
>>https://lists.sourceforge.net/lists/listinfo/jboss-development
>>
>>
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by: OSDN - Tired of that same old
> cell phone?  Get a new here for FREE!
> https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development


-- 
xxxxxxxxxxxxxxxxxxxxxxxx
Dain Sundstrom
Chief Architect JBossCMP
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx



-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to