Lithemba352 / Lithemba352/AI-Personalized-Learning
Enrollment allows creation with missing required fields (null values)
Open
@Lithemba352 is already working on this.
Since Apr 19, 2025.
bug
good first issue
help wanted
- Dominant language
- Java
- Stars
- 38
- Forks
- 31
- PR merge metrics
- No merged PRs in 30d
Description
**Description**
During unit testing, we observed that the Enrollment.Builder allows you to build an Enrollment object without providing required fields like userId, courseId, or status.
This results in objects with null fields, which could cause runtime issues later in the system (e.g., null pointer exceptions or invalid database entries).
**Expected Behavior**
- build() should throw an error or warning if required fields (like userId, courseId, etc.) are missing.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.