Skip to content

Update file samplecode.java

prajakta bendre requested to merge testbranch into main

Summary by Bito

This pull request updates two Java classes in the project. The LegacyBuggyApplication class, which contains methods demonstrating various programming bugs, has a fix applied to the incorrectCollectionRemove method to allow proper list removal. The ParallelExecutionWithBug class, implementing parallel task execution with a deliberate division by zero error in task 5, now includes the TimeUnit import to enable proper executor shutdown procedures.

Detailed Changes
  • Fixes collection removal bug in LegacyBuggyApplication (incorrectCollectionRemove method) by using mutable ArrayList instead of immutable Arrays.asList.
  • Adds TimeUnit import in ParallelExecutionWithBug to enable proper executor shutdown with awaitTermination.
Edited by prajakta bendre

Merge request reports