mx4j/src/core/javax/management MBeanPermission.java,1.9,1.10

Jeremy Boynes <[email protected]> Wed, 09 Feb 2005 17:25:38 +0000
Newsgroups gmane.comp.java.mx4j.cvs
Message-ID <[email protected]>
Update of /cvsroot/mx4j/mx4j/src/core/javax/management
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17366/src/core/javax/management

Modified Files:
	MBeanPermission.java 
Log Message:
Fix for [ 1119438 ] In MBeanPersmission, empty [] is allowed

Index: MBeanPermission.java
===================================================================
RCS file: /cvsroot/mx4j/mx4j/src/core/javax/management/MBeanPermission.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** MBeanPermission.java	8 Feb 2005 07:12:19 -0000	1.9
--- MBeanPermission.java	9 Feb 2005 17:25:35 -0000	1.10
***************
*** 369,376 ****
           // Find the ObjectName string inside the brackets
           inside = target.substring(open + 1, close).trim();
!          if (inside.length() == 0) throw new IllegalArgumentException("Empty string in ObjectName brackets");
! 
!          // Check for the nilcard
!          if (inside.equals(NILCARD)) return null;
        }
  
--- 369,380 ----
           // Find the ObjectName string inside the brackets
           inside = target.substring(open + 1, close).trim();
!          if (inside.length() == 0)
!          {
!             inside = "*:*";
!          }
!          else if (inside.equals(NILCARD))
!          {
!             return null;
!          }
        }
  



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click