Source:
<code>private void setPropertyIfMetadataPresent( Node node, String propertyName, Object value ) throws RepositoryException { if (value != null) { if (value instanceof String && !StringUtil.isBlank((String) value)) { node.setProperty(propertyName, (String) value); } else if (value instanceof Boolean) { node.setProperty(propertyName, (Boolean) value); } else if (value instanceof Long) { node.setProperty(propertyName, (Long) value); } else if (value instanceof Integer) { node.setProperty(propertyName, new Long((Integer) value)); } else if (value instanceof Calendar) { Calendar calendarValue = (Calendar) value; if (calendarValue.getTimeZone().getID().toLowerCase().equals("unknown")) { calendarValue.setTimeZone(TimeZone.getDefault()); } node.setProperty(propertyName, calendarValue); } else if (value instanceof byte[]) { InputStream is = new ByteArrayInputStream((byte []) value); Binary binaryProperty = node.getSession().getValueFactory().createBinary(is); node.setProperty(propertyName, binaryProperty); <START> } else if (value instanceof List) { <END> ValueFactory vf = node.getSession().getValueFactory(); List<Value> values = new ArrayList<Value>(); for (Object val : (List) value) { if (val instanceof String) { values.add(vf.createValue((String) val)); } } if (values.size() > 0) { Value[] valuesArray = new Value[values.size()]; values.toArray(valuesArray); node.setProperty(propertyName, valuesArray); } } else { throw new IllegalArgumentException(String.format("The value of the property %s has unknown type and couldn't be saved.", propertyName)); } } }</code><technical_language>if this unchecked types, @SupressWarnings("unchecked") in this method ? change List<?></technical_language>

Target:
private void setPropertyIfMetadataPresent( Node node, String propertyName, Object value ) throws RepositoryException { if (value != null) { if (value instanceof String && !StringUtil.isBlank((String) value)) { node.setProperty(propertyName, (String) value); } else if (value instanceof Boolean) { node.setProperty(propertyName, (Boolean) value); } else if (value instanceof Long) { node.setProperty(propertyName, (Long) value); } else if (value instanceof Integer) { node.setProperty(propertyName, new Long((Integer) value)); } else if (value instanceof Calendar) { Calendar calendarValue = (Calendar) value; if (calendarValue.getTimeZone().getID().toLowerCase().equals("unknown")) { calendarValue.setTimeZone(TimeZone.getDefault()); } node.setProperty(propertyName, calendarValue); } else if (value instanceof byte[]) { InputStream is = new ByteArrayInputStream((byte []) value); Binary binaryProperty = node.getSession().getValueFactory().createBinary(is); node.setProperty(propertyName, binaryProperty); } else if (value instanceof List<?>) { ValueFactory vf = node.getSession().getValueFactory(); List<Value> values = new ArrayList<Value>(); for (Object val : (List<?>) value) { if (val instanceof String) { values.add(vf.createValue((String) val)); } } if (values.size() > 0) { Value[] valuesArray = new Value[values.size()]; values.toArray(valuesArray); node.setProperty(propertyName, valuesArray); } } else { throw new IllegalArgumentException(String.format("The value of the property %s has unknown type and couldn't be saved.", propertyName)); } } }