public static String getCategory ( String eventSrcName ) { if ( eventSrcName == null ) { return null ; } int end = eventSrcName . lastIndexOf ( ' ' ) ; eventSrcName = eventSrcName . substring ( 0 , end ) ; if ( CHECKSTYLE_PACKAGE . equals ( eventSrcName ) ) { return "misc" ; } else if ( ! eventSrcName . startsWith ( CHECKSTYLE_PACKAGE ) ) { return "extension" ; } return eventSrcName . substring ( eventSrcName . lastIndexOf ( ' ' ) + 1 ) ; }
Get the rule category from an audit event source name .