Alex Loubyansky wrote:
> ObjectName lServer = null;
> try {
>    lServer = (ObjectName) pServer.queryNames(
>       new ObjectName(
>          J2EEManagedObject.getDomainName() + ":" +
>          J2EEManagedObject.TYPE + "=" + J2EEServer.J2EE_TYPE + "," +
>          "*"
>       ),
>       null
>    ).iterator().next();
> }
> catch( Exception e ) {
>    lLog.error( "Could not locate JSR-77 Server: " + pName, e );
> }

Who wrote this code?  Use isEmpty()!

EXCEPTIONS ARE FOR EXCEPTIONAL CASES

-dain



-------------------------------------------------------
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