Lithemba352 / Lithemba352/AI-Personalized-Learning

Enrollment allows creation with missing required fields (null values)

Open
#9 0 comments 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.