Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Revisions: Issue #46306 All Revisions ] Back to Issue ]
Summary 0046306: Number format exception in RFIDencoding
Revision 2021-04-21 09:38 by joniturralde93
Description In this line:
https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.poshwmanager.sources/-/blob/master/project/src/com/openbravo/pos/util/RFIDEncoding.java#L58 [^]

.leftPad(String.valueOf(Integer.parseInt(binaryCompanyPrefix, 2)), 13 - partition, '0');


There are cases where binaryCompanyPrefix is too large for the int type and it is necessary to use Long.

Long.parseLong instead of Integer.parseInt

Edit:
- It seems BigInteger could be needed in some circumstances.
- It would be nice to have a log added where we get printed the scanned tag in case some of these conversions fail.
Revision 2021-04-20 12:11 by joniturralde93
Description In this line:
https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.poshwmanager.sources/-/blob/master/project/src/com/openbravo/pos/util/RFIDEncoding.java#L58 [^]

There are cases where binaryCompanyPrefix is too large for the int type and it is necessary to use Long.

Long.parseLong instead of Integer.parseInt


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker