Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
920fe039
Unverified
Commit
920fe039
authored
Mar 17, 2022
by
Gautier de Saint Martin Lacaze
Committed by
GitHub
Mar 17, 2022
Browse files
Merge pull request #824 from tschwery/fix-nullpointer-setting
Fix NullPointer on invalid settings
parents
ee4408af
e32ac382
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/models/Setting.java
View file @
920fe039
...
@@ -1199,9 +1199,14 @@ public enum Setting {
...
@@ -1199,9 +1199,14 @@ public enum Setting {
return
;
return
;
}
}
StringBuilder
shouldBe
=
new
StringBuilder
(
types
[
0
].
getSimpleName
());
StringBuilder
shouldBe
;
for
(
int
i
=
1
;
i
<
types
.
length
;
i
++)
{
if
(
type
!=
null
)
{
shouldBe
.
append
(
" | "
).
append
(
types
[
i
].
getSimpleName
());
shouldBe
=
new
StringBuilder
(
type
.
getSimpleName
());
}
else
{
shouldBe
=
new
StringBuilder
(
types
[
0
].
getSimpleName
());
for
(
int
i
=
1
;
i
<
types
.
length
;
i
++)
{
shouldBe
.
append
(
" | "
).
append
(
types
[
i
].
getSimpleName
());
}
}
}
String
errorMsg
=
String
.
format
(
"'%s' value is of incorrect type, is %s, should be %s"
,
String
errorMsg
=
String
.
format
(
"'%s' value is of incorrect type, is %s, should be %s"
,
...
...
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