5050import java .io .InputStreamReader ;
5151import java .io .PushbackReader ;
5252import java .math .BigInteger ;
53- import java .nio .charset .CharacterCodingException ;
5453import java .nio .charset .CharsetDecoder ;
5554import java .nio .charset .CodingErrorAction ;
5655import java .nio .file .Files ;
@@ -567,8 +566,8 @@ private Map<String, String> readEnvironmentPropertiesUtf8(final Path envPropsFil
567566 }
568567
569568 propertiesToMap (utf8Items ).load (pushbackReader );
569+ return utf8Items ;
570570 }
571- return utf8Items ;
572571 }
573572
574573 private Map <String , String > processEnvironmentProperties (final Path directory ) {
@@ -578,15 +577,6 @@ private Map<String, String> processEnvironmentProperties(final Path directory) {
578577 }
579578 try {
580579 return readEnvironmentPropertiesUtf8 (envPropsFile );
581- } catch (CharacterCodingException e ) {
582- LOGGER .error ("Failed to read {} as UTF-8, falling back to ISO-8859-1" , envPropsFile , e );
583- final Map <String , String > items = new LinkedHashMap <>();
584- try (InputStream inputStream = Files .newInputStream (envPropsFile )) {
585- propertiesToMap (items ).load (inputStream );
586- } catch (IOException ex ) {
587- LOGGER .error ("Could not read environment.properties file {}" , envPropsFile , ex );
588- }
589- return items ;
590580 } catch (IOException e ) {
591581 LOGGER .error ("Could not read environment.properties file {}" , envPropsFile , e );
592582 return new LinkedHashMap <>();
0 commit comments