aerospike / aerospike-client-java

Aerospike Java Client Library
Other
236 stars 212 forks source link

Remove initialisation condition for data parse in read command #103

Closed sahlone closed 6 years ago

sahlone commented 6 years ago

The PR intends to remove the local function variable check for initializations which happens for all the data bytes coming from the server

  1. Initialize the variable locally
  2. Avoid a function call for put and remove the chance of map mutability
BrianNichols commented 6 years ago

Initializing bins hashmap at the beginning is fine, but addBin() can't be removed because OperateCommand overrides addBin().

sahlone commented 6 years ago

@BrianNichols The problem here is the parseRecord which is a private function giving call to a protected fucntion addBin. For now I have reverted the changes for the addBin. Here eab100f65871cd8bb3bc43e629eb447527372ca3

BrianNichols commented 6 years ago

Your pull request has been accepted. It will appear in the next release of the java client.

BrianNichols commented 6 years ago

Java client 4.1.9 has been released.

https://www.aerospike.com/download/client/java/4.1.9/