Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,22 @@
* @see <a href="http://go.microsoft.com/fwlink/?LinkId=761101">http://go.microsoft.com/fwlink/?LinkId=761101</a>
* @since 1.0
*/
public class CommunicationException extends ServiceBusException
{
public class CommunicationException extends ServiceBusException {
private static final long serialVersionUID = 7968596830506494332L;

CommunicationException()
{
CommunicationException() {
super(true);
}

CommunicationException(final String message)
{
CommunicationException(final String message) {
super(true, message);
}

CommunicationException(final Throwable cause)
{
CommunicationException(final Throwable cause) {
super(true, cause);
}

CommunicationException(final String message, final Throwable cause)
{
CommunicationException(final String message, final Throwable cause) {
super(true, message, cause);
}
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
import org.apache.qpid.proton.amqp.messaging.Accepted;
import org.apache.qpid.proton.amqp.messaging.AmqpValue;
import org.apache.qpid.proton.amqp.messaging.Source;
import org.apache.qpid.proton.amqp.transaction.*;
import org.apache.qpid.proton.amqp.transaction.Coordinator;
import org.apache.qpid.proton.amqp.transaction.Declare;
import org.apache.qpid.proton.amqp.transaction.Declared;
import org.apache.qpid.proton.amqp.transaction.Discharge;
import org.apache.qpid.proton.amqp.transport.SenderSettleMode;
import org.apache.qpid.proton.amqp.transport.Target;
import org.apache.qpid.proton.engine.impl.DeliveryImpl;
import org.apache.qpid.proton.message.Message;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -32,7 +34,7 @@ class Controller {
private URI namespaceEndpointURI;
private ClientSettings clientSettings;

public Controller (URI namespaceEndpointURI, MessagingFactory factory, ClientSettings clientSettings) {
Controller(URI namespaceEndpointURI, MessagingFactory factory, ClientSettings clientSettings) {
this.namespaceEndpointURI = namespaceEndpointURI;
this.messagingFactory = factory;
this.clientSettings = clientSettings;
Expand Down Expand Up @@ -75,7 +77,7 @@ public CompletableFuture<Binary> declareAsync() {
return this.internalSender.sendAndReturnDeliveryStateAsync(
message,
TransactionContext.NULL_TXN)
.thenApply( state -> {
.thenApply(state -> {
Binary txnId = null;
if (state instanceof Declared) {
Declared declared = (Declared) state;
Expand All @@ -100,11 +102,10 @@ public CompletableFuture<Void> dischargeAsync(Binary txnId, boolean isCommit) {
return this.internalSender.sendAndReturnDeliveryStateAsync(
message,
TransactionContext.NULL_TXN)
.thenCompose( state -> {
.thenCompose(state -> {
if (state instanceof Accepted) {
return CompletableFuture.completedFuture(null);
}
else {
} else {
CompletableFuture<Void> returnTask = new CompletableFuture<>();
returnTask.completeExceptionally(new UnsupportedOperationException("Received unknown state: " + state.toString()));
return returnTask;
Expand All @@ -116,8 +117,7 @@ protected CompletableFuture<Void> closeAsync() {
return null;
}

private static SenderLinkSettings getControllerLinkSettings(MessagingFactory underlyingFactory)
{
private static SenderLinkSettings getControllerLinkSettings(MessagingFactory underlyingFactory) {
SenderLinkSettings linkSettings = new SenderLinkSettings();
linkSettings.linkPath = "coordinator";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

package com.microsoft.azure.servicebus.primitives;

interface IErrorContextProvider
{
interface IErrorContextProvider {
ErrorContext getContext();
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,21 @@
* This exception is thrown when the connection string provided does not meet the requirement for connection.
* @since 1.0
*/
public class IllegalConnectionStringFormatException extends IllegalArgumentException
{
public class IllegalConnectionStringFormatException extends IllegalArgumentException {
private static final long serialVersionUID = 2514898858133972030L;

IllegalConnectionStringFormatException()
{
IllegalConnectionStringFormatException() {
}

IllegalConnectionStringFormatException(String detail)
{
IllegalConnectionStringFormatException(String detail) {
super(detail);
}

IllegalConnectionStringFormatException(Throwable cause)
{
IllegalConnectionStringFormatException(Throwable cause) {
super(cause);
}

IllegalConnectionStringFormatException(String detail, Throwable cause)
{
IllegalConnectionStringFormatException(String detail, Throwable cause) {
super(detail, cause);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,55 +5,43 @@

import java.util.Iterator;

final class IteratorUtil
{
private IteratorUtil()
{
final class IteratorUtil {
private IteratorUtil() {
}

public static <T> boolean sizeEquals(Iterable<T> iterable, int expectedSize)
{
public static <T> boolean sizeEquals(Iterable<T> iterable, int expectedSize) {
Iterator<T> iterator = iterable.iterator();

int currentSize = 0;
while(iterator.hasNext())
{
if (expectedSize > currentSize)
{
while (iterator.hasNext()) {
if (expectedSize > currentSize) {
currentSize++;
iterator.next();
continue;
}
else
{
} else {
return false;
}
}

return true;
}

public static <T> T getLast(Iterator<T> iterator)
{
public static <T> T getLast(Iterator<T> iterator) {
T last = null;
while(iterator.hasNext())
{
while (iterator.hasNext()) {
last = iterator.next();
}

return last;
}

public static <T> T getFirst(final Iterable<T> iterable)
{
if (iterable == null)
{
public static <T> T getFirst(final Iterable<T> iterable) {
if (iterable == null) {
return null;
}

final Iterator<T> iterator = iterable.iterator();
if (iterator == null)
{
if (iterator == null) {
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,19 @@ public class MessageLockLostException extends ServiceBusException {

private static final long serialVersionUID = -203350475131556600L;

public MessageLockLostException()
{
public MessageLockLostException() {
super(false);
}

public MessageLockLostException(String message)
{
public MessageLockLostException(String message) {
super(false, message);
}

public MessageLockLostException(Throwable cause)
{
public MessageLockLostException(Throwable cause) {
super(false, cause);
}

public MessageLockLostException(String message, Throwable cause)
{
public MessageLockLostException(String message, Throwable cause) {
super(false, message, cause);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,19 @@ public class MessageNotFoundException extends ServiceBusException {

private static final long serialVersionUID = -7138414297734634975L;

public MessageNotFoundException()
{
public MessageNotFoundException() {
super(false);
}

public MessageNotFoundException(String message)
{
public MessageNotFoundException(String message) {
super(false, message);
}

public MessageNotFoundException(Throwable cause)
{
public MessageNotFoundException(Throwable cause) {
super(false, cause);
}

public MessageNotFoundException(String message, Throwable cause)
{
public MessageNotFoundException(String message, Throwable cause) {
super(false, message, cause);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ public class MessageWithLockToken {
private final Message message;
private final UUID lockToken;

public MessageWithLockToken(Message message, UUID lockToken)
{
public MessageWithLockToken(Message message, UUID lockToken) {
this.message = message;
this.lockToken = lockToken;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ public class MessagingEntityAlreadyExistsException extends ServiceBusException {

private static final long serialVersionUID = -3652949479773950838L;

public MessagingEntityAlreadyExistsException(String message)
{
public MessagingEntityAlreadyExistsException(String message) {
super(false, message);
}

public MessagingEntityAlreadyExistsException(String message, Throwable cause)
{
public MessagingEntityAlreadyExistsException(String message, Throwable cause) {
super(false, message, cause);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,23 @@
* @since 1.0
*
*/
public class MessagingEntityDisabledException extends ServiceBusException{
public class MessagingEntityDisabledException extends ServiceBusException {

private static final long serialVersionUID = 9086472912026637605L;

public MessagingEntityDisabledException()
{
public MessagingEntityDisabledException() {
super(false);
}

public MessagingEntityDisabledException(String message)
{
public MessagingEntityDisabledException(String message) {
super(false, message);
}

public MessagingEntityDisabledException(Throwable cause)
{
public MessagingEntityDisabledException(Throwable cause) {
super(false, cause);
}

public MessagingEntityDisabledException(String message, Throwable cause)
{
public MessagingEntityDisabledException(String message, Throwable cause) {
super(false, message, cause);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,19 @@ public class MessagingEntityNotFoundException extends ServiceBusException {

private static final long serialVersionUID = -4624769494653591824L;

public MessagingEntityNotFoundException()
{
public MessagingEntityNotFoundException() {
super(false);
}

public MessagingEntityNotFoundException(String message)
{
public MessagingEntityNotFoundException(String message) {
super(false, message);
}

public MessagingEntityNotFoundException(Throwable cause)
{
public MessagingEntityNotFoundException(Throwable cause) {
super(false, cause);
}

public MessagingEntityNotFoundException(String message, Throwable cause)
{
public MessagingEntityNotFoundException(String message, Throwable cause) {
super(false, message, cause);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ public enum MessagingEntityType {
FILTER(3);

private int enumValue;
MessagingEntityType(int enumValue)
{
MessagingEntityType(int enumValue) {
this.enumValue = enumValue;
}

public int getIntValue()
{
public int getIntValue() {
return this.enumValue;
}
}
Loading