alibaba / alibaba/Sentinel

Remove redundant functional interfaces

Open
#2,327 2 comments 0 reactions 0 assignees View on GitHub
kind/enhancement
Dominant language
Java
Stars
23.1k
Forks
8.1k
PR merge metrics
No merged PRs in 30d

Description

## Issue Description

In sentinel-core moudle, there are many functional interfaces, such as `Function`, `Consumer`, `BiConsumer`, etc. they are all copied JDK8. I guess these functional interfaces were created because sentinel used a JDK version lower than 8, but we wanted to use functional interfaces. But now, sentinel depends on the JDK version. The minimum requirement is 8. Therefore, we can delete these interfaces and use the interfaces provided by JDK.

### Describe what happened (or what feature you want)

### Describe what you expected to happen

### How to reproduce it (as minimally and precisely as possible)

1.
2.
3.

### Tell us your environment

### Anything else we need to know?

Contributor guide

Open the contributing guide

Research direction

Start in the sentinel-core module by locating the copied functional interfaces such as Function, Consumer, and BiConsumer, then trace their usages. Replace the module's references with the JDK 8 interfaces and verify that sentinel-core builds and its existing tests pass without the redundant interfaces.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.