File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
build-info-extractor/src/main/java/org/jfrog/build/extractor Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,13 @@ private static Properties searchAdditionalPropertiesFile(Properties existingProp
111111 } else {
112112 try (InputStream inputStream = Files .newInputStream (propertiesFile .toPath ())) {
113113 props .load (inputStream );
114+ } catch (IllegalArgumentException e ) {
115+ log .warn ("[buildinfo] Properties file contains malformed Unicode encoding. Attempting to load with UTF-8 encoding: " + e .getMessage ());
116+ try (BufferedReader reader = Files .newBufferedReader (propertiesFile .toPath (), StandardCharsets .UTF_8 )) {
117+ props .load (reader );
118+ } catch (Exception fallbackException ) {
119+ log .error ("[buildinfo] Failed to load properties file even with UTF-8 fallback: " + fallbackException .getMessage ());
120+ }
114121 }
115122 }
116123 } catch (IOException | InvalidAlgorithmParameterException | IllegalBlockSizeException | NoSuchPaddingException |
You can’t perform that action at this time.
0 commit comments