Add missing @Override annotations

This commit is contained in:
Sam Brannen
2019-08-22 14:48:08 +02:00
parent 0b63db26b7
commit ad6231ad29
108 changed files with 321 additions and 0 deletions

View File

@@ -65,91 +65,112 @@ public class StubTextMessage implements TextMessage {
}
@Override
public String getText() throws JMSException {
return this.text;
}
@Override
public void setText(String text) throws JMSException {
this.text = text;
}
@Override
public void acknowledge() throws JMSException {
throw new UnsupportedOperationException();
}
@Override
public void clearBody() throws JMSException {
this.text = null;
}
@Override
public void clearProperties() throws JMSException {
this.properties.clear();
}
@Override
public boolean getBooleanProperty(String name) throws JMSException {
Object value = this.properties.get(name);
return (value instanceof Boolean) ? ((Boolean) value).booleanValue() : false;
}
@Override
public byte getByteProperty(String name) throws JMSException {
Object value = this.properties.get(name);
return (value instanceof Byte) ? ((Byte) value).byteValue() : 0;
}
@Override
public double getDoubleProperty(String name) throws JMSException {
Object value = this.properties.get(name);
return (value instanceof Double) ? ((Double) value).doubleValue() : 0;
}
@Override
public float getFloatProperty(String name) throws JMSException {
Object value = this.properties.get(name);
return (value instanceof Float) ? ((Float) value).floatValue() : 0;
}
@Override
public int getIntProperty(String name) throws JMSException {
Object value = this.properties.get(name);
return (value instanceof Integer) ? ((Integer) value).intValue() : 0;
}
@Override
public String getJMSCorrelationID() throws JMSException {
return this.correlationId;
}
@Override
public byte[] getJMSCorrelationIDAsBytes() throws JMSException {
return this.correlationId.getBytes();
}
@Override
public int getJMSDeliveryMode() throws JMSException {
return this.deliveryMode;
}
@Override
public Destination getJMSDestination() throws JMSException {
return this.destination;
}
@Override
public long getJMSExpiration() throws JMSException {
return this.expiration;
}
@Override
public String getJMSMessageID() throws JMSException {
return this.messageId;
}
@Override
public int getJMSPriority() throws JMSException {
return this.priority;
}
@Override
public boolean getJMSRedelivered() throws JMSException {
return this.redelivered;
}
@Override
public Destination getJMSReplyTo() throws JMSException {
return this.replyTo;
}
@Override
public long getJMSTimestamp() throws JMSException {
return this.timestamp;
}
@Override
public String getJMSType() throws JMSException {
return this.type;
}
@@ -159,93 +180,115 @@ public class StubTextMessage implements TextMessage {
return this.deliveryTime;
}
@Override
public long getLongProperty(String name) throws JMSException {
Object value = this.properties.get(name);
return (value instanceof Long) ? ((Long) value).longValue() : 0;
}
@Override
public Object getObjectProperty(String name) throws JMSException {
return this.properties.get(name);
}
@Override
public Enumeration<?> getPropertyNames() throws JMSException {
return this.properties.keys();
}
@Override
public short getShortProperty(String name) throws JMSException {
Object value = this.properties.get(name);
return (value instanceof Short) ? ((Short) value).shortValue() : 0;
}
@Override
public String getStringProperty(String name) throws JMSException {
Object value = this.properties.get(name);
return (value instanceof String) ? (String) value : null;
}
@Override
public boolean propertyExists(String name) throws JMSException {
return this.properties.containsKey(name);
}
@Override
public void setBooleanProperty(String name, boolean value) throws JMSException {
this.properties.put(name, value);
}
@Override
public void setByteProperty(String name, byte value) throws JMSException {
this.properties.put(name, value);
}
@Override
public void setDoubleProperty(String name, double value) throws JMSException {
this.properties.put(name, value);
}
@Override
public void setFloatProperty(String name, float value) throws JMSException {
this.properties.put(name, value);
}
@Override
public void setIntProperty(String name, int value) throws JMSException {
this.properties.put(name, value);
}
@Override
public void setJMSCorrelationID(String correlationId) throws JMSException {
this.correlationId = correlationId;
}
@Override
public void setJMSCorrelationIDAsBytes(byte[] correlationID) throws JMSException {
this.correlationId = new String(correlationID);
}
@Override
public void setJMSDeliveryMode(int deliveryMode) throws JMSException {
this.deliveryMode = deliveryMode;
}
@Override
public void setJMSDestination(Destination destination) throws JMSException {
this.destination = destination;
}
@Override
public void setJMSExpiration(long expiration) throws JMSException {
this.expiration = expiration;
}
@Override
public void setJMSMessageID(String id) throws JMSException {
this.messageId = id;
}
@Override
public void setJMSPriority(int priority) throws JMSException {
this.priority = priority;
}
@Override
public void setJMSRedelivered(boolean redelivered) throws JMSException {
this.redelivered = redelivered;
}
@Override
public void setJMSReplyTo(Destination replyTo) throws JMSException {
this.replyTo = replyTo;
}
@Override
public void setJMSTimestamp(long timestamp) throws JMSException {
this.timestamp = timestamp;
}
@Override
public void setJMSType(String type) throws JMSException {
this.type = type;
}
@@ -255,18 +298,22 @@ public class StubTextMessage implements TextMessage {
this.deliveryTime = deliveryTime;
}
@Override
public void setLongProperty(String name, long value) throws JMSException {
this.properties.put(name, value);
}
@Override
public void setObjectProperty(String name, Object value) throws JMSException {
this.properties.put(name, value);
}
@Override
public void setShortProperty(String name, short value) throws JMSException {
this.properties.put(name, value);
}
@Override
public void setStringProperty(String name, String value) throws JMSException {
this.properties.put(name, value);
}

View File

@@ -166,6 +166,7 @@ public class JmsListenerContainerFactoryIntegrationTests {
private final Map<String, Boolean> invocations = new HashMap<>();
@Override
public void handleIt(@Payload String msg, @Header("my-header") String myHeader) {
invocations.put("handleIt", true);
assertThat(msg).as("Unexpected payload message").isEqualTo("FOO-BAR");