Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Mastercard/client-encryption-java
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.8.6
Choose a base ref
...
head repository: Mastercard/client-encryption-java
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 17 commits
  • 3 files changed
  • 3 contributors

Commits on Apr 10, 2025

  1. Bump net.minidev:json-smart from 2.5.0 to 2.5.2 (#112)

    Bumps [net.minidev:json-smart](https://github.com/netplex/json-smart-v2) from 2.5.0 to 2.5.2.
    - [Release notes](https://github.com/netplex/json-smart-v2/releases)
    - [Commits](netplex/json-smart-v2@2.5.0...2.5.2)
    
    ---
    updated-dependencies:
    - dependency-name: net.minidev:json-smart
      dependency-type: direct:development
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Apr 10, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    18ddbca View commit details
  2. Update FieldLevelEncryption.java (#113)

    Fix for sonar issue - major
    ShimonaR-MC authored Apr 10, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    20a5b88 View commit details

Commits on Jun 4, 2025

  1. Create maven-publish.yml

    cormacdalton authored Jun 4, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    f933b2f View commit details

Commits on Jun 5, 2025

  1. Update maven-publish.yml

    cormacdalton authored Jun 5, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    4d283bd View commit details
  2. Update maven-publish.yml

    cormacdalton authored Jun 5, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    9ec858a View commit details
  3. Update maven-publish.yml

    cormacdalton authored Jun 5, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    76ac50f View commit details

Commits on Jun 10, 2025

  1. Update maven-publish.yml

    cormacdalton authored Jun 10, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    0c6c829 View commit details
  2. Update maven-publish.yml

    cormacdalton authored Jun 10, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    a5650f3 View commit details
  3. Update pom.xml

    cormacdalton authored Jun 10, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    98675aa View commit details
  4. Update maven-publish.yml

    cormacdalton authored Jun 10, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    852fda6 View commit details
  5. Update maven-publish.yml

    cormacdalton authored Jun 10, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    431a95a View commit details
  6. Update maven-publish.yml

    cormacdalton authored Jun 10, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    19eb08e View commit details
  7. Update maven-publish.yml

    cormacdalton authored Jun 10, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    413a599 View commit details

Commits on Jun 11, 2025

  1. Update maven-publish.yml

    cormacdalton authored Jun 11, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    fdf6356 View commit details
  2. Update maven-publish.yml

    cormacdalton authored Jun 11, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    86a1554 View commit details
  3. Update maven-publish.yml

    cormacdalton authored Jun 11, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    7e02283 View commit details
  4. Merge pull request #114 from Mastercard/cormacdalton-publish

    Create maven-publish.yml
    cormacdalton authored Jun 11, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    2d52be8 View commit details
Showing with 47 additions and 9 deletions.
  1. +36 −0 .github/workflows/maven-publish.yml
  2. +10 −8 pom.xml
  3. +1 −1 src/main/java/com/mastercard/developer/encryption/FieldLevelEncryption.java
36 changes: 36 additions & 0 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Maven Publish

on:
release:
types: [published]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
server-id: central
server-username: MAVEN_CENTRAL_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
gpg-passphrase: GPG_PASSPHRASE

- name: Build and Test
run: mvn clean package -Dmaven.javadoc.skip=false

- name: Publish to Maven Central
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
run: mvn -X deploy -Dmaven.javadoc.skip=false
18 changes: 10 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -40,13 +40,6 @@
</license>
</licenses>

<distributionManagement>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<dependencies>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
@@ -126,7 +119,7 @@
<dependency>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
<version>2.5.0</version>
<version>2.5.2</version>
<scope>test</scope>
</dependency>

@@ -266,6 +259,15 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.7.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -193,7 +193,7 @@ private static DocumentContext decryptPayloadPath(DocumentContext payloadContext
JsonParser.checkOrCreateOutObject(payloadContext, jsonPathOut);
JsonParser.addDecryptedDataToPayload(payloadContext, decryptedValue, jsonPathOut);

if(jsonPathIn != jsonPathOut) {
if(!jsonPathIn.equals(jsonPathOut)) {
// Remove the input if now empty
Object inJsonElement = JsonParser.readJsonElement(payloadContext, jsonPathIn);
if (0 == jsonProvider.length(inJsonElement)) {