Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
AoU-Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AoU
AoU-Backend
Merge requests
!907
fix(DepositDocSerializer): avoid NullPointerException when checking if a collaborator exists
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
fix(DepositDocSerializer): avoid NullPointerException when checking if a collaborator exists
rodn-fix-isCollaboration-computing
into
master
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Nicolas.Rod
requested to merge
rodn-fix-isCollaboration-computing
into
master
7 months ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
d2f4eb1c
1 commit,
7 months ago
1 file
+
4
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
AoU-Model/src/main/java/ch/unige/aou/model/xml/deposit/v2_4/serializer/DepositDocSerializer.java
+
4
−
3
Options
@@ -9,12 +9,12 @@
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of the
* License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/gpl-2.0.html>.
@@ -79,7 +79,8 @@ public class DepositDocSerializer extends StdSerializer<DepositDoc> {
List
<
Serializable
>
contributorsOrCollaborations
=
null
;
if
(
value
.
getContributors
()
!=
null
)
{
contributorsOrCollaborations
=
value
.
getContributors
().
getContributorOrCollaboration
();
isCollaboration
=
contributorsOrCollaborations
.
stream
().
anyMatch
(
serializable
->
serializable
instanceof
Contributor
&&
((
Contributor
)
serializable
).
getRole
().
equals
(
COLLABORATOR
));
isCollaboration
=
contributorsOrCollaborations
.
stream
()
.
anyMatch
(
s
->
s
instanceof
Contributor
contributor
&&
COLLABORATOR
.
equals
(
contributor
.
getRole
()));
}
contributorsFormStep
.
put
(
"isCollaboration"
,
isCollaboration
);
contributorsFormStep
.
put
(
"academicStructures"
,
value
.
getAcademicStructures
());
Loading