Skip to content
Snippets Groups Projects

Fixes for UI-Database integration

Merged Schuh Martin requested to merge DataBase into development
7 files
+ 40
39
Compare changes
  • Side-by-side
  • Inline
Files
7
@@ -78,14 +78,14 @@ public class Parser {
int hashLength = 40;
if(mapID.length() != hashLength){
throw new ParserException("Map-ID length not correct. Must have length of " + hashLength + " characters!");
throw new ParserException("SHA1 hash length not correct. Must have length of " + hashLength + " characters!");
}
Pattern pat = Pattern.compile("[^a-f0-9]"); //maybe make case-insensitive -> letters can be uppercase and still be valid hex number
Matcher mat = pat.matcher(mapID);
boolean result = mat.find();
if(result){
throw new ParserException("Forbidden characters used! Map ID only consists out of letters a-f and/or numbers 0-9!");
throw new ParserException("Forbidden characters used! SHA1 hash only consists out of letters a-f and/or numbers 0-9!");
}
}
Loading