refactor: Make sure we only write W3C payload into create session command by mykola-mokhnach · Pull Request #1537 · appium/java-client
Comment on lines +44 to +49
| return possiblyInvalidCapabilities.asMap().entrySet().stream() | ||
| .map((entry) -> ACCEPTED_W3C_PATTERNS.test(entry.getKey()) | ||
| ? entry | ||
| : new AbstractMap.SimpleEntry<>( | ||
| String.format("%s%s", APPIUM_PREFIX, entry.getKey()), entry.getValue())) | ||
| .collect(ImmutableMap.toImmutableMap(Map.Entry::getKey, Map.Entry::getValue)); |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| return possiblyInvalidCapabilities.asMap().entrySet().stream() | |
| .map((entry) -> ACCEPTED_W3C_PATTERNS.test(entry.getKey()) | |
| ? entry | |
| : new AbstractMap.SimpleEntry<>( | |
| String.format("%s%s", APPIUM_PREFIX, entry.getKey()), entry.getValue())) | |
| .collect(ImmutableMap.toImmutableMap(Map.Entry::getKey, Map.Entry::getValue)); | |
| return possiblyInvalidCapabilities.asMap().entrySet().stream() | |
| .collect(ImmutableMap.toImmutableMap( | |
| entry -> ACCEPTED_W3C_PATTERNS.test(entry.getKey()) ? entry.getKey() : APPIUM_PREFIX + entry.getKey(), | |
| Map.Entry::getValue | |
| )); |
?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems I'm too late
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
np, I could add it in the next PR