Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
adapt
ace
Commits
2eed9410
Commit
2eed9410
authored
Mar 16, 2016
by
Michael Ritter
Browse files
Remove the collection from the running threads if a validator is not created
parent
eb49e0b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
ace-am/src/main/java/edu/umiacs/ace/monitor/audit/AuditTokens.java
View file @
2eed9410
...
...
@@ -63,7 +63,7 @@ public final class AuditTokens extends Thread implements CancelCallback {
new
ConcurrentHashMap
<>();
// private Map<TokenResponse, Token> tokenMap = new ConcurrentHashMap<TokenResponse, Token>();
private
Map
<
AceToken
,
MonitoredItem
>
itemMap
=
new
ConcurrentHashMap
<
AceToken
,
MonitoredItem
>();
new
ConcurrentHashMap
<>();
private
static
final
Logger
LOG
=
Logger
.
getLogger
(
AuditTokens
.
class
);
private
Collection
collection
;
private
boolean
cancel
=
false
;
...
...
@@ -186,7 +186,7 @@ public final class AuditTokens extends Thread implements CancelCallback {
}
catch
(
Throwable
e
)
{
LOG
.
fatal
(
"UNcaught exception in doWork()"
,
e
);
}
finally
{
itemMap
.
clear
();
// free memory in case this gets stuck h
i
anging around
itemMap
.
clear
();
// free memory in case this gets stuck hanging around
}
}
...
...
@@ -235,6 +235,7 @@ public final class AuditTokens extends Thread implements CancelCallback {
TokenValidator
validator
=
openIms
();
if
(
validator
==
null
)
{
runningThreads
.
remove
(
collection
);
return
;
}
em
=
PersistUtil
.
getEntityManager
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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