soartech / jsoar

Pure Java implementation of the Soar cognitive architecture.
http://soartech.github.com/jsoar/
BSD 3-Clause "New" or "Revised" License
54 stars 19 forks source link

QMemory.SetInteger takes an int; should take long #95

Closed marinier closed 11 years ago

marinier commented 11 years ago

The QMemory.SetInteger(String, int) interface method takes an int. In DefaultQMemory.SetInteger(String, int), the int just gets passed to MemoryNode.setIntValue(long) which takes a long. Internally, IntegerSymbolImpl stores a long value. QMemory should use long instead of int.

The effect of this is that you can't pass something like System.currentTimeMillis() directly into QMemory without casting it to an int (which may ruin the value).

voigtjr commented 11 years ago

Fixed in 9fd7e7f36021a720d2e1fadf377156bbd1539a49