Skip to content

Conversation

agrasth
Copy link
Contributor

@agrasth agrasth commented Jun 11, 2025

  • All tests have passed. If this feature is not already covered by the tests, new tests have been added.

The issue was that when loading properties files with malformed Unicode escape sequences (like \uxxxx), the original code would fail with IllegalArgumentException: Malformed \uxxxx encoding.
The fix implements a fallback strategy:

  • First, try the normal properties loading
  • If that fails with IllegalArgumentException, try loading with explicit UTF-8 encoding
  • If that also fails, continue with empty properties rather than failing the entire build

@@ -111,6 +111,15 @@ private static Properties searchAdditionalPropertiesFile(Properties existingProp
} else {
try (InputStream inputStream = Files.newInputStream(propertiesFile.toPath())) {
props.load(inputStream);
} catch (IllegalArgumentException e) {
// Handle malformed Unicode escape sequences
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All comments looks redundant, consider removing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok will remove.

@agrasth agrasth force-pushed the fix/jenkins-malformed-encoding branch from 80ed335 to 640b4d6 Compare July 1, 2025 05:46
@agrasth agrasth merged commit 42e9ca2 into jfrog:master Jul 1, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants