private static void readPropertyContinuationLine()

in src/main/java/com/aliyun/credentials/utils/ProfileUtils.java [105:126]


    private static void readPropertyContinuationLine(ParserProgress progress, String line) {
        // Invalid profile, ignore its properties
        if (progress.ignoringCurrentProfile) {
            return;
        }
        if (progress.currentProfileBeingRead == null) {
            // throw new IllegalArgumentException(String.format("Expected a profile definition on line %s", progress.currentLineNumber));
            // To be consistent with ini4j's behavior
            progress.currentProfileBeingRead = "?";
            if (!progress.profiles.containsKey(progress.currentProfileBeingRead)) {
                progress.profiles.put(progress.currentProfileBeingRead, new LinkedHashMap<String, String>());
            }
        }

        // Comments are not removed on property continuation lines. They're considered part of the value.
        line = line.trim();
        Map<String, String> profileProperties = progress.profiles.get(progress.currentProfileBeingRead);

        String currentPropertyValue = profileProperties.get(progress.currentPropertyBeingRead);
        String newPropertyValue = currentPropertyValue + "\n" + line;
        profileProperties.put(progress.currentPropertyBeingRead, newPropertyValue);
    }