bpm/src/main/java/org/jboss/pnc/bpm/BpmManager.java
@Deprecated
    public Integer getTaskIdByBuildId(int buildId) {
        List<Integer> result = tasks.values().stream()
                .filter(t -> t instanceof BpmBuildTask)
                .filter(t -> ((BpmBuildTask) t).getBuildTask().getId() == buildId)
                .map(BpmTask::getTaskId)
                .collect(Collectors.toList());
        if (result.size() > 1)
            throw new IllegalStateException("More that one task with the same build id: " + result);
        return result.size() == 1 ? result.get(0) : null;
    }
@Deprecated
    public Integer getTaskIdByBuildId(int buildId) {
        List<Integer> result = tasks.values().stream()
                .filter(t -> t instanceof BpmBuildTask)
                .filter(t -> ((BpmBuildTask) t).getBuildTask().getId() == buildId)
                .map(BpmTask::getTaskId)
                .collect(Collectors.toList());
        if (result.size() > 1)
            throw new IllegalStateException("More that one task with the same build id: " + result);
        return result.size() == 1 ? result.get(0) : null;
    }
@ Deprecated public Integer getTaskIdByBuildId ( int buildId ) { List < Integer > result = tasks . values ( ) . stream ( ) . filter ( t -> t instanceof BpmBuildTask ) . filter ( t -> ( ( BpmBuildTask ) t ) . getBuildTask ( ) . getId ( ) == buildId ) . map ( BpmTask :: getTaskId ) . collect ( Collectors . toList ( ) ) ; if ( result . size ( ) > 1 ) throw new IllegalStateException ( "More that one task with the same build id: " + result ) ; return result . size ( ) == 1 ? result . get ( 0 ) : null ; }
This method solves backwards compatibility problem.
It will be removed soon.
This method solves backwards compatibility problem . It will be removed soon .