File tree Expand file tree Collapse file tree
library/src/main/java/com/proxerme/library/connection/messenger/entity Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,12 +123,12 @@ public String getImageType() {
123123 if (image .isEmpty ()) {
124124 return EMPTY_RESULT ;
125125 } else {
126- String [] split = image .split (IMAGE_DELIMITER );
126+ int delimiterIndex = image .indexOf (IMAGE_DELIMITER );
127127
128- if (split .length == 2 ) {
129- return split [0 ];
130- } else {
128+ if (delimiterIndex < 0 ) {
131129 return EMPTY_RESULT ;
130+ } else {
131+ return image .substring (0 , delimiterIndex );
132132 }
133133 }
134134 }
@@ -144,12 +144,12 @@ public String getImageId() {
144144 if (image .isEmpty ()) {
145145 return EMPTY_RESULT ;
146146 } else {
147- String [] split = image .split (IMAGE_DELIMITER );
147+ int delimiterIndex = image .indexOf (IMAGE_DELIMITER );
148148
149- if (split .length == 2 ) {
150- return split [1 ];
151- } else {
149+ if (delimiterIndex < 0 ) {
152150 return EMPTY_RESULT ;
151+ } else {
152+ return image .substring (delimiterIndex );
153153 }
154154 }
155155 }
You can’t perform that action at this time.
0 commit comments