Skip to content

Commit

Permalink
fix(engine): Fix class imports for HTTPException in DeletePidCommand I…
Browse files Browse the repository at this point in the history
  • Loading branch information
poikilotherm committed Mar 15, 2021
1 parent e678845 commit d51ecc4
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
import edu.harvard.iq.dataverse.engine.command.exception.PermissionException;
import edu.harvard.iq.dataverse.settings.SettingsServiceBean;
import edu.harvard.iq.dataverse.util.BundleUtil;
import org.apache.commons.httpclient.HttpException;

import java.util.Arrays;
import java.util.Collections;
import java.util.logging.Logger;

import javax.xml.ws.http.HTTPException;

/**
* No required permissions because we check for superuser status.
*/
Expand Down Expand Up @@ -51,8 +51,8 @@ protected void executeImpl(CommandContext ctxt) throws CommandException {
dataset.setGlobalIdCreateTime(null);
dataset.setIdentifierRegistered(false);
ctxt.datasets().merge(dataset);
} catch (HTTPException hex) {
String message = BundleUtil.getStringFromBundle("pids.deletePid.failureExpected", Arrays.asList(dataset.getGlobalId().asString(), Integer.toString(hex.getStatusCode())));
} catch (HttpException hex) {
String message = BundleUtil.getStringFromBundle("pids.deletePid.failureExpected", Arrays.asList(dataset.getGlobalId().asString(), Integer.toString(hex.getReasonCode())));
logger.info(message);
throw new IllegalCommandException(message, this);
} catch (Exception ex) {
Expand Down

0 comments on commit d51ecc4

Please sign in to comment.