π OMF-222 μ€λ³΅μ ν μλ΅μ΄ csvλ‘ μΆμΆλμ§ μλ λ²κ·Έ μμ #114
π OMF-222 μ€λ³΅μ ν μλ΅μ΄ csvλ‘ μΆμΆλμ§ μλ λ²κ·Έ μμ #114
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
Note
|
| Cohort / File(s) | Summary |
|---|---|
λ΄λΆ λ°μ΄ν° ꡬ쑰 리ν©ν λ§ src/main/java/OneQ/OnSurvey/domain/survey/service/export/SurveyExportService.java |
λ΅λ³ μ μ₯ ꡬ쑰λ₯Ό Stringμμ SetμΌλ‘ λ³κ²½νμ¬ νμλΉ μ§λ¬Έλ³ 볡μ μλ΅μ μ§μ. Setμ toString() νΈμΆλ‘ μΈν null μ²λ¦¬ μ°¨μ΄ λ°μ λ° NPE μν κ°λ₯μ±. |
Estimated code review effort
π― 3 (Moderate) | β±οΈ ~20 minutes
π₯ Pre-merge checks | β 2 | β 1
β Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | Write docstrings for the functions missing them to satisfy the coverage threshold. |
β Passed checks (2 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | β Passed | μ λͺ©μ΄ PRμ μ£Όμ λ³κ²½μ¬νμ λͺ ννκ² μμ½νκ³ μμΌλ©°, λ²κ·Έ μμ κ³Ό μ€λ³΅μ ν μλ΅ μΆμΆ λ¬Έμ λ₯Ό μ§μ λ€λ£¨κ³ μμ΅λλ€. |
| Description check | β Passed | PR μ€λͺ μ΄ μ μ₯μμ ν νλ¦Ώ ꡬ쑰λ₯Ό λ°λ₯΄κ³ μμΌλ©°, κ΄λ ¨ μ΄μ, μμ μΈλΆμ¬νμ΄ μμ νκ² ν¬ν¨λμ΄ μμ΅λλ€. |
βοΈ Tip: You can configure your own custom pre-merge checks in the settings.
β¨ Finishing Touches
π§ͺ Generate unit tests (beta)
- Create PR with unit tests
- Post copyable unit tests in a comment
- Commit unit tests in branch
feat/OMF-222
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
There was a problem hiding this comment.
Actionable comments posted: 2
π€ Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@src/main/java/OneQ/OnSurvey/domain/survey/service/export/SurveyExportService.java`:
- Around line 62-63: The code uses computeIfAbsent(a.getQuestionId(), k -> new
HashSet<>()).add(a.getContent()) which allows non-deterministic ordering;
replace the HashSet with LinkedHashSet to preserve insertion order for
consistent CSV export. Update the supplier passed to computeIfAbsent (in
SurveyExportService, around computeIfAbsent and add(a.getContent())) to return a
new LinkedHashSet<>() so duplicates are still eliminated but insertion order is
retained.
- Around line 93-96: In SurveyExportService where you build CSV rows (the loop
over headers using memberAnswers and SurveyQuestionHeader), avoid calling
.toString() on memberAnswers.get(h.getQuestionId()) which can be null and cause
NPE; instead retrieve the Set<String> value into a local (e.g., answersSet),
produce a safe String by checking for null/empty (use String.join(",",
answersSet) when non-null) and then pass that resulting String into nvl(...);
update the code that references memberAnswers.get(...) and nvl(...) to perform
the null check and join so empty/missing responses become an empty string rather
than throwing an exception or including bracketed Set.toString().
β¨ Related Issue
π Task Details
StringμμSet<String>μΌλ‘ μ‘°ννλλ‘ νμ¬ μ€λ³΅μ ν μλ΅μ΄ λλ½λμ§ μλλ‘ μμ π¬ Review Requirements (Optional)
Summary by CodeRabbit
μλ‘μ΄ κΈ°λ₯
κ°μ μ¬ν