{"record":{"id":"40ae9c07f50d7621","repo":"apache/beam","slug":"unknown-s-s","errorCode":null,"errorMessage":"Unknown %s: %s","messagePattern":"Unknown (.+?): (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"sdks/java/core/src/main/java/org/apache/beam/sdk/testing/WindowFnTestUtils.java","lineNumber":311,"sourceCode":"      if (earlierEndingWindow != null) {\n        assertThat(\n            outputTimestamp, greaterThan((ReadableInstant) earlierEndingWindow.maxTimestamp()));\n      }\n\n      earlierEndingWindow = window;\n    }\n  }\n\n  private static Instant assignOutputTime(\n      TimestampCombiner timestampCombiner, Instant inputTimestamp, BoundedWindow window) {\n    switch (timestampCombiner) {\n      case EARLIEST:\n      case LATEST:\n        return inputTimestamp;\n      case END_OF_WINDOW:\n        return window.maxTimestamp();\n      default:\n        throw new IllegalArgumentException(\n            String.format(\"Unknown %s: %s\", TimestampCombiner.class, timestampCombiner));\n    }\n  }\n\n  private static Instant combineOutputTimes(\n      TimestampCombiner timestampCombiner, Iterable<Instant> outputInstants) {\n    checkArgument(\n        !Iterables.isEmpty(outputInstants),\n        \"Cannot combine zero instants with %s\",\n        timestampCombiner);\n    switch (timestampCombiner) {\n      case EARLIEST:\n        return Ordering.natural().min(outputInstants);\n      case LATEST:\n        return Ordering.natural().max(outputInstants);\n      case END_OF_WINDOW:\n        return outputInstants.iterator().next();\n      default:","sourceCodeStart":293,"sourceCodeEnd":329,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/core/src/main/java/org/apache/beam/sdk/testing/WindowFnTestUtils.java#L293-L329","documentation":"WindowFnTestUtils.assignOutputTime throws IllegalArgumentException when the TimestampCombiner passed to validateGetOutputTimestamps is not EARLIEST, LATEST, or END_OF_WINDOW. It is a defensive default-case guard for an unexpected enum value.","triggerScenarios":"Passing a TimestampCombiner other than EARLIEST/LATEST/END_OF_WINDOW into WindowFnTestUtils.validateGetOutputTimestamps* (e.g. a future/combiner variant the test util doesn't handle).","commonSituations":"Testing a WindowFn configured with a newer TimestampCombiner that the testing utility predates, or accidentally passing the wrong combiner in test wiring.","solutions":["Use one of the supported combiners (EARLIEST, LATEST, END_OF_WINDOW) in the test","Update Beam so the test utility supports your combiner","Test output timestamps outside WindowFnTestUtils with a custom harness"],"exampleFix":"// before\nvalidateGetOutputTimestamps(fn, TimestampCombiner.OTHER, windows)\n// after\nvalidateGetOutputTimestamps(fn, TimestampCombiner.EARLIEST, windows)","handlingStrategy":"validation","validationCode":"if (combiner != TimestampCombiner.EARLIEST && combiner != TimestampCombiner.LATEST && combiner != TimestampCombiner.END_OF_WINDOW) {\n  throw new IllegalArgumentException(\"WindowFnTestUtils supports only EARLIEST/LATEST/END_OF_WINDOW\");\n}","typeGuard":null,"tryCatchPattern":"try { validateGetOutputTimestamps(fn, combiner, windows); }\ncatch (IllegalArgumentException e) { /* fall back to custom harness for unsupported combiner */ }","preventionTips":["Test only with EARLIEST, LATEST, or END_OF_WINDOW combiners in WindowFnTestUtils","Check supported combiners in the utility before adding new ones to a WindowFn","Upgrade Beam when testing newer combiner variants"],"tags":["java","testing","windows","timestamp-combiner"],"backgroundTag":"invalid-enum-value","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}