Skip to content

Commit

Permalink
Fix loading UceniciBase for longer sifra
Browse files Browse the repository at this point in the history
  • Loading branch information
luka-j committed Apr 27, 2021
1 parent 6bf571b commit 5cf35ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group 'rs.lukaj'
version '1.4.0-RELEASE'
version '1.4.1-RELEASE'

apply plugin: 'java'
apply plugin: 'application'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ public static void load() {

List<String> ucenici = FileMerger.readFromOne(new File(DownloadController.DATA_FOLDER, FileMerger.FILENAME));
for(String ucStr : ucenici) {
Ucenik2017 uc = new Ucenik2017(ucStr.substring(0, 6));
uc.loadFromString(ucStr.substring(7));
int sifraEndPosition = ucStr.indexOf('\n');
Ucenik2017 uc = new Ucenik2017(ucStr.substring(0, sifraEndPosition));
uc.loadFromString(ucStr.substring(sifraEndPosition+1));
UcenikW uw = new UcenikW(uc);
base.put(uw.sifra, uw);
}
Expand Down

0 comments on commit 5cf35ff

Please sign in to comment.