}
return new SVNLock(path, id, owner, comment, createdDate, null);
}
public SVNLock[] doGetLocks(String path) throws SVNException {
DAVGetLocksHandler handler = new DAVGetLocksHandler();
HTTPStatus status = null;
try {
status = doReport(path, DAVGetLocksHandler.generateGetLocksRequest(null), handler);
} catch (SVNException e) {
if (e.getErrorMessage() != null && e.getErrorMessage().getErrorCode() == SVNErrorCode.UNSUPPORTED_FEATURE) {
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_NOT_IMPLEMENTED, "Server does not support locking features");
SVNErrorManager.error(err, e.getErrorMessage(), SVNLogType.NETWORK);
} else if (e.getErrorMessage() != null && e.getErrorMessage().getErrorCode() == SVNErrorCode.FS_NOT_FOUND) {
return new SVNLock[0];
}
throw e;
}
if (status.getCode() == 501) {
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_NOT_IMPLEMENTED, "Server does not support locking features");
SVNErrorManager.error(err, status.getError(), SVNLogType.NETWORK);
} else if (status.getCode() == HttpURLConnection.HTTP_NOT_FOUND) {
return new SVNLock[0];
} else if (status.getError() != null && status.getError().getErrorCode() == SVNErrorCode.UNSUPPORTED_FEATURE) {
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_NOT_IMPLEMENTED, "Server does not support locking features");
SVNErrorManager.error(err, status.getError(), SVNLogType.NETWORK);
} else if (status.getError() != null) {
SVNErrorManager.error(status.getError(), SVNLogType.NETWORK);
}
return handler.getLocks();
}