Community
Participate
Working Groups
Build: 3.0 RC1 The method JavaProject.setJavaCommand calls IProjectDescription.getBuildSpec twice, and assumes that identical build command instances will be returned. This is no longer true. We had to change this in 3.0 because ICommand instances are not immutable, and changes made the command arguments were previously not triggering a proper resource delta. I recomend either only calling gteBuildSpec once, or use equality rather than identity when comparing commands: if (oldCommands[i].equals(oldJavaCommand)) { oldCommands[i] = newCommand; break; } See bug 64128 for background info.
Created attachment 11529 [details] Proposed patch Changed getJavaCommand(...) to take the build spec as an argument and to return the index of the Java command.
Fix looks fine to me.
Released patch.
Verified in 200406110010