apache / apache/accumulo

Current deprecation pattern breaks users

Open
#4,820 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
1.2k
Forks
487
Avg merge
4d 5h
Merged PRs (30d)
13

Description

**Describe the bug**

When code has been marked for deprecation the old methods are removed in favor of a new default implementation being added in the interface that only throws an `UnsupportedOperation` runtime exception.
This causes breakages in user code as the deprecated code should still function, even when marked for deprecation.
https://semver.org/#how-should-i-handle-deprecating-functionality

Instead, the code functionality is removed when marked for deprecation and user code breaks by encountering runtime exceptions.

**Versions (OS, Maven, Java, and others, as appropriate):**
- Affected version(s) of this project: [e.g. 1.10.0] 2.1.x, 3.x

**Expected behavior**
When marking code for deprecation, the existing methods should continue to function until removed in a later major version.
Current deprecated code should be examined and ensure that, while deprecated, the code continues to function as expected.

**Additional context**
There have been at least two known issue tickets where users have been warned that code was being deprecated, but the code immediately stopped functioning in the same major version.

https://github.com/apache/accumulo/issues/4810
https://github.com/apache/accumulo/issues/3892

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the deprecated interfaces and methods implicated by issues 4810 and 3892, then trace which implementations currently throw UnsupportedOperation. Done means deprecated methods continue their prior behavior until a later major-version removal, with the affected cases covered by the project's existing tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.