Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]
### Changed
- Logging improvement.
### Changed
- Normalized logging and error messages using Keyple coding standards.
- Migrated the CI pipeline from Jenkins to GitHub Actions.
### Upgraded
- `keyple-common-java-api` from `2.0.1` to `2.0.2` (source code not impacted)
- `keyple-plugin-java-api` from `2.3.1` to `2.3.2` (source code not impacted)
- `keyple-util-java-lib` from `2.4.0` to `2.4.1` (source code not impacted)
- `slf4j-api` from `1.7.32` to `1.7.36` (`compileOnly`)

## [2.2.1] - 2024-04-12
### Changed
Expand Down
10 changes: 6 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ plugins {
///////////////////////////////////////////////////////////////////////////////

dependencies {
implementation("org.eclipse.keyple:keyple-common-java-api:2.0.1")
implementation("org.eclipse.keyple:keyple-plugin-java-api:2.3.1")
implementation("org.eclipse.keyple:keyple-util-java-lib:2.4.0")
implementation("org.slf4j:slf4j-api:1.7.32")
implementation("org.eclipse.keyple:keyple-common-java-api:2.0.2")
implementation("org.eclipse.keyple:keyple-plugin-java-api:2.3.2")
implementation("org.eclipse.keyple:keyple-util-java-lib:2.4.1")
compileOnly("org.slf4j:slf4j-api:1.7.36")

testImplementation("org.slf4j:slf4j-simple:1.7.36")
testImplementation(platform("org.junit:junit-bom:5.10.2"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.junit.vintage:junit-vintage-engine")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public PoolReaderSpi allocateReader(String readerGroupReference) throws PluginIO
}

throw new PluginIOException(
"No reader is available in the groupReference : " + readerGroupReference);
"No reader is available for the given group reference: " + readerGroupReference);
}

/**
Expand All @@ -123,7 +123,7 @@ public void releaseReader(ReaderSpi readerSpi) {

if (!(readerSpi instanceof StubReader)) {
throw new IllegalArgumentException(
"Can not release reader, Reader should be of type StubReader");
"Cannot cast 'readerSpi' to StubReader. Actual type: " + readerSpi.getClass().getName());
}

allocatedReaders.remove(readerSpi.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ final class StubReaderAdapter
*/
@Override
public void onStartDetection() {
logger.info("Reader [{}]: card detection started", getName());
// NOP
}

/**
Expand All @@ -83,7 +83,7 @@ public void onStartDetection() {
*/
@Override
public void onStopDetection() {
logger.info("Reader [{}]: card detection stopped", getName());
// NOP
}

/**
Expand Down Expand Up @@ -202,7 +202,7 @@ public String getPowerOnData() {
@Override
public byte[] transmitApdu(byte[] apduIn) throws CardIOException {
if (smartCard == null) {
throw new CardIOException("No card available.");
throw new CardIOException("No card is available");
}
return smartCard.processApdu(apduIn);
}
Expand Down Expand Up @@ -240,18 +240,19 @@ public void insertCard(StubSmartCard smartCard) {
Assert.getInstance().notNull(smartCard, "smart card");
if (checkCardPresence()) {
logger.warn(
"Reader [{}]: first remove the inserted card before inserting a new one", getName());
"[readerExt={}] A card is already inserted. First remove the inserted card before inserting a new one",
getName());
return;
}
if (!activatedProtocols.contains(smartCard.getCardProtocol())) {
logger.info(
"Reader [{}]: inserted card protocol [{}] does not match any activated protocol, please use activateProtocol() method first",
"[readerExt={}] Inserted card protocol does not match any activated protocol. Please use 'activateProtocol()' method first [cardProtocol={}]",
getName(),
smartCard.getCardProtocol());
return;
}
if (logger.isTraceEnabled()) {
logger.trace("Reader [{}]: card inserted: {}", getName(), smartCard);
logger.trace("[readerExt={}] Card inserted [smartCard={}]", getName(), smartCard);
}
this.smartCard = smartCard;
}
Expand All @@ -265,7 +266,7 @@ public void insertCard(StubSmartCard smartCard) {
public void removeCard() {
if (smartCard != null) {
if (logger.isTraceEnabled()) {
logger.trace("Reader [{}]: card removed: {}", getName(), smartCard);
logger.trace("[readerExt={}] Card removed [smartCard={}]", getName(), smartCard);
}
closePhysicalChannel();
this.smartCard = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ byte[] processApdu(byte[] apduIn) throws CardIOException {
}

// throw a CardIOException if not found
throw new CardIOException("No response available for this request: " + hexApdu);
throw new CardIOException("No response is available for request: " + hexApdu);
}

/**
Expand Down
Loading