Project

General

Profile

« Previous | Next » 

Revision 2566

Added by Jing Tao over 18 years ago

Add code to check if adminstor list is null.

View differences:

src/edu/ucsb/nceas/metacat/MetaCatUtil.java
789 789
    public static void getAdminInfo(){
790 790
    	String adminList = MetaCatUtil.getOption("administrators");
791 791
        try {
792
            administrators = adminList.split(":");
792
            if (adminList != null)
793
            {
794
              administrators = adminList.split(":");
795
            }
796
            else
797
            {
798
               administrators = null;
799
            }
793 800
        } catch (PatternSyntaxException pse) {
794 801
            administrators = null;
795 802
            MetaCatUtil.debugMessage("Error in MetacatServlet.init: "
......
798 805
        
799 806
    	String modList = MetaCatUtil.getOption("moderators");
800 807
        try {
801
            moderators = modList.split(":");
808
            if ( modList != null)
809
            {
810
                moderators = modList.split(":");
811
            }
812
            else
813
            {
814
                moderators = null;
815
            }
816
            
802 817
        } catch (PatternSyntaxException pse) {
803 818
            moderators = null;
804 819
            MetaCatUtil.debugMessage("Error in MetacatServlet.init: "

Also available in: Unified diff