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:27 UTC

[15/28] incubator-guacamole-client git commit: GUACMOLE-363: Correct null pointer exception in String comparison; fix style issues.

GUACMOLE-363: Correct null pointer exception in String comparison; fix style issues.


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/77552413
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/77552413
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/77552413

Branch: refs/heads/master
Commit: 7755241322c82f4131785af3e48235be9e890010
Parents: 7330190
Author: Nick Couchman <vn...@apache.org>
Authored: Thu Sep 7 22:31:37 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Thu Sep 28 07:00:52 2017 -0400

----------------------------------------------------------------------
 .../auth/sqlserver/SQLServerAuthenticationProviderModule.java    | 4 ++--
 .../apache/guacamole/auth/sqlserver/SQLServerEnvironment.java    | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/77552413/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 22c5434..f514e41 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
@@ -87,9 +87,9 @@ public class SQLServerAuthenticationProviderModule implements Module {
         // Look at the property to choose the correct driver.
         if (sqlServerDriver.equals(SQLServerEnvironment.SQLSERVER_DRIVER_JTDS))
             JdbcHelper.SQL_Server_jTDS.configure(binder);
-        else if(sqlServerDriver.equals(SQLServerEnvironment.SQLSERVER_DRIVER_DATADIRECT))
+        else if (sqlServerDriver.equals(SQLServerEnvironment.SQLSERVER_DRIVER_DATADIRECT))
             JdbcHelper.SQL_Server_DataDirect.configure(binder);
-        else if(sqlServerDriver.equals(SQLServerEnvironment.SQLSERVER_DRIVER_MS))
+        else if (sqlServerDriver.equals(SQLServerEnvironment.SQLSERVER_DRIVER_MS))
             JdbcHelper.SQL_Server_MS_Driver.configure(binder);
         else
             JdbcHelper.SQL_Server_2005_MS_Driver.configure(binder);

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/77552413/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/java/org/apache/guacamole/auth/sqlserver/SQLServerEnvironment.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/java/org/apache/guacamole/auth/sqlserver/SQLServerEnvironment.java b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/java/org/apache/guacamole/auth/sqlserver/SQLServerEnvironment.java
index 2110b0c..4d3faba 100644
--- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/java/org/apache/guacamole/auth/sqlserver/SQLServerEnvironment.java
+++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/java/org/apache/guacamole/auth/sqlserver/SQLServerEnvironment.java
@@ -195,7 +195,7 @@ public class SQLServerEnvironment extends JDBCEnvironment {
 
         // Check driver property is one of the acceptable values.
         String driver = getProperty(SQLServerGuacamoleProperties.SQLSERVER_DRIVER);
-        if (!(driver.equals(SQLSERVER_DRIVER_JTDS) ||
+        if (driver != null && !(driver.equals(SQLSERVER_DRIVER_JTDS) ||
                                 driver.equals(SQLSERVER_DRIVER_DATADIRECT) ||
                                 driver.equals(SQLSERVER_DRIVER_MS) ||
                                 driver.equals(SQLSERVER_DRIVER_MS_2005)))