vkostyukov/la4j — pull request #40 by cjmay (2013-04-24 10:00:48+00:00)
Title: (Possible) patch to bug arising in CRSMatrix.readExternal

Hi,

I was trying to use writeExternal and readExternal to serialize and deserialize a CRSMatrix, respectively, when I got an ArrayIndexOutOfBoundsException at line 445 of CRSMatrix.java (based on version 0.3.0 of la4j). After some static code analysis I ended up at the CRSMatrix.align method. I'm no expert on this stuff, but I would expect a division sign (/) rather than a modulo (%) in there. I made the change to both CRSMatrix and CCSMatrix and I can now serialize and deserialize successfully.

Hope this helps,
Chandler