Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1649 from eclipse/cd_bug571671
Browse files Browse the repository at this point in the history
[571671] optimize JdtQueuedBuildData.doNeedRebuild
  • Loading branch information
cdietrich authored Mar 8, 2021
2 parents 6a61e8c + afe2b64 commit d9f4a7c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,12 @@ public boolean needsRebuild(IProject project, Collection<IResourceDescription.De

protected boolean doNeedRebuild(JavaBuilderState javaBuilderState, Procedure1<? super UnconfirmedStructuralChangesDelta> processor) {
Iterator<UnconfirmedStructuralChangesDelta> ucDeltas = unconfirmedDeltas.iterator();
int buildNumber = javaBuilderState.getBuildNumber().intValue();
IProject project = javaBuilderState.getProject();
while (ucDeltas.hasNext()) {
UnconfirmedStructuralChangesDelta ucDelta = ucDeltas.next();
if ((ucDelta.getBuildNumber() < javaBuilderState.getBuildNumber().intValue())
&& ucDelta.getProject().equals(javaBuilderState.getProject())) {
if ((ucDelta.getBuildNumber() < buildNumber)
&& ucDelta.getProject().equals(project)) {
ucDeltas.remove();
if (processor != null) {
processor.apply(ucDelta);
Expand Down

0 comments on commit d9f4a7c

Please sign in to comment.