Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
a53cd3d1
Commit
a53cd3d1
authored
Sep 22, 2026
by
Luna Riegel
Browse files
Fix: Add guard against model NPE
parent
6f4954b9
Changes
1
Show whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/check/Checker.java
View file @
a53cd3d1
...
...
@@ -50,6 +50,7 @@ import java.util.stream.Collectors;
import
javax.annotation.Nullable
;
import
javax.swing.text.html.Option
;
import
de.hft.stuttgart.citydoctor2.database.UnconnectedCache
;
import
de.hft.stuttgart.citydoctor2.utils.Pair
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
...
...
@@ -487,10 +488,11 @@ public class Checker {
}
fillParameterMapsWithDefaultParameter
(
enabledCheck
,
parameterMap
);
ArrayList
<
Check
>
checkList
=
new
ArrayList
<>();
CityObjectCache
cache
=
model
!=
null
?
model
.
getCache
()
:
new
UnconnectedCache
();
for
(
CheckId
id
:
enabledCheck
)
{
Check
c
=
checkConfig
.
getCheckForId
(
id
);
//TODO: Change this to correct handling with streamchecker
c
.
init
(
parameterMap
,
parserConfig
,
model
.
getC
ache
()
);
c
.
init
(
parameterMap
,
parserConfig
,
c
ache
);
checkList
.
add
(
c
);
}
return
checkList
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment