Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Linnea Samila
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 8662ee4b
authored
May 09, 2014
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.. Nullpointer when marking bill paid if groupmembership is null for user
1 parent
b4d89987
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/PlaceBean.java
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/PlaceBean.java
View file @
8662ee4
...
...
@@ -372,12 +372,17 @@ public class PlaceBean implements PlaceBeanLocal {
private
static
boolean
isUserMember
(
EventUser
user
,
Product
prod
)
{
boolean
ret
=
false
;
for
(
GroupMembership
gm
:
user
.
getGroupMemberships
())
{
if
(
prod
.
equals
(
gm
.
getPlaceReservation
().
getProduct
()))
{
ret
=
true
;
break
;
if
(
user
.
getGroupMemberships
()
!=
null
)
{
for
(
GroupMembership
gm
:
user
.
getGroupMemberships
())
{
if
(
gm
.
getPlaceReservation
()
!=
null
&&
prod
.
equals
(
gm
.
getPlaceReservation
().
getProduct
()))
{
ret
=
true
;
break
;
}
}
}
return
ret
;
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment