{"record":{"id":"b1b8fdbc2c8a2519","repo":"dotnet/reactive","slug":"source5","errorCode":null,"errorMessage":"source5","messagePattern":"source5","errorType":"validation","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.cs","lineNumber":873,"sourceCode":"\n            if (source2 == null)\n            {\n                throw new ArgumentNullException(nameof(source2));\n            }\n\n            if (source3 == null)\n            {\n                throw new ArgumentNullException(nameof(source3));\n            }\n\n            if (source4 == null)\n            {\n                throw new ArgumentNullException(nameof(source4));\n            }\n\n            if (source5 == null)\n            {\n                throw new ArgumentNullException(nameof(source5));\n            }\n\n            if (source6 == null)\n            {\n                throw new ArgumentNullException(nameof(source6));\n            }\n\n            if (source7 == null)\n            {\n                throw new ArgumentNullException(nameof(source7));\n            }\n\n            if (source8 == null)\n            {\n                throw new ArgumentNullException(nameof(source8));\n            }\n\n            if (source9 == null)","sourceCodeStart":855,"sourceCodeEnd":891,"githubUrl":"https://github.com/dotnet/reactive/blob/94b5d5ab912789f5abe9a72138a25bbd716fe59c/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.cs#L855-L891","documentation":"The 14-source Zip overload validates source5 at line 873; null there throws ArgumentNullException with parameter name 'source5'. Rx performs eager validation in the public method before delegating to the internal implementation, so the exception is thrown synchronously at the call site.","triggerScenarios":"Calling the 14-argument Observable.Zip with null as the fifth IObservable<TSource5> argument.","commonSituations":"An optional fifth stream passed as null instead of an empty observable, a failed stream-factory call on an error path, or argument misalignment during refactoring of the long parameter list.","solutions":["Use Observable.Empty<TSource5>() in place of the null fifth argument.","Fix the producer returning null for source5.","Validate each source is non-null before the Zip call.","Re-check argument order across the 14-source call."],"exampleFix":"// before\nvar zipped = Observable.Zip(s1, s2, s3, s4, null, s6, ..., s14, selector);\n// after\nvar zipped = Observable.Zip(s1, s2, s3, s4, s5 ?? Observable.Empty<TSource5>(), s6, ..., s14, selector);","handlingStrategy":"validation","validationCode":"if (source5 == null) throw new ArgumentNullException(nameof(source5));","typeGuard":"static IObservable<T> NonNull<T>(IObservable<T> s) => s ?? Observable.Empty<T>();","tryCatchPattern":"try { var zipped = Observable.Zip(source1, ..., source5, ...); } catch (ArgumentNullException ex) when (ex.ParamName == \"source5\") { /* substitute default source or abort */ }","preventionTips":["Coalesce each source with ?? Observable.Empty<T>() at the call site.","Fix stream factories to never return null on error paths.","Wrap multi-source Zips in a helper that validates all arguments."],"tags":["rx","null-argument","reactive-extensions"],"backgroundTag":"null-argument","analyzedSha":"94b5d5ab912789f5abe9a72138a25bbd716fe59c","analyzedAt":"2026-09-15T02:26:24.759Z","contentChangedAt":"2026-09-15T02:26:24.759Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}