コード例 #1
0
  private SoftwareModule getModuleAndThrowExceptionIfThatFails(final Long moduleId) {
    final SoftwareModule softwareModule = softwareModuleRepository.findOne(moduleId);

    if (softwareModule == null) {
      LOG.debug("no software module with ID {} exists", moduleId);
      throw new EntityNotFoundException("Software Module: " + moduleId);
    }
    return softwareModule;
  }