commit | aec93f7a97ef11eb4eeb8ca61160f263bff20014 | [log] [tgz] |
---|---|---|
author | margaretha <margaretha@ids-mannheim.de> | Mon May 29 16:51:41 2017 +0200 |
committer | margaretha <margaretha@ids-mannheim.de> | Mon May 29 16:51:41 2017 +0200 |
tree | cfb9ae254bd8736b7d6c37485b2815f69cc09f39 | |
parent | 7c2b4ddb5ddcd428952421bb333b2f9a90930921 [diff] |
Fixed getMatch. Change-Id: Ic1f097b1975622896e5ed5c85157805cd777aed4
diff --git a/src/main/java/de/ids_mannheim/korap/web/SearchKrill.java b/src/main/java/de/ids_mannheim/korap/web/SearchKrill.java index 3953323..53786b6 100644 --- a/src/main/java/de/ids_mannheim/korap/web/SearchKrill.java +++ b/src/main/java/de/ids_mannheim/korap/web/SearchKrill.java
@@ -121,6 +121,7 @@ if (availability != null){ Matcher m = licensePattern.matcher(availability); if (!m.matches()){ + km = new Match(); km.addError(StatusCodes.ACCESS_DENIED, "Retrieving match info with ID "+id+" is not allowed."); }
diff --git a/src/test/java/de/ids_mannheim/korap/web/service/full/MatchInfoServiceTest.java b/src/test/java/de/ids_mannheim/korap/web/service/full/MatchInfoServiceTest.java index 4b58d10..0153e44 100644 --- a/src/test/java/de/ids_mannheim/korap/web/service/full/MatchInfoServiceTest.java +++ b/src/test/java/de/ids_mannheim/korap/web/service/full/MatchInfoServiceTest.java
@@ -71,6 +71,7 @@ assertEquals("Retrieving match info with ID " + "match-GOE/AGI/04846-p36875-36876 is not allowed.", node.at("/errors/0/1").asText()); + assertTrue(node.at("/snippet").isMissingNode()); } @Test