title: Native method synchronization
body: <p>I have a native method method defined like this:</p>
  
  <pre><code>public static native int doSomething();
  </code></pre>
  
  <p>However, this method is not thread-safe.  So, I put a <code>synchronized</code> keyword on it, so it looks like this now:</p>
  
  <pre><code>public static synchronized native int doSomething();
  </code></pre>
  
  <p>This appears to fix the problem, but I'm not sure if it actually does.  Is this valid?  Does it actually properly lock access to the method?</p>