Skip to content

Commit

Permalink
Updated the logic
Browse files Browse the repository at this point in the history
  • Loading branch information
muskan124947 committed Feb 2, 2025
1 parent 65b5b19 commit bab60c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private static AppConfigurationEntry[] generateDefaultConfiguration() throws SQL
new AppConfigurationEntry("com.sun.security.auth.module.Krb5LoginModule",
AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, confDetails)};
} catch (ClassNotFoundException e) {
return loadIbmModule();
throw new SQLServerException(SQLServerException.getErrString("R_moduleNotFound"), null);

Check warning on line 34 in src/main/java/com/microsoft/sqlserver/jdbc/JaasConfiguration.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/com/microsoft/sqlserver/jdbc/JaasConfiguration.java#L33-L34

Added lines #L33 - L34 were not covered by tests
}
}

Expand All @@ -48,7 +48,7 @@ private static AppConfigurationEntry[] loadIbmModule() throws SQLServerException
new AppConfigurationEntry(ibmLoginModule, AppConfigurationEntry.LoginModuleControlFlag.SUFFICIENT,
confDetailsWithPassword)};
} catch (ClassNotFoundException ex) {
throw new SQLServerException(SQLServerException.getErrString("R_moduleNotFound"), null);
throw new SQLServerException(SQLServerException.getErrString("R_ibmModuleNotFound"), null);

Check warning on line 51 in src/main/java/com/microsoft/sqlserver/jdbc/JaasConfiguration.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/com/microsoft/sqlserver/jdbc/JaasConfiguration.java#L50-L51

Added lines #L50 - L51 were not covered by tests
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,7 @@ protected Object[][] getContents() {
{"R_InvalidRuleFormat", "Wrong number of parameters supplied to rule. Number of parameters: {0}, expected: 2 or 3."},
{"R_InvalidRetryInterval", "Current retry interval: {0}, is longer than queryTimeout: {1}."},
{"R_UnableToFindClass", "Unable to locate specified class: {0}"},
{"R_ibmModuleNotFound", "com.ibm.security.auth.module.Krb5LoginModule module was not found."},
{"R_moduleNotFound", "Neither com.sun.security.auth.module.Krb5LoginModule nor com.ibm.security.auth.module.Krb5LoginModule was found."},
};
}
Expand Down

0 comments on commit bab60c7

Please sign in to comment.