/** * JavaPropertyManager stored data as strings at the moment, so need to convert to the correct * type here * * @param taPath the path of the property to get * @param toDefault the default value of the property * @param <K> the type of the value * @return the value or null if there was no value of this type */ @SuppressWarnings("unchecked") @Override protected <K> K onGetProperty(String[] taPath, K toDefault) { K loReturn = onGetProperty(taPath); if (loReturn == null) { setProperty(taPath, toDefault); loReturn = toDefault; } else { loReturn = (K) Java.stringToPrimitive((String) loReturn, toDefault.getClass()); } return loReturn; }