aionnetwork / AVM

Enabling Java code to run in a blockchain environment
https://theoan.com/
MIT License
49 stars 25 forks source link

Blockchain.log fails with null topic #412

Closed fulldecent closed 5 years ago

fulldecent commented 5 years ago

Blockchain.log is throwing when a topic is passed as null.

Documentation does not specify null is disallowed. Same documentation specifies null is disallowed for a different parameter. https://avm-api.aion.network/avm/blockchain#log(byte%5B%5D)

Test case:

  1. https://github.com/fulldecent/aion-aip040/blob/master/src/main/java/org/aion/AIP040Events.java#L24-L28
  2. Run https://travis-ci.com/fulldecent/aion-aip040/jobs/227890801#L643

Expected:

Null is allowed.

Actual:

Exception thrown.

aion-shidokht commented 5 years ago

Closing this issue since documentation states that java.lang.IllegalArgumentException is thrown "when the arguments are invalid, e.g. any are NULL".