Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ecsec Public
reqesidta-prototype
client-signer
Commits
69606e2a
Commit
69606e2a
authored
Oct 08, 2019
by
Tobias Wich
Browse files
Remove reflective access of java Map
parent
9a11aff6
Changes
1
Hide whitespace changes
Inline
Side-by-side
ifd/scio-backend/pcsc/src/main/java/org/openecard/scio/PCSCFactory.java
View file @
69606e2a
...
...
@@ -30,6 +30,7 @@ import java.lang.reflect.Method;
import
java.security.NoSuchAlgorithmException
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.ExecutionException
;
import
java.util.concurrent.Future
;
...
...
@@ -252,15 +253,13 @@ public class PCSCFactory implements org.openecard.common.ifd.scio.TerminalFactor
long
newId
=
((
Long
)
SCardEstablishContext
.
invoke
(
pcsc
,
SCARD_SCOPE_USER
.
getInt
(
pcsc
)));
contextId
.
setLong
(
pcscterminal
,
newId
);
// Then clear the terminals in cache
loadPCSC
();
// Then clear the terminals in cache
CardTerminals
terminals
=
terminalFactory
.
terminals
();
Field
fieldTerminals
=
pcscterminal
.
getDeclaredField
(
"terminals"
);
fieldTerminals
.
setAccessible
(
true
);
Class
classMap
=
Class
.
forName
(
"java.util.Map"
);
Method
clearMap
=
classMap
.
getDeclaredMethod
(
"clear"
);
clearMap
.
invoke
(
fieldTerminals
.
get
(
terminals
));
Map
termObj
=
(
Map
)
fieldTerminals
.
get
(
terminals
);
termObj
.
clear
();
}
}
...
...
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