Skip to content

Commit fbbc7aa

Browse files
Merge pull request #386 from ashitsalesforce/master
fix for issue #385
2 parents 5c591a4 + 8ee2a42 commit fbbc7aa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/com/salesforce/dataloader/process/ProcessRunner.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,11 @@ private static void validateConfigProperties(Config config) throws ProcessInitia
346346

347347
for (String propName : PROP_NAME_ARRAY) {
348348
String propVal = config.getString(propName);
349-
if (propVal == null || propVal.isEmpty()) {
349+
if (propName.equals(Config.PASSWORD) && (propVal == null || propVal.isBlank())) {
350+
// OAuth access token must be specified if password is not specified
351+
propVal = config.getString(Config.OAUTH_ACCESSTOKEN);
352+
}
353+
if (propVal == null || propVal.isBlank()) {
350354
logger.fatal(Messages.getFormattedString("Config.errorNoRequiredParameter", propName));
351355
throw new ParameterLoadException(Messages.getFormattedString("Config.errorNoRequiredParameter", propName));
352356
}

0 commit comments

Comments
 (0)