Changeset 1969

Show
Ignore:
Timestamp:
03/03/08 11:53:46 (9 months ago)
Author:
apatel
Message:

merged trunk:1965 to the branch.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/custome_policy/framework-plugin/src/com/tresys/framework/plugin/editor/linkage/AbilityDataItem.java

    r1949 r1969  
    3030                super (i_item); 
    3131                m_interfaces = new InterfaceList (i_item.getAllInterfaces ().values ()); 
    32                 m_permissions = new PermissionList (i_item.GetPermVectors ().values ()); 
     32                Map permVectors = i_item.GetPermVectors (); 
     33                if (permVectors != null) 
     34                        m_permissions = new PermissionList (permVectors.values ()); 
     35                else 
     36                        m_permissions = new PermissionList (); 
    3337                m_root = new Object [] { m_interfaces, m_permissions }; 
    3438        } 
     
    5963                        Map abilityPerms = getCastedItem ().GetPermVectors (); 
    6064 
     65                        if (abilityPerms == null) 
     66                                return localPerms.size () != 0; 
     67                                 
    6168                        if (localPerms.size () != abilityPerms.size ()) 
    6269                                return true; 
     
    8289                        ability.addInterface ((Interface) itr.next ()); 
    8390                 
    84                 ability.GetPermVectors ().clear (); 
     91                if (ability.GetPermVectors () != null) 
     92                        ability.GetPermVectors ().clear (); 
    8593                for (Iterator itr = m_permissions.getPermVectors ().iterator (); itr.hasNext (); ) 
    8694                        ability.AddPermVector ((PermVector) itr.next ()); 
  • branches/custome_policy/framework-plugin/src/com/tresys/framework/plugin/editor/linkage/FLNKGenerator.java

    r1949 r1969  
    212212                { 
    213213                        Map permissions = i_ability.GetPermVectors (); 
    214                         if (permissions.size () > 0) 
     214                        if (permissions != null && permissions.size () > 0) 
    215215                        { 
    216216                                m_buff.append ("\tself\n"); 
  • branches/custome_policy/framework-plugin/src/com/tresys/framework/plugin/editor/linkage/PermissionList.java

    r1886 r1969  
    1919{ 
    2020        private final Collection /* <PermVector> */ m_permVectors = new HashSet /* <PermVector> */ (); 
     21         
     22        public PermissionList () 
     23        {} 
    2124         
    2225        public PermissionList (Collection i_permVectors) 
  • branches/custome_policy/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/commands/ShapeDeleteCommand.java

    r1952 r1969  
    103103                        DomainShape dom = (DomainShape) m_child; 
    104104                        m_controlResources = dom.getControlResoruces(); 
    105                         for (Iterator itr = m_controlResources.iterator (); itr.hasNext (); ) 
    106                         { 
    107                                 ControlResourceShape controlRes = (ControlResourceShape) itr.next (); 
    108                                 m_connections.addAll (controlRes.getAllConnections ()); 
     105                        if (m_controlResources != null) 
     106                        { 
     107                                for (Iterator itr = m_controlResources.iterator (); itr.hasNext (); ) 
     108                                { 
     109                                        ControlResourceShape controlRes = (ControlResourceShape) itr.next (); 
     110                                        m_connections.addAll (controlRes.getAllConnections ()); 
     111                                } 
    109112                        } 
    110113                } 
  • branches/custome_policy/framework-plugin/src/com/tresys/framework/plugin/editor/sysresource/SysResourceSourceViewer.java

    r1957 r1969  
    7272        } 
    7373 
    74  
    75         @SuppressWarnings("static-access") 
    7674        public Policy getPolicy() 
    7775        { 
    78                 IProject proj = getProject (); 
    79                 if( proj == null ) 
    80                         return null; 
    81                 FrameworkNature nature = FrameworkNature.getNature(proj); 
    82                 if ( nature == null ) 
    83                         return null; 
    84                 SELinuxSystem system = nature.GetSystemFromResource (getFile ()); 
    85                 if( system == null ) 
     76                SELinuxSystem system = FrameworkNature.GetSystemFromResource (getFile ()); 
     77                if (system == null) 
    8678                        return null; 
    8779                return system.getPolicy (); 
  • branches/custome_policy/framework-plugin/src/com/tresys/framework/plugin/editor/sysresource/SystemResourcesEditor.java

    r1957 r1969  
    4040        } 
    4141         
    42       @Override 
     42//    @Override 
    4343        protected void initializeEditor () 
    4444        { 
  • branches/custome_policy/framework-plugin/src/com/tresys/framework/plugin/editor/sysresource/SystemResourcesHoverController.java

    r1957 r1969  
    152152         * @return Information to return based on the domain 
    153153         */ 
    154       @SuppressWarnings("unchecked") 
     154//    @SuppressWarnings("unchecked") 
    155155        protected static String getDomainHover(IDomain currDomain)  
    156156        { 
     
    199199         * @return Information to return based on the resource 
    200200         */ 
    201       @SuppressWarnings("unchecked") 
     201//    @SuppressWarnings("unchecked") 
    202202        protected static String getResourceHover(Resource currResource)  
    203203        { 
     
    229229         * @return The String of information to display 
    230230         */ 
    231       @SuppressWarnings("unchecked") 
     231//    @SuppressWarnings("unchecked") 
    232232        protected static String getRdefHover(Rdef currRdef)  
    233233        { 
     
    253253         * @return 
    254254         */ 
    255       @SuppressWarnings("unchecked") 
     255//    @SuppressWarnings("unchecked") 
    256256        protected static String getEntryPointHover(Entrypoint theEntryPoint)  
    257257        {