Skip to content

Commit 7a49472

Browse files
author
savchenko_n
committed
Improve Stomp headers regexp
1 parent 6e7fd11 commit 7a49472

File tree

7 files changed

+16
-12
lines changed

7 files changed

+16
-12
lines changed

.idea/markdown-navigator/profiles_settings.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.2.2'
8+
classpath 'com.android.tools.build:gradle:2.3.0-alpha3'
99
classpath 'me.tatarka:gradle-retrolambda:3.3.0'
1010
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
1111

example-client/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 24
5-
buildToolsVersion "24.0.2"
4+
compileSdkVersion 25
5+
buildToolsVersion "25.0.1"
66

77
defaultConfig {
88
applicationId "ua.naiksoftware.stompclientexample"
@@ -22,5 +22,5 @@ android {
2222
dependencies {
2323
compile fileTree(dir: 'libs', include: ['*.jar'])
2424
testCompile 'junit:junit:4.12'
25-
compile 'com.android.support:appcompat-v7:24.2.1'
25+
compile 'com.android.support:appcompat-v7:25.1.0'
2626
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Mon Dec 28 10:00:20 PST 2015
1+
#Thu Dec 15 18:53:34 EET 2016
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.2-all.zip

lib/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ apply plugin: 'com.github.dcendents.android-maven'
55
group='com.github.NaikSoftware'
66

77
android {
8-
compileSdkVersion 23
9-
buildToolsVersion "23.0.3"
8+
compileSdkVersion 25
9+
buildToolsVersion "25.0.1"
1010

1111
defaultConfig {
1212
minSdkVersion 16
13-
targetSdkVersion 23
13+
targetSdkVersion 25
1414
versionCode 1
1515
versionName "1.0"
1616
}

lib/src/main/java/ua/naiksoftware/stomp/client/StompMessage.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package ua.naiksoftware.stomp.client;
22

3-
import android.text.TextUtils;
4-
53
import java.io.StringReader;
64
import java.util.ArrayList;
75
import java.util.List;
@@ -18,7 +16,7 @@ public class StompMessage {
1816

1917
public static final String TERMINATE_MESSAGE_SYMBOL = "\u0000";
2018

21-
private static final Pattern PATTERN_HEADER = Pattern.compile("([^:\\s]+):([^:\\s]+)");
19+
private static final Pattern PATTERN_HEADER = Pattern.compile("([^:\\s]+)\\s*:\\s*([^:\\s]+)");
2220

2321
private final String mStompCommand;
2422
private final List<StompHeader> mStompHeaders;

0 commit comments

Comments
 (0)