0

I have a Java service that relies on a dependency jar that I have modified. Within the dependency I have updated 2 different sections of code for unrelated functionality. I have updated the version of the jar and am including its use within the service via Maven.

Within the service, when I run the code locally via IntelliJ that calls the dependency functionality I get:

  1. The expected, new behavior for one of the code changes.
  2. Unexpected, previous behavior for the other code change. In this case, I have modified the value of a string that is being set when the code is invoked but the result is how the string was set in the old code.
  • The previous version:
Collections.sort(errorRecords);
fe.setErrorMessage("Failed records - " + errorRecords);

where errorRecords is a List<Integer>

  • The new version:
fe.setErrorMessage("Failed record(s) - please see documentation for remediation steps.");

For troubleshooting I have done the following:

  • Deleted all previous versions of the jar from the Maven m2 repo
  • Performed mvn clean install on my service
  • Verified that after the mvn call that the only version of the jar in the repo is the new one
  • Invalidated IntelliJ cache - I am using version 2025.2.5 Ultimate
  • Opened the packaged, new jar from the m2 repository to view the .class file, and confirmed my new code is present.
  • Validated that the version of the jar being used by IntelliJ (in the External Libraries section) is the new version
  • Attempted to view the code within IntelliJ. Unfortunately the method where my new code is cannot be decompiled by the Fern Flower decompiler in IntelliJ, so I cannot confirm the new code is present via stepping through the code via debugger. All I see there is // $FF: Couldn't be decompiled message. This is present when using older versions of the jar as well.
  • Rebooted as a last resort. This is running on macOS 15.7.2. As expected, that didn't fix anything.

I've run out of ideas of where to look next. Any thoughts?

3
  • 2
    If you modify an artifact I would always change the version e.g. by appending -mod or something like that. That way you can uniquely identify it by just looking at the jar name that is used. Just use the modified jar file and install it with the modified version into your local m2 repo: stackoverflow.com/a/4955695/150978 Commented 2 days ago
  • I agree with @Robert's comment. I am not an expert, but it might also be helpful to attempt to decompile the JAR with other tools to inspect the code. In modifying and rebuilding the dependency, are you doing anything that would interfere with FernFlower's ability to decompile it? Commented 2 days ago
  • start with -verbose and see where the class is really loaded from Commented yesterday

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.