Preguntas etiquetadas con unsupportedoperation

7
Java List.add () UnsupportedOperationException
Intento agregar objetos a una List<String>instancia pero arroja un UnsupportedOperationException. ¿Alguien sabe por qué? Mi código Java String[] membersArray = request.getParameterValues('members'); List<String> membersList = Arrays.asList(membersArray); for (String member : membersList) { Person person = Dao.findByName(member); List<String> seeAlso; seeAlso = person.getSeeAlso(); if (!seeAlso.contains(groupDn)){ seeAlso.add(groupDn); person.setSeeAlso(seeAlso); } } El mensaje de error: …
Al usar nuestro sitio, usted reconoce que ha leído y comprende nuestra Política de Cookies y Política de Privacidad.
Licensed under cc by-sa 3.0 with attribution required.