Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Clarify some javadoc

  • Loading branch information...
commit 00e3608c541bf417004585a63da7109bbf0f0218 1 parent 040e67b
@twall authored
View
4 build.xml
@@ -876,12 +876,12 @@ osname=macos,
<arg value="org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy-file"/>
<arg value="-Durl=${maven-snapshots-repository-url}"/>
<arg value="-DrepositoryId=${maven-snapshots-repository-id}"/>
- <arg value="-DpomFile=pom.xml"/>
+ <arg value="-DpomFile=${pom}"/>
<arg value="-Dfile=${maven-jar}"/>
</artifact:mvn>
</target>
- <!-- before this, update project version (both build.xml and pom.xml) from SNAPSHOT to RELEASE -->
+ <!-- before this, update project version (both build.xml and ${pom}) from SNAPSHOT to RELEASE -->
<target name="stage" depends="dist" description="deploy release version to Maven staging repository">
<!-- sign and deploy the main artifact -->
<artifact:mvn>
View
10 src/com/sun/jna/CallbackThreadInitializer.java
@@ -11,22 +11,22 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
-/** This class provides for customization of the mapping of native threads
+/** This class provides for customization of the mapping of native threads
* onto attached Java threads. Use
* {@link Native#setCallbackThreadInitializer} to customize the thread context
* in which a given callback is invoked.<p/>
- * When a JNA callback is invoked on a native thread that is not currently
+ * When a JNA callback is invoked on a native thread that is not currently
* tracked by the VM and a <code>CallbackThreadInitiailizer</code> is
* registered for that callback, the initializer object will be used to
- * determine how the thread should be attached to the VM.<p/>.
- * Once attached, the method {@link Native#detach} may be used from within
+ * determine how the thread should be attached to the VM.<p/>
+ * Once attached, the method {@link Native#detach} may be used from within
* the callback invocation to alter whether the thread will be detached or not
* when the callback finishes execution. Typically this functionality is used
* in situations where you expect a callback to be called repeatedly from the
* same thread and you want to avoid potential extra thread allocation
* overhead on each callback invocation, since the VM may or may not re-use
* the same allocated thread object each time the thread is attached.<p/>
- * A single initializer may be used for multiple callbacks, one initializer
+ * A single initializer may be used for multiple callbacks, one initializer
* per callback, or you may subclass the initializer to provide different
* initializer settings depending on the callback.<p/>
*/
View
4 src/com/sun/jna/Native.java
@@ -1721,8 +1721,8 @@ static Pointer getPointer(long addr) {
Note: errno/SetLastError is used to signal the desired state; this is
a hack to make use of built-in thread-local storage to avoid having to
re-implement it on certain platforms.<p/>
- Warning: avoid calling {@link #detach detach(true)} on a VM thread;
- the resulting behavior is not defined.<p/>
+ Warning: avoid calling {@link #detach detach(true)} on threads
+ spawned by the JVM; the resulting behavior is not defined.<p/>
*/
public static void detach(boolean detach) {
setLastError(detach ? THREAD_DETACH : THREAD_LEAVE_ATTACHED);
View
10 src/com/sun/jna/overview.html
@@ -729,9 +729,11 @@
com.sun.jna.Structure#writeField(String,Object)} to synch with just the fields
of interest.
<h3>Throw exceptions on last error</h3>
-If you are interested in the value of errno/GetLastError(), declare your
-method to throw LastErrorException, and call
-{@link com.sun.jna.Native#setPreserveLastError setPreserveLastError(false)} or set
-the System property <code>jna.preserve_last_error=false</code>.
+To avoid the overhead of preserving the system last error information on every
+native call, invoke
+{@link com.sun.jna.Native#setPreserveLastError setPreserveLastError(false)} or
+set the System property <code>jna.preserve_last_error=false</code>.<p/>
+In those methods where you are interested in the value of errno/GetLastError(),
+declare your method to throw {@link com.sun.jna.LastErrorException}.
</body>
</html>
Please sign in to comment.
Something went wrong with that request. Please try again.