I have a humongous code where I do lots of thing, including gets from webservice. For that I have a method to get me the value given by the get: I created a pattern to identify here in the return is my variables, like #{ as for the start and closing with } and I have a method to return me that value:
String getResponseFromPHP(String response)
{
int beginPosition = response.indexOf("#{") + 2;
int endPosition = response.indexOf("}");
return response.substring(beginPosition, endPosition);;
}
'response' in this case is the return from get, like:
HTTP/1.1 200 OK
Date: Fri, 28 Sep 2018 02:38:25 GMT
Server: Apache/2.4.34 (Win32) OpenSSL/1.1.0i PHP/7.2.9
X-Powered-By: PHP/7.2.9
Content-Length: 115
Connection: close
Content-Type: text/html; charset=UTF-8
#{variable}
My problem is that this code worked perfectly until some time ago that the substring part simply stopped returning me any value, I already tested with other string, shorter and it worked changing the variables of start and end partially works, when they are big numbers like 219 and 329 (the case of the actual response string) it doesn't work, but if the numbers are like 150 and 200, it works.
Remembering that my code is big, with lots of functions. There can be any problem with disk space or anything ike that?