Skip to content

Commit

Permalink
Merge pull request #2152 from siemens/fix/ImportUploadLicense-1378
Browse files Browse the repository at this point in the history
fix(UI) : Fix upload license file in admin tab.

Reviewed by: [email protected]
Tested by: [email protected]
  • Loading branch information
ag4ums authored Oct 26, 2023
2 parents 08aa966 + 521835e commit 1e64198
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.eclipse.sw360.datahandler.thrift.Quadratic;
import org.jetbrains.annotations.NotNull;

import java.math.BigInteger;
import java.util.*;

import static org.eclipse.sw360.datahandler.common.CommonUtils.isNullEmptyOrWhitespace;
Expand Down Expand Up @@ -350,13 +351,16 @@ public static Map<String, Set<Integer>> convertRelationalTable(List<CSVRecord> r
for (CSVRecord record : records) {
if(record.size()<2) break;
String mainId = record.get(0);
int otherId = Integer.parseInt(record.get(1));
String otherId = record.get(1);
byte[] inputStringBytes = otherId.getBytes();
BigInteger bigIntValue = new BigInteger(inputStringBytes);
Integer acctualId = bigIntValue.intValue();

if (map.containsKey(mainId)) {
map.get(mainId).add(otherId);
map.get(mainId).add(acctualId);
} else {
Set<Integer> ids = new HashSet<>();
ids.add(otherId);
ids.add(acctualId);
map.put(mainId, ids);
}
}
Expand Down

0 comments on commit 1e64198

Please sign in to comment.