if (question == -1 && sharp == -1) {
schemeSpecificPart = spec.substring(colon+1);
}
else if (question != -1) {
if (question < colon) {
MalformedURIException ex
= new MalformedURIException("Unparseable URI");
ex.setData(spec);
throw ex;
}
schemeSpecificPart = spec.substring(colon+1, question);
}
else {
if (sharp < colon) {
MalformedURIException ex
= new MalformedURIException("Unparseable URI");
ex.setData(spec);
throw ex;
}
schemeSpecificPart = spec.substring(colon+1, sharp);
}