I have a thread with some parser of an array. I have an array of String splitted by white-spaces from other String, cleared empty fields and now I am trying to clear all colons and equals from it. So I have created method that uses for-each with 'String s' in that array. Than I have another for-each with 'char c' in that String converted to char array. And here's that exception. Here's the code:
    public String[] clearColons(String[] in) {
            List<String> output = new ArrayList<>();
            for (String s : in) {
                    StringBuilder out = new StringBuilder();
                    for (char c : s.toCharArray()) {
                        if (c != ':' && c != '=') {
                                out.append(c);
                        }
                    }
                    output.add(out.toString());
            }
            return output.toArray(in);
        }
Please help!
