Revision 42506
Added by Sandro La Bruzzo almost 8 years ago
ISLookUpClient.java | ||
---|---|---|
86 | 86 |
} |
87 | 87 |
} |
88 | 88 |
|
89 |
private <T> T constructObjectByResult(final Class<T> clazz, final String separator, final String result) {
|
|
89 |
public <T> T constructObjectByResult(final Class<T> clazz, final String separator, final String result) {
|
|
90 | 90 |
try { |
91 | 91 |
if (result == null) |
92 | 92 |
throw new RuntimeException("the result of query is null"); |
... | ... | |
96 | 96 |
} |
97 | 97 |
List<Class> types = new ArrayList<>(); |
98 | 98 |
splittedValues.forEach(it -> types.add(String.class)); |
99 |
return clazz.getDeclaredConstructor(types.toArray(new Class[] {})).newInstance(splittedValues); |
|
99 |
|
|
100 |
return clazz.getDeclaredConstructor(types.toArray(new Class[] {})).newInstance(splittedValues.toArray(new String[] {})); |
|
100 | 101 |
} catch (Exception e) { |
101 | 102 |
throw new RuntimeException(e); |
102 | 103 |
} |
Also available in: Unified diff
added OAI Postfeed workflows