You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by lf...@apache.org on 2020/07/24 09:07:24 UTC

[incubator-dlab] branch DLAB-298 created (now 4fc9596)

This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a change to branch DLAB-298
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.


      at 4fc9596  [DLAB-298]: changed error message for java

This branch includes the following new commits:

     new 4fc9596  [DLAB-298]: changed error message for java

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org


[incubator-dlab] 01/01: [DLAB-298]: changed error message for java

Posted by lf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DLAB-298
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit 4fc9596dfef4be691594f491cb5d7d53376b7c6a
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Fri Jul 24 12:06:58 2020 +0300

    [DLAB-298]: changed error message for java
---
 .../epam/dlab/backendapi/service/impl/MavenCentralLibraryService.java | 2 +-
 .../com/epam/dlab/backendapi/validation/annotation/LibNameValid.java  | 3 +--
 .../epam/dlab/backendapi/resources/LibExploratoryResourceTest.java    | 4 ++--
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/MavenCentralLibraryService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/MavenCentralLibraryService.java
index b7cbce8..f95eb47 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/MavenCentralLibraryService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/MavenCentralLibraryService.java
@@ -41,7 +41,7 @@ public class MavenCentralLibraryService implements ExternalLibraryService {
 
 	private static final String QUOTE_ENCODED = "%22";
 	private static final String SEARCH_API_QUERY_FORMAT = "/solrsearch/select?q=%s&rows=20&wt=json&core=gav&p=jar";
-	private static final String LIB_NOT_FOUND_MSG = "Artifact with id=%s, groupId=%s and version %s not found";
+	private static final String LIB_NOT_FOUND_MSG = "No matches found";
 	private final RESTService restClient;
 
 	@Inject
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/validation/annotation/LibNameValid.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/validation/annotation/LibNameValid.java
index 1e8be9b..fb10ed2 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/validation/annotation/LibNameValid.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/validation/annotation/LibNameValid.java
@@ -34,8 +34,7 @@ import java.lang.annotation.Target;
 public @interface LibNameValid {
 
 
-	String message() default "Wrong library name format. Should be <groupId>:<artifactId>:<versionId>. E.g. io" +
-			".dropwizard:dropwizard-core:1.3.5";
+	String message() default "Wrong library name format. Should be <groupId>:<artifactId>:<versionId>";
 
 	Class<?>[] groups() default {};
 
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/LibExploratoryResourceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/LibExploratoryResourceTest.java
index e0c7ed4..321693d 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/LibExploratoryResourceTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/LibExploratoryResourceTest.java
@@ -441,8 +441,8 @@ public class LibExploratoryResourceTest extends TestBase {
 		assertEquals(HttpStatus.SC_BAD_REQUEST, response.getStatus());
 		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
 
-		assertEquals("{\"errors\":[\"query param artifact Wrong library name format. Should be " +
-						"<groupId>:<artifactId>:<versionId>. E.g. io.dropwizard:dropwizard-core:1.3.5\"]}",
+		assertEquals("{\"errors\":[\"Wrong library name format. Should be " +
+						"<groupId>:<artifactId>:<versionId>\"]}",
 				response.readEntity(String.class));
 
 		verifyZeroInteractions(externalLibraryService);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org