Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ARSnova Backend
Manage
Activity
Members
Labels
Plan
Issues
27
Issue boards
Milestones
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
ARSnova
ARSnova Backend
Commits
8cf56297
There was an error fetching the commit references. Please try again later.
Commit
8cf56297
authored
12 years ago
by
Paul-Christian Volkmer
Browse files
Options
Downloads
Patches
Plain Diff
Fixed some issues found by FindBugs plugin
parent
2bf717b4
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/de/thm/arsnova/dao/CouchDBDao.java
+2
-2
2 additions, 2 deletions
src/main/java/de/thm/arsnova/dao/CouchDBDao.java
src/main/java/de/thm/arsnova/entities/User.java
+1
-0
1 addition, 0 deletions
src/main/java/de/thm/arsnova/entities/User.java
with
3 additions
and
2 deletions
src/main/java/de/thm/arsnova/dao/CouchDBDao.java
+
2
−
2
View file @
8cf56297
...
@@ -109,7 +109,7 @@ public class CouchDBDao implements IDatabaseDao {
...
@@ -109,7 +109,7 @@ public class CouchDBDao implements IDatabaseDao {
*/
*/
@Override
@Override
public
void
cleanFeedbackVotes
(
int
cleanupFeedbackDelay
)
{
public
void
cleanFeedbackVotes
(
int
cleanupFeedbackDelay
)
{
final
long
timelimitInMillis
=
60000
*
cleanupFeedbackDelay
;
final
long
timelimitInMillis
=
60000
*
(
long
)
cleanupFeedbackDelay
;
final
long
maxAllowedTimeInMillis
=
System
.
currentTimeMillis
()
-
timelimitInMillis
;
final
long
maxAllowedTimeInMillis
=
System
.
currentTimeMillis
()
-
timelimitInMillis
;
Map
<
String
,
Set
<
String
>>
affectedUsers
=
new
HashMap
<
String
,
Set
<
String
>>();
Map
<
String
,
Set
<
String
>>
affectedUsers
=
new
HashMap
<
String
,
Set
<
String
>>();
...
@@ -535,7 +535,7 @@ public class CouchDBDao implements IDatabaseDao {
...
@@ -535,7 +535,7 @@ public class CouchDBDao implements IDatabaseDao {
JSONObject
json
=
JSONObject
.
fromObject
(
loggedIn
);
JSONObject
json
=
JSONObject
.
fromObject
(
loggedIn
);
Document
doc
=
new
Document
(
json
);
Document
doc
=
new
Document
(
json
);
if
(
doc
.
getId
()
==
""
)
{
if
(
doc
.
getId
()
.
isEmpty
()
)
{
// If this is a new user without a logged_in document, we have to remove the following
// If this is a new user without a logged_in document, we have to remove the following
// pre-filled fields. Otherwise, CouchDB will take these empty fields as genuine
// pre-filled fields. Otherwise, CouchDB will take these empty fields as genuine
// identifiers, and will throw errors afterwards.
// identifiers, and will throw errors afterwards.
...
...
This diff is collapsed.
Click to expand it.
src/main/java/de/thm/arsnova/entities/User.java
+
1
−
0
View file @
8cf56297
...
@@ -56,6 +56,7 @@ public class User implements Serializable {
...
@@ -56,6 +56,7 @@ public class User implements Serializable {
@Override
@Override
public
boolean
equals
(
Object
obj
)
{
public
boolean
equals
(
Object
obj
)
{
if
(
obj
==
null
||
!
obj
.
getClass
().
equals
(
this
.
getClass
()))
return
false
;
User
other
=
(
User
)
obj
;
User
other
=
(
User
)
obj
;
return
this
.
username
.
equals
(
other
.
username
);
return
this
.
username
.
equals
(
other
.
username
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment