NumberFormatException
This commit is contained in:
@@ -300,7 +300,7 @@ public class ModulesList extends HTTPService {
|
||||
HashSet<String> lvNumberSet = new HashSet<>();
|
||||
boolean found = false;
|
||||
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);
|
||||
lvNumber = match.group(2);
|
||||
semYear = match.group(3);
|
||||
@@ -313,7 +313,7 @@ public class ModulesList extends HTTPService {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (NoSuchFieldException e) {
|
||||
} catch (NoSuchFieldException | NumberFormatException e) {
|
||||
type = "Projekt";
|
||||
}
|
||||
if (!found) {
|
||||
|
||||
Reference in New Issue
Block a user