FIX: Fix findbugs warning by removing unnecessary null check in ByteCountOutputStream.
FIX: In Main, Convert a list to an array by setting the right size of the array.
FIX: In TaskContext, fix synchronization object to avoid findbugs warning.
FIX: In ClusterCombinedTaskScheduler and CombinedTaskScheduler, fix findbugs synchronization warnings.