You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by mj...@apache.org on 2017/10/01 02:10:34 UTC

[22/28] incubator-guacamole-client git commit: GUACAMOLE-363: Change default driver case to throw an exception instead of default to SQL Server 2005 driver.

GUACAMOLE-363: Change default driver case to throw an exception instead of default to SQL Server 2005 driver.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/0459181e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/0459181e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/0459181e

Branch: refs/heads/master
Commit: 0459181e802dd12d868630569a2a508796181487
Parents: 7ecd391
Author: Nick Couchman <vn...@apache.org>
Authored: Wed Sep 27 09:05:56 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Thu Sep 28 07:00:52 2017 -0400

----------------------------------------------------------------------
 .../auth/sqlserver/SQLServerAuthenticationProviderModule.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/0459181e/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/java/org/apache/guacamole/auth/sqlserver/SQLServerAuthenticationProviderModule.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/java/org/apache/guacamole/auth/sqlserver/SQLServerAuthenticationProviderModule.java b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/java/org/apache/guacamole/auth/sqlserver/SQLServerAuthenticationProviderModule.java
index ee0584b..22cb474 100644
--- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/java/org/apache/guacamole/auth/sqlserver/SQLServerAuthenticationProviderModule.java
+++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/java/org/apache/guacamole/auth/sqlserver/SQLServerAuthenticationProviderModule.java
@@ -22,6 +22,7 @@ package org.apache.guacamole.auth.sqlserver;
 import com.google.inject.Binder;
 import com.google.inject.Module;
 import com.google.inject.name.Names;
+import java.lang.UnsupportedOperationException;
 import java.util.Properties;
 import org.apache.guacamole.GuacamoleException;
 import org.mybatis.guice.datasource.helper.JdbcHelper;
@@ -98,9 +99,13 @@ public class SQLServerAuthenticationProviderModule implements Module {
                 break;
 
             case MICROSOFT_2005:
-            default:
                 JdbcHelper.SQL_Server_2005_MS_Driver.configure(binder);
+                break;
 
+            default:
+                throw new UnsupportedOperationException(
+                    "A driver has been specified that is not supported by this module."
+                );
         }
         
         // Bind MyBatis properties