NumberFormatException
This commit is contained in:
@@ -300,7 +300,7 @@ public class ModulesList extends HTTPService {
|
|||||||
HashSet<String> lvNumberSet = new HashSet<>();
|
HashSet<String> lvNumberSet = new HashSet<>();
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
try {
|
try {
|
||||||
Matcher match = Regex.match("[A-Za-z0-9]*_([A-Za-z0-9]*)_([A-Za-z0-9]*)_([0-9]*)([A-Z]*)", json.getString("courseId"));
|
Matcher match = Regex.match("[A-Za-z0-9]*_([A-Za-z0-9]*)_([A-Za-z0-9]*)_([0-9]{2}[0-9]{2}?)([WS]+)", json.getString("courseId"));
|
||||||
type = match.group(1);
|
type = match.group(1);
|
||||||
lvNumber = match.group(2);
|
lvNumber = match.group(2);
|
||||||
semYear = match.group(3);
|
semYear = match.group(3);
|
||||||
@@ -313,7 +313,7 @@ public class ModulesList extends HTTPService {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (NoSuchFieldException e) {
|
} catch (NoSuchFieldException | NumberFormatException e) {
|
||||||
type = "Projekt";
|
type = "Projekt";
|
||||||
}
|
}
|
||||||
if (!found) {
|
if (!found) {
|
||||||
|
|||||||
Reference in New Issue
Block a user