public static Credentials lookupSystemCredentials(String credentialsId){
  return firstOrNull(lookupCredentials(Credentials.class,Jenkins.getActiveInstance(),ACL.SYSTEM,Collections.<DomainRequirement>emptyList()),withId(credentialsId));
}

public static Credentials lookupSystemCredentials ( String credentialsId ) { return firstOrNull ( lookupCredentials ( Credentials . class , Jenkins . getActiveInstance ( ) , ACL . SYSTEM , Collections . < DomainRequirement > emptyList ( ) ) , withId ( credentialsId ) ) ; }
util method to find credential by id in jenkins
