{"record":{"id":"abe9a0b357d8b7ab","repo":"apache/iceberg","slug":"this-getclass-getname-doesn-t-implement-re","errorCode":null,"errorMessage":"this.getClass().getName() + \" doesn't implement removedDeleteFiles\"","messagePattern":"this\\.getClass\\(\\)\\.getName\\(\\) \\+ \" doesn't implement removedDeleteFiles\"","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"warning","filePath":"api/src/main/java/org/apache/iceberg/Snapshot.java","lineNumber":162,"sourceCode":"  @Deprecated\n  default Iterable<DeleteFile> addedDeleteFiles(FileIO io) {\n    throw new UnsupportedOperationException(\n        this.getClass().getName() + \" doesn't implement addedDeleteFiles\");\n  }\n\n  /**\n   * Return all delete files removed from the table in this snapshot.\n   *\n   * <p>The files returned include the following columns: file_path, file_format, partition,\n   * record_count, and file_size_in_bytes. Other columns will be null.\n   *\n   * @param io a {@link FileIO} instance used for reading files from storage\n   * @return all delete files removed from the table in this snapshot\n   * @deprecated will be removed in 2.0.0; use SnapshotChanges#builderFor(Table) instead\n   */\n  @Deprecated\n  default Iterable<DeleteFile> removedDeleteFiles(FileIO io) {\n    throw new UnsupportedOperationException(\n        this.getClass().getName() + \" doesn't implement removedDeleteFiles\");\n  }\n\n  /**\n   * Return the location of this snapshot's manifest list, or null if it is not separate.\n   *\n   * @return the location of the manifest list for this Snapshot\n   */\n  String manifestListLocation();\n\n  /**\n   * Return the id of the schema used when this snapshot was created, or null if this information is\n   * not available.\n   *\n   * @return schema id associated with this snapshot\n   */\n  default Integer schemaId() {\n    return null;","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/api/src/main/java/org/apache/iceberg/Snapshot.java#L144-L180","documentation":"Snapshot.removedDeleteFiles(FileIO) is a deprecated default method on the Snapshot interface; implementations are not required to provide it, and the default throws UnsupportedOperationException. It has been superseded by SnapshotChanges#builderFor(Table), so hitting this error means calling a legacy API against a Snapshot implementation that never implemented it.","triggerScenarios":"Calling removedDeleteFiles(FileIO) directly on a Snapshot instance (e.g. a BaseSnapshot version or custom Snapshot) that does not override this deprecated method.","commonSituations":"Code written against the pre-2.0 deprecated incremental-scan API still running on newer Iceberg versions; copy-pasted older analysis code enumerating deleted delete files between snapshots.","solutions":["Migrate to SnapshotChanges / changelog APIs: table.changelog() or SnapshotChanges.builderFor(table) instead of Snapshot.removedDeleteFiles.","If the deprecated call is intentional, upgrade iceberg-core so the runtime Snapshot implementation (BaseSnapshot) overrides removedDeleteFiles.","Remove the deprecated call path before the 2.0.0 removal."],"exampleFix":"// before\nIterable<DeleteFile> removed = snapshot.removedDeleteFiles(io); // deprecated + unsupported\n// after\nChangelog changelog = table.changelog(); // use SnapshotChanges builder API","handlingStrategy":"fallback","validationCode":"static boolean hasRemovedDeleteFiles(Snapshot s) {\n  try { s.removedDeleteFiles(null); return true; } catch (UnsupportedOperationException e) { return false; } }\n","typeGuard":null,"tryCatchPattern":"try {\n  removed = snapshot.removedDeleteFiles(io);\n} catch (UnsupportedOperationException e) {\n  removed = table.changelog().deletedFiles(); // SnapshotChanges builder API\n}","preventionTips":["Replace Snapshot.removedDeleteFiles with table.changelog() / SnapshotChanges.builderFor(table).","Treat all deprecated 2.0-removal Snapshot APIs as unavailable in new code.","Grep codebases for removedDeleteFiles during upgrades."],"tags":["java","iceberg","deprecated-api","snapshot","unsupported-operation"],"backgroundTag":"deprecated-api-usage","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}