1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-09 10:19:41 +02:00

Merge branch '4.4'

This also fixes a errornous merge where the same branch with different
commit was merged into master and 4.4

The conflicting commits are

4.4:
8f760eaeb3  getRawValueCharSequences
e626580f68

master:
b47225c2c1  getRawValues
097d245358
This commit is contained in:
Florian Schmaus 2021-08-23 17:55:32 +02:00
commit 001985647a
13 changed files with 119 additions and 84 deletions

View file

@ -1,6 +1,6 @@
/**
*
* Copyright 2003-2007 Jive Software, 2016-2020 Florian Schmaus.
* Copyright 2003-2007 Jive Software, 2016-2021 Florian Schmaus.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -20,6 +20,7 @@ package org.jivesoftware.smack.util;
import java.io.IOException;
import java.nio.CharBuffer;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
@ -605,4 +606,13 @@ public class StringUtils {
String[] lines = input.split(PORTABLE_NEWLINE_REGEX);
return Arrays.asList(lines);
}
public static List<String> toStrings(Collection<? extends CharSequence> charSequences) {
List<String> res = new ArrayList<>(charSequences.size());
for (CharSequence cs : charSequences) {
String string = cs.toString();
res.add(string);
}
return res;
}
}