Coverage Report - org.mule.module.jaas.MuleJaasPrincipal
 
Classes in this File Line Coverage Branch Coverage Complexity
MuleJaasPrincipal
50%
4/8
50%
1/2
1.5
 
 1  
 /*
 2  
  * $Id: MuleJaasPrincipal.java 10789 2008-02-12 20:04:43Z dfeist $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 9  
  */
 10  
 
 11  
 package org.mule.module.jaas;
 12  
 
 13  
 import java.security.Principal;
 14  
 
 15  
 public class MuleJaasPrincipal implements Principal
 16  
 {
 17  
     private final String name;
 18  
 
 19  
     public MuleJaasPrincipal(String name)
 20  8
     {
 21  8
         if (name == null)
 22  
         {
 23  0
             throw new IllegalArgumentException("Null name");
 24  
         }
 25  8
         this.name = name;
 26  8
     }
 27  
 
 28  
     public String getName()
 29  
     {
 30  0
         return name;
 31  
     }
 32  
 
 33  
     public String toString()
 34  
     {
 35  0
         return name;
 36  
     }
 37  
 
 38  
     public int hasCode()
 39  
     {
 40  0
         return name.hashCode();
 41  
     }
 42  
 }