Skip to content

Commit

Permalink
Split with StringUtils and not Regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Murawski committed Dec 25, 2023
1 parent 9b1b6dd commit a7722ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions project/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ dependencies {
implementation 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.github.matomo-org:matomo-sdk-android:4.1.4'
implementation 'org.apache.commons:commons-lang3:3.0'

implementation 'com.github.Innovattic:range-seek-bar:v1.0.6'
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))
Expand Down
5 changes: 4 additions & 1 deletion project/src/main/java/com/shurik/droidzebra/ZebraEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
package com.shurik.droidzebra;

import android.util.Log;

import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
Expand Down Expand Up @@ -714,7 +716,8 @@ private JSONObject Callback(int msgcode, JSONObject data) {
case MSG_STATUS: {
String message = data.getString("status");
ZebraEngine.this.onDebugListener.onDebug("Status: " + message);
String[] split = message.split("\\s+");

String[] split = StringUtils.split(message, ' ');
if(split.length > 1) {
String reachedDepth = split[1];
ZebraEngine.this.onDebugListener.onDebug("Depth: " + reachedDepth);
Expand Down

0 comments on commit a7722ba

Please sign in to comment.