Skip to content

Commit 32b4a10

Browse files
committed
Changed method name + wrapped exception
Signed-off-by: Bart Hanssens <bart.hanssens@fedict.be>
1 parent d844d70 commit 32b4a10

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

core/model/src/main/java/org/eclipse/rdf4j/model/util/Vocabularies.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class Vocabularies {
2525
* @param vocabulary RDF vocabulary
2626
* @return set of IRIs
2727
*/
28-
public static Set<IRI> getAllIRIs(Class vocabulary) {
28+
public static Set<IRI> getIRIs(Class vocabulary) {
2929
Set<IRI> iris = new LinkedHashSet<>();
3030

3131
for (Field f : vocabulary.getFields()) {
@@ -34,9 +34,10 @@ public static Set<IRI> getAllIRIs(Class vocabulary) {
3434
iris.add((IRI) f.get(vocabulary));
3535
} catch (IllegalAccessException ex) {
3636
// should not happen
37+
throw new RuntimeException("Cannot access vocabulary field", ex);
3738
}
3839
}
3940
}
4041
return iris;
4142
}
42-
}
43+
}

core/model/src/test/java/org/eclipse/rdf4j/model/util/VocabulariesTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public void testVocabAllIRI() throws Exception {
2929
DC.FORMAT, DC.IDENTIFIER, DC.LANGUAGE, DC.PUBLISHER, DC.RELATION,
3030
DC.RIGHTS, DC.SOURCE, DC.SUBJECT, DC.TITLE, DC.TYPE));
3131

32-
Set<IRI> allIRIs = Vocabularies.getAllIRIs(DC.class);
32+
Set<IRI> allIRIs = Vocabularies.getIRIs(DC.class);
3333

3434
assertEquals(dcIRIs, allIRIs);
3535
}

0 commit comments

Comments
 (0)