File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ id : TASK-44
3+ title : Fix java:S1874 in BuiltInToolProviderTest.java at line 51
4+ status : Done
5+ priority : low
6+ assignee : []
7+ created_date : ' 2026-02-18 11:15'
8+ labels :
9+ - sonarqube
10+ - java
11+ dependencies : []
12+ references : []
13+ documentation : []
14+ ordinal : 44000
15+ ---
16+
17+ # Fix ` java:S1874 ` : Remove this use of "getBaseDir"; it is deprecated.
18+
19+ ## Description
20+
21+ SonarQube for IDE detected a code quality issue.
22+
23+ - ** Rule:** ` java:S1874 `
24+ - ** File:** ` src/test/java/com/devoxx/genie/service/agent/tool/BuiltInToolProviderTest.java `
25+ - ** Line:** 51
26+ - ** Severity:** Low impact on Maintainability
27+ - ** Issue:** Remove this use of "getBaseDir"; it is deprecated.
28+
29+ ## Task
30+
31+ Fix the SonarQube issue ` java:S1874 ` at line 51 in ` src/test/java/com/devoxx/genie/service/agent/tool/BuiltInToolProviderTest.java ` .
32+
33+ ## Acceptance Criteria
34+
35+ - [x] Issue ` java:S1874 ` at ` BuiltInToolProviderTest.java:51 ` is resolved
36+ - [x] No new SonarQube issues introduced by the fix
37+ - [x] All existing tests continue to pass
38+
39+ ## Implementation Notes
40+
41+ Removed the deprecated ` project.getBaseDir() ` call from ` setUp() ` at line 51. Investigation showed that:
42+ - ` BuiltInToolProvider ` never calls ` getBaseDir() ` — it only passes the ` Project ` to tool executors
43+ - All tool executors use ` ProjectUtil.guessProjectDir(project) ` or ` project.getBasePath() ` instead
44+ - The ` projectBase ` mock field and ` VirtualFile ` import were also unused and removed
45+
46+ ** Files modified:** ` src/test/java/com/devoxx/genie/service/agent/tool/BuiltInToolProviderTest.java `
47+
48+ ** Changes:**
49+ 1 . Removed ` import com.intellij.openapi.vfs.VirtualFile ` (unused after fix)
50+ 2 . Removed ` @Mock private VirtualFile projectBase ` field (only used in deprecated call)
51+ 3 . Removed ` when(project.getBaseDir()).thenReturn(projectBase) ` line (the deprecated API call)
52+
53+ All 13 tests in ` BuiltInToolProviderTest ` pass after the change.
Original file line number Diff line number Diff line change 1+ ---
2+ id : TASK-45
3+ title : " Fix java:S2699 in CliTaskExecutorServiceTest.java at line 108"
4+ status : To Do
5+ priority : low
6+ assignee : []
7+ created_date : ' 2026-02-18 11:19'
8+ updated_date : ' 2026-02-18 10:36'
9+ labels :
10+ - sonarqube
11+ - java
12+ dependencies : []
13+ references : []
14+ documentation : []
15+ ordinal : 45000
16+ ---
17+
18+ # Fix ` java:S2699 ` : Add at least one assertion to this test case.
19+
20+ SonarQube for IDE detected a code quality issue.
21+
22+ - ** Rule:** ` java:S2699 `
23+ - ** File:** ` src/test/java/com/devoxx/genie/service/cli/CliTaskExecutorServiceTest.java `
24+ - ** Line:** 108
25+ - ** Severity:** Blocker impact on Maintainability
26+ - ** Issue:** Add at least one assertion to this test case.
27+
28+ ## task
29+ Fix the SonarQube issue ` java:S2699 ` at line 108 in ` src/test/java/com/devoxx/genie/service/cli/CliTaskExecutorServiceTest.java ` .
30+
31+ ## Acceptance Criteria
32+
33+ - [ ] Issue ` java:S2699 ` at ` CliTaskExecutorServiceTest.java:108 ` is resolved
34+ - [ ] No new SonarQube issues introduced by the fix
35+ - [ ] All existing tests continue to pass
36+
Original file line number Diff line number Diff line change 1+ ---
2+ id : TASK-48
3+ title : Fix java:S5853 in BuiltInToolProviderTest.java at line 264
4+ status : To Do
5+ priority : low
6+ assignee : []
7+ created_date : ' 2026-02-18 11:32'
8+ labels :
9+ - sonarqube
10+ - java
11+ dependencies : []
12+ references : []
13+ documentation : []
14+ ordinal : 48000
15+ ---
16+
17+ # Fix ` java:S5853 ` : Join these multiple assertions subject to one assertion chain.
18+
19+ ## Description
20+
21+ SonarQube for IDE detected a code quality issue.
22+
23+ - ** Rule:** ` java:S5853 `
24+ - ** File:** ` src/test/java/com/devoxx/genie/service/agent/tool/BuiltInToolProviderTest.java `
25+ - ** Line:** 264
26+ - ** Severity:** Low impact on Maintainability
27+ - ** Issue:** Join these multiple assertions subject to one assertion chain.
28+
29+ ## Task
30+
31+ Fix the SonarQube issue ` java:S5853 ` at line 264 in ` src/test/java/com/devoxx/genie/service/agent/tool/BuiltInToolProviderTest.java ` .
32+
33+ ## Acceptance Criteria
34+
35+ - [ ] Issue ` java:S5853 ` at ` BuiltInToolProviderTest.java:264 ` is resolved
36+ - [ ] No new SonarQube issues introduced by the fix
37+ - [ ] All existing tests continue to pass
Original file line number Diff line number Diff line change 1+ ---
2+ id : TASK-49
3+ title : Fix java:S1874 in BuiltInToolProviderTest.java at line 48
4+ status : To Do
5+ priority : low
6+ assignee : []
7+ created_date : ' 2026-02-18 11:32'
8+ labels :
9+ - sonarqube
10+ - java
11+ dependencies : []
12+ references : []
13+ documentation : []
14+ ordinal : 49000
15+ ---
16+
17+ # Fix ` java:S1874 ` : Remove this use of "getBaseDir"; it is deprecated.
18+
19+ ## Description
20+
21+ SonarQube for IDE detected a code quality issue.
22+
23+ - ** Rule:** ` java:S1874 `
24+ - ** File:** ` src/test/java/com/devoxx/genie/service/agent/tool/BuiltInToolProviderTest.java `
25+ - ** Line:** 48
26+ - ** Severity:** Low impact on Maintainability
27+ - ** Issue:** Remove this use of "getBaseDir"; it is deprecated.
28+
29+ ## Task
30+
31+ Fix the SonarQube issue ` java:S1874 ` at line 48 in ` src/test/java/com/devoxx/genie/service/agent/tool/BuiltInToolProviderTest.java ` .
32+
33+ ## Acceptance Criteria
34+
35+ - [ ] Issue ` java:S1874 ` at ` BuiltInToolProviderTest.java:48 ` is resolved
36+ - [ ] No new SonarQube issues introduced by the fix
37+ - [ ] All existing tests continue to pass
You can’t perform that action at this time.
0 commit comments