Skip to content

Commit

Permalink
Merge pull request #608 from watson-developer-cloud/resolve-167
Browse files Browse the repository at this point in the history
add check for javax.naming.InitialContext
  • Loading branch information
germanattanasio authored Mar 8, 2017
2 parents fd752d5 + bba1bed commit 4cf2760
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ private CredentialUtils() {
* @return The encoded API Key
*/
private static String getKeyUsingJNDI(String serviceName) {
if (!isClassAvailable("javax.naming.Context")) {
if (!isClassAvailable("javax.naming.Context") || !isClassAvailable("javax.naming.InitialContext")) {
log.info("JNDI string lookups is not available.");
return null;
}
Expand Down

0 comments on commit 4cf2760

Please sign in to comment.