You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2019/05/15 13:39:55 UTC

[GitHub] [drill] arina-ielchiieva commented on a change in pull request #1788: DRILL-7204: Add proper validation when creating plugin

arina-ielchiieva commented on a change in pull request #1788: DRILL-7204: Add proper validation when creating plugin
URL: https://github.com/apache/drill/pull/1788#discussion_r284259821
 
 

 ##########
 File path: exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/StorageResources.java
 ##########
 @@ -204,6 +204,13 @@ public JsonResult createOrUpdatePluginJSON(PluginConfigWrapper plugin) {
   @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
   @Produces(MediaType.APPLICATION_JSON)
   public JsonResult createOrUpdatePlugin(@FormParam("name") String name, @FormParam("config") String storagePluginConfig) {
+    name = name.trim();
+    if (name.isEmpty()) {
+      return message("Error (a storage name cannot be empty)");
 
 Review comment:
   Could you please replace alerts with more user friendly message window?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services