#vulnerable code 
                             @Override
	public boolean save(T entity) {
		BladeUser user = SecureUtil.getUser();
		LocalDateTime now = LocalDateTime.now();
		entity.setCreateUser(Objects.requireNonNull(user).getUserId());
		entity.setCreateTime(now);
		entity.setUpdateUser(user.getUserId());
		entity.setUpdateTime(now);
		entity.setStatus(BladeConstant.DB_STATUS_NORMAL);
		entity.setIsDeleted(BladeConstant.DB_NOT_DELETED);
		return super.save(entity);
	} 
                            #location 7 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             @Override
	public boolean save(T entity) {
		BladeUser user = SecureUtil.getUser();
		if (user != null) {
			entity.setCreateUser(user.getUserId());
			entity.setUpdateUser(user.getUserId());
		}
		LocalDateTime now = LocalDateTime.now();
		entity.setCreateTime(now);
		entity.setUpdateTime(now);
		if (entity.getStatus() == null) {
			entity.setStatus(BladeConstant.DB_STATUS_NORMAL);
		}
		entity.setIsDeleted(BladeConstant.DB_NOT_DELETED);
		return super.save(entity);
	}