Skip to content

Commit 0a778d3

Browse files
committed
fix: minor fixes
1 parent 82405d2 commit 0a778d3

File tree

3 files changed

+51
-2
lines changed

3 files changed

+51
-2
lines changed

qodana.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#-------------------------------------------------------------------------------#
2+
# Qodana analysis is configured by qodana.yaml file #
3+
# https://www.jetbrains.com/help/qodana/qodana-yaml.html #
4+
#-------------------------------------------------------------------------------#
5+
6+
#################################################################################
7+
# WARNING: Do not store sensitive information in this file, #
8+
# as its contents will be included in the Qodana report. #
9+
#################################################################################
10+
version: "1.0"
11+
12+
#Specify inspection profile for code analysis
13+
profile:
14+
name: qodana.starter
15+
16+
#Enable inspections
17+
#include:
18+
# - name: <SomeEnabledInspectionId>
19+
20+
#Disable inspections
21+
#exclude:
22+
# - name: <SomeDisabledInspectionId>
23+
# paths:
24+
# - <path/where/not/run/inspection>
25+
26+
projectJDK: "17" #(Applied in CI/CD pipeline)
27+
28+
#Execute shell command before Qodana execution (Applied in CI/CD pipeline)
29+
#bootstrap: sh ./prepare-qodana.sh
30+
31+
#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline)
32+
#plugins:
33+
# - id: <plugin.id> #(plugin id can be found at https://plugins.jetbrains.com)
34+
35+
# Quality gate. Will fail the CI/CD pipeline if any condition is not met
36+
# severityThresholds - configures maximum thresholds for different problem severities
37+
# testCoverageThresholds - configures minimum code coverage on a whole project and newly added code
38+
# Code Coverage is available in Ultimate and Ultimate Plus plans
39+
#failureConditions:
40+
# severityThresholds:
41+
# any: 15
42+
# critical: 5
43+
# testCoverageThresholds:
44+
# fresh: 70
45+
# total: 50
46+
47+
#Specify Qodana linter for analysis (Applied in CI/CD pipeline)
48+
linter: jetbrains/qodana-jvm-community:2025.2

src/main/java/com/rajat_singh/leetcode_api/service/LeetCodeService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public Optional<UserCalendarDTO> getUserLeetCodeCalendar(String username,int yea
136136
UserLeetCodeCalendarResponse.UserCalendar rawCalendar = response.getData()
137137
.getMatchedUser()
138138
.getUserCalendar();
139-
Map<String, Integer> submissionMap = null;
139+
Map<String, Integer> submissionMap;
140140
String calendarJsonString = rawCalendar.getSubmissionCalendar();
141141

142142
try {

src/main/java/com/rajat_singh/leetcode_api/service/QuestionSpecificationService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public Specification<QuestionEntity> build(QuestionSearchRequest.FilterCriteria
5656
return spec;
5757
}
5858

59-
Specification<QuestionEntity> combinedFilters = null;
59+
Specification<QuestionEntity> combinedFilters;
6060
if ("ALL".equalsIgnoreCase(filters.getFilterCombineType())) {
6161
combinedFilters = allSpecs.get(0);
6262
for (int i = 1; i < allSpecs.size(); i++) {
@@ -109,6 +109,7 @@ private Specification<QuestionEntity> withFrontendId(QuestionSearchRequest.Range
109109
private Specification<QuestionEntity> withTopics(QuestionSearchRequest.TopicFilter filter) {
110110
return (root, query, builder) -> {
111111

112+
assert query != null;
112113
query.distinct(true);
113114

114115
if (filter.getOperator() == FilterOperator.IS_NOT) {

0 commit comments

Comments
 (0)