jlcout / epctagcoder

Java library for RFID EPC encode / decode
https://jlcout.github.io/epctagcoder
Apache License 2.0
51 stars 31 forks source link

Unexpected IllegalArgumentException #11

Closed NTrubkin closed 3 years ago

NTrubkin commented 3 years ago

I ran into a tag urn:epc:id:sscc:4610052.9000000007. I'm pretty sure the tag correct. But the following code fails:

ParseSSCC.Builder()
         .withEPCPureIdentityURI("urn:epc:id:sscc:4610052.9000000007")
         .withTagSize(SSCCTagSize.BITS_96)
         .withFilterValue(SSCCFilterValue.RESERVED_5)
         .build();
java.lang.IllegalArgumentException: EPC Pure Identity is invalid
    at org.epctagcoder.parse.SSCC.ParseSSCC.parse(ParseSSCC.java:119)
    at org.epctagcoder.parse.SSCC.ParseSSCC.<init>(ParseSSCC.java:47)
    at org.epctagcoder.parse.SSCC.ParseSSCC.<init>(ParseSSCC.java:20)
    at org.epctagcoder.parse.SSCC.ParseSSCC$Steps.build(ParseSSCC.java:266)
...
jlcout commented 3 years ago

Hi Trubkin!

New version 0.0.8 is available. I found a small error in a regular expression and it was fixed.

Thanks for reporting.

Здоровья тебе и твоей семье. Привет из Brazil

NTrubkin commented 3 years ago

You are awesome. Thank you.