- AltosHashSet[] sets = AltosHashSet.array(backend.getString(frequenciesPreference,null));
- if (sets != null) {
- frequencies = new AltosFrequency[sets.length];
- for (int i = 0; i < frequencies.length; i++)
- frequencies[i] = new AltosFrequency(sets[i]);
- }
-
- } catch (IOException ie) {
- frequencies = null;
+ AltosJson json = AltosJson.fromString(backend.getString(frequenciesPreference,
+ null));
+ frequencies = (AltosFrequency[]) json.make(frequencies.getClass());
+ } catch (Exception e) {