pmarches / jStellarAPI

java API for the stellar network
GNU Lesser General Public License v3.0
15 stars 3 forks source link

nice code #16

Closed jargoman closed 11 years ago

jargoman commented 11 years ago

I'm porting your code, looks really good. Send me a pm on the ripple forum. and If you are going to check for null after assigning a field var something; // this is undefined then later... if (something!=null) return something; // you're checking an undefined field

You should declare it as null, or set it to null in the constructor
var something = null;
then later... if (something!=null) return something;

pmarches commented 11 years ago

Thank you for your interest. The code really is alpha quality at this moment, and has only been tested by me so beware of these pitfalls. However, in the java language, member variables are guaranteed to be set to null by default.

Thank you for your comments, let me know if you find more bugs!

Philippe