mike-jumper commented on a change in pull request #349: GUACAMOLE-678: 
Implement new UriGuacamoleProperty
URL: https://github.com/apache/guacamole-client/pull/349#discussion_r268448919
 
 

 ##########
 File path: 
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/java/org/apache/guacamole/auth/mysql/MySQLAuthenticationProviderModule.java
 ##########
 @@ -58,11 +59,20 @@ public MySQLAuthenticationProviderModule(MySQLEnvironment 
environment)
 
         // Set the MySQL-specific properties for MyBatis.
         myBatisProperties.setProperty("mybatis.environment.id", "guacamole");
-        myBatisProperties.setProperty("JDBC.host", 
environment.getMySQLHostname());
-        myBatisProperties.setProperty("JDBC.port", 
String.valueOf(environment.getMySQLPort()));
-        myBatisProperties.setProperty("JDBC.schema", 
environment.getMySQLDatabase());
-        myBatisProperties.setProperty("JDBC.username", 
environment.getMySQLUsername());
-        myBatisProperties.setProperty("JDBC.password", 
environment.getMySQLPassword());
+        
+        // Check for URI
+        URI mySQLUri = environment.getMySQLUri();
 
 Review comment:
   This is likely a good change to have, allowing users to override the entire 
JDBC URL, but it seems out of scope for the nature of this particular change. 
The [GUACAMOLE-678](https://issues.apache.org/jira/browse/GUACAMOLE-678) issue 
is pretty specifically about defining a new property type:
   
   > Implement a new property type, UriGuacamoleProperty, that takes a string 
and generates a URI object, validating the URI in the process. With the 
increased number of extensions that take URIs as configuration parameters this 
will allow for more central validation of the URI before it gets used by the 
module.
   
   I agree that it makes sense to refactor existing code to migrate to that 
type wherever appropriate, but this particular change adds a new feature that 
deserves its own issue.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to