On 09/30/2013 05:33 PM, Christopher Schultz wrote:
I may need a little more guidance, since adding NULL-checks for everything is a little silly. Here is the function declaration in tcnative: TCN_IMPLEMENT_CALL(jint, Poll, poll)(TCN_STDARGS, jlong pollset, jlong timeout, jlongArray set, jboolean remove) Presumably, the pollset itself is non-null, but could all of the items in the pollset be null?
APR does not check for parameter validity. Neither does TC native in most cases (checks are actually leftovers from initial debugging). It's up to java code to ensure params are valid, and thread safe if needed. I don't think there is nothing wrong with the native code. Using it is where the majority of problems happen. Neither thread safety or param checking should be part of native code. It's a thin low level wrapper. Everything else should be done in java. Regards -- ^TM --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org