eclipse-keyple / keyple-service-java-lib

Eclipse Keyple™ Project - Java implementation: main service API for end users
https://keyple.org/
Eclipse Public License 2.0
6 stars 4 forks source link

DistributedLocalServiceAdapter findReader(with regex ) in distributed mode cannot find pcsc reader #74

Open angelsephirot opened 5 days ago

angelsephirot commented 5 days ago

In this mode , the name of the reader cannot be managed and iti si often somtehing that cannot be used in regex. example: HID Global OMNIKEY 3x21 Smart Card Reader [OMNIKEY 3x21 Smart Card Reader] 00 00

private final class LocalReaderExecutor {

private final AbstractReaderAdapter reader;
private final JsonObject input;
private final JsonObject output;
private final int inputCoreApiLevel;

/**
 * Constructor.
 *
 * @param jsonData The JSON service input data.
 * @param readerName The name of the target reader.
 */
private LocalReaderExecutor(String jsonData, String readerName) {

  reader = (AbstractReaderAdapter) SmartCardServiceProvider.getService().findReader(readerName);
  if (reader == null) {
    throw new IllegalStateException(String.format(READER_NOT_FOUND_TEMPLATE, readerName));
andrei-cristea commented 5 days ago

Hi, thanks for your analysis, we'll fixed this issue quickly. Regards