This commit is contained in:
@@ -22,6 +22,8 @@ import javax.jms.BytesMessage;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.MessageEOFException;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Input stream that wraps a {@link BytesMessage}.
|
||||
*
|
||||
@@ -30,9 +32,10 @@ import javax.jms.MessageEOFException;
|
||||
*/
|
||||
class BytesMessageInputStream extends InputStream {
|
||||
|
||||
private BytesMessage message;
|
||||
private final BytesMessage message;
|
||||
|
||||
BytesMessageInputStream(BytesMessage message) {
|
||||
Assert.notNull(message, "'message' must not be null");
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@ import java.io.OutputStream;
|
||||
import javax.jms.BytesMessage;
|
||||
import javax.jms.JMSException;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Output stream that wraps a {@link BytesMessage}.
|
||||
*
|
||||
@@ -29,9 +31,10 @@ import javax.jms.JMSException;
|
||||
*/
|
||||
class BytesMessageOutputStream extends OutputStream {
|
||||
|
||||
private BytesMessage message;
|
||||
private final BytesMessage message;
|
||||
|
||||
BytesMessageOutputStream(BytesMessage message) {
|
||||
Assert.notNull(message, "'message' must not be null");
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ import javax.jms.Message;
|
||||
*/
|
||||
public class JmsTransportUtils {
|
||||
|
||||
private static final Pattern DESTINATION_NAME_PATTERN = Pattern.compile("^jms:(\\w+)\\&?");
|
||||
private static final Pattern DESTINATION_NAME_PATTERN = Pattern.compile("^([^\\?]+)");
|
||||
|
||||
private static final Pattern DELIVERY_MODE_PATTERN = Pattern.compile("deliveryMode=(PERSISTENT|NON_PERSISTENT)");
|
||||
|
||||
@@ -97,7 +97,7 @@ public class JmsTransportUtils {
|
||||
}
|
||||
|
||||
private static String getStringParameter(Pattern pattern, URI uri) {
|
||||
Matcher matcher = pattern.matcher(uri.toString());
|
||||
Matcher matcher = pattern.matcher(uri.getSchemeSpecificPart());
|
||||
if (matcher.find() && matcher.groupCount() == 1) {
|
||||
return matcher.group(1);
|
||||
}
|
||||
@@ -105,7 +105,7 @@ public class JmsTransportUtils {
|
||||
}
|
||||
|
||||
private static int getIntParameter(Pattern pattern, URI uri, int defaultValue) {
|
||||
Matcher matcher = pattern.matcher(uri.toString());
|
||||
Matcher matcher = pattern.matcher(uri.getSchemeSpecificPart());
|
||||
if (matcher.find() && matcher.groupCount() == 1) {
|
||||
try {
|
||||
return Integer.parseInt(matcher.group(1));
|
||||
@@ -118,7 +118,7 @@ public class JmsTransportUtils {
|
||||
}
|
||||
|
||||
private static long getLongParameter(Pattern pattern, URI uri, long defaultValue) {
|
||||
Matcher matcher = pattern.matcher(uri.toString());
|
||||
Matcher matcher = pattern.matcher(uri.getSchemeSpecificPart());
|
||||
if (matcher.find() && matcher.groupCount() == 1) {
|
||||
try {
|
||||
return Long.parseLong(matcher.group(1));
|
||||
|
||||
Reference in New Issue
Block a user