diff --git a/ext/jni/GNUmakefile b/ext/jni/GNUmakefile index 668b6e0841..f2fc7fb7bd 100644 --- a/ext/jni/GNUmakefile +++ b/ext/jni/GNUmakefile @@ -429,7 +429,7 @@ $(doc.index): $(JAVA_FILES.main) $(MAKEFILE) .FORCE: doc doc: $(doc.index) javadoc: $(doc.index) -# Force rebild of docs +# Force rebuild of docs redoc: @rm -f $(doc.index) @$(MAKE) doc diff --git a/ext/jni/src/c/sqlite3-jni.c b/ext/jni/src/c/sqlite3-jni.c index 6bd6daaec8..d6723453d0 100644 --- a/ext/jni/src/c/sqlite3-jni.c +++ b/ext/jni/src/c/sqlite3-jni.c @@ -133,7 +133,7 @@ ** Which sqlite3.c we're using needs to be configurable to enable ** building against a custom copy, e.g. the SEE variant. We have to ** include sqlite3.c, as opposed to sqlite3.h, in order to get access -** to some interal details like SQLITE_MAX_... and friends. This +** to some internal details like SQLITE_MAX_... and friends. This ** increases the rebuild time considerably but we need this in order ** to access some internal functionality and keep the to-Java-exported ** values of SQLITE_MAX_... and SQLITE_LIMIT_... in sync with the C @@ -5512,7 +5512,7 @@ static inline jobject new_java_fts5_api(JNIEnv * const env, fts5_api *sv){ ** Returns a per-JNIEnv global ref to the Fts5ExtensionApi singleton ** instance, or NULL on OOM. */ -static jobject s3jni_getFts5ExensionApi(JNIEnv * const env){ +static jobject s3jni_getFts5ExtensionApi(JNIEnv * const env){ if( !SJG.fts5.jExt ){ S3JniGlobal_mutex_enter; if( !SJG.fts5.jExt ){ @@ -5578,7 +5578,7 @@ JniDeclFtsApi(jobject,getInstanceForDb)(JniArgsEnvClass,jobject jDb){ JniDeclFtsXA(jobject,getInstance)(JniArgsEnvClass){ - return s3jni_getFts5ExensionApi(env); + return s3jni_getFts5ExtensionApi(env); } JniDeclFtsXA(jint,xColumnCount)(JniArgsEnvObj,jobject jCtx){ @@ -5641,7 +5641,7 @@ static void s3jni_fts5_extension_function(Fts5ExtensionApi const *pApi, S3JniDeclLocal_env; assert(pAux); - jFXA = s3jni_getFts5ExensionApi(env); + jFXA = s3jni_getFts5ExtensionApi(env); if( !jFXA ) goto error_oom; jpFts = new_java_Fts5Context(env, pFts); if( !jpFts ) goto error_oom; diff --git a/ext/jni/src/c/sqlite3-jni.h b/ext/jni/src/c/sqlite3-jni.h index 082a202122..6f93bf8ab7 100644 --- a/ext/jni/src/c/sqlite3-jni.h +++ b/ext/jni/src/c/sqlite3-jni.h @@ -1342,7 +1342,7 @@ JNIEXPORT jint JNICALL Java_org_sqlite_jni_capi_CApi_sqlite3_1data_1count * Method: sqlite3_db_config * Signature: (Lorg/sqlite/jni/capi/sqlite3;IILorg/sqlite/jni/capi/OutputPointer/Int32;)I */ -JNIEXPORT jint JNICALL Java_org_sqlite_jni_capi_CApi_sqlite3_1db_1config__Lorg_sqlite_jni_capi_sqlite3_2IILorg_sqlite_jni_capi_OutputPointer_Int32_2 +JNIEXPORT jint JNICALL Java_org_sqlite_jni_capi_CApi_sqlite3_1db_1config__Lorg_sqlite_jni_capi_sqlite3_2IILorg_sqlite_jni_capi_OutputPointer_00024Int32_2 (JNIEnv *, jclass, jobject, jint, jint, jobject); /* diff --git a/ext/jni/src/org/sqlite/jni/annotation/NotNull.java b/ext/jni/src/org/sqlite/jni/annotation/NotNull.java index 0c31782f23..2873082446 100644 --- a/ext/jni/src/org/sqlite/jni/annotation/NotNull.java +++ b/ext/jni/src/org/sqlite/jni/annotation/NotNull.java @@ -31,11 +31,11 @@ import java.lang.annotation.*; never pass a null value to the callback for that parameter.
Passing a null, for this annotation's definition of null, for - any parameter marked with this annoation specifically invokes + any parameter marked with this annotation specifically invokes undefined behavior (see below).
Passing 0 (i.e. C NULL) or a negative value for any long-type - parameter marked with this annoation specifically invokes undefined + parameter marked with this annotation specifically invokes undefined behavior (see below). Such values are treated as C pointers in the JNI layer.
diff --git a/ext/jni/src/org/sqlite/jni/capi/CApi.java b/ext/jni/src/org/sqlite/jni/capi/CApi.java index 13367a6102..731fb0ac3b 100644 --- a/ext/jni/src/org/sqlite/jni/capi/CApi.java +++ b/ext/jni/src/org/sqlite/jni/capi/CApi.java @@ -12,14 +12,9 @@ ** This file declares the main JNI bindings for the sqlite3 C API. */ package org.sqlite.jni.capi; -import java.nio.charset.StandardCharsets; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import org.sqlite.jni.annotation.*; import java.util.Arrays; +import java.nio.charset.StandardCharsets; +import org.sqlite.jni.annotation.*; /** This class contains the entire C-style sqlite3 JNI API binding, @@ -169,7 +164,7 @@ public final class CApi {Like the C API, it returns 0 if allocation fails or if
initialize is false and no prior aggregate context was allocated
for cx. If initialize is true then it returns 0 only on
- allocation error. In all casses, 0 is considered the sentinel
+ allocation error. In all cases, 0 is considered the sentinel
"not a key" value.
*/
public static native long sqlite3_aggregate_context(sqlite3_context cx, boolean initialize);
@@ -563,7 +558,7 @@ public final class CApi {
sqlite3_blob_open(db.getNativePointer(), dbName, tableName, columnName,
iRow, flags, out);
return out.take();
- };
+ }
private static native int sqlite3_blob_read(
@NotNull long ptrToBlob, @NotNull byte[] target, int srcOffset
@@ -1298,7 +1293,7 @@ public final class CApi {
final OutputPointer.sqlite3 out = new OutputPointer.sqlite3();
sqlite3_open(filename, out);
return out.take();
- };
+ }
public static native int sqlite3_open_v2(
@Nullable String filename, @NotNull OutputPointer.sqlite3 ppDb,
@@ -1314,7 +1309,7 @@ public final class CApi {
final OutputPointer.sqlite3 out = new OutputPointer.sqlite3();
sqlite3_open_v2(filename, out, flags, zVfs);
return out.take();
- };
+ }
/**
The sqlite3_prepare() family of functions require slightly
@@ -1410,7 +1405,7 @@ public final class CApi {
/**
Works like the canonical sqlite3_prepare_v2() but its "tail"
- output paramter is returned as the index offset into the given
+ output parameter is returned as the index offset into the given
byte array at which SQL parsing stopped.
*/
public static int sqlite3_prepare_v2(
@@ -1462,7 +1457,7 @@ public final class CApi {
/**
Works like the canonical sqlite3_prepare_v2() but its "tail"
- output paramter is returned as the index offset into the given
+ output parameter is returned as the index offset into the given
byte array at which SQL parsing stopped.
*/
public static int sqlite3_prepare_v3(
@@ -1542,7 +1537,7 @@ public final class CApi {
int rc = 0;
final OutputPointer.sqlite3_stmt outStmt = new OutputPointer.sqlite3_stmt();
while( 0==rc && pos The usage is similar for all of thes types:
+ The usage is similar for all of these types:
{@code
OutputPointer.sqlite3 out = new OutputPointer.sqlite3();
@@ -55,9 +55,9 @@ public final class OutputPointer {
/** Sets the current value to null. */
public void clear(){value = null;}
/** Returns the current value. */
- public final org.sqlite.jni.capi.sqlite3 get(){return value;}
+ public org.sqlite.jni.capi.sqlite3 get(){return value;}
/** Equivalent to calling get() then clear(). */
- public final org.sqlite.jni.capi.sqlite3 take(){
+ public org.sqlite.jni.capi.sqlite3 take(){
final org.sqlite.jni.capi.sqlite3 v = value;
value = null;
return v;
@@ -76,9 +76,9 @@ public final class OutputPointer {
/** Sets the current value to null. */
public void clear(){value = null;}
/** Returns the current value. */
- public final org.sqlite.jni.capi.sqlite3_blob get(){return value;}
+ public org.sqlite.jni.capi.sqlite3_blob get(){return value;}
/** Equivalent to calling get() then clear(). */
- public final org.sqlite.jni.capi.sqlite3_blob take(){
+ public org.sqlite.jni.capi.sqlite3_blob take(){
final org.sqlite.jni.capi.sqlite3_blob v = value;
value = null;
return v;
@@ -98,9 +98,9 @@ public final class OutputPointer {
/** Sets the current value to null. */
public void clear(){value = null;}
/** Returns the current value. */
- public final org.sqlite.jni.capi.sqlite3_stmt get(){return value;}
+ public org.sqlite.jni.capi.sqlite3_stmt get(){return value;}
/** Equivalent to calling get() then clear(). */
- public final org.sqlite.jni.capi.sqlite3_stmt take(){
+ public org.sqlite.jni.capi.sqlite3_stmt take(){
final org.sqlite.jni.capi.sqlite3_stmt v = value;
value = null;
return v;
@@ -120,9 +120,9 @@ public final class OutputPointer {
/** Sets the current value to null. */
public void clear(){value = null;}
/** Returns the current value. */
- public final org.sqlite.jni.capi.sqlite3_value get(){return value;}
+ public org.sqlite.jni.capi.sqlite3_value get(){return value;}
/** Equivalent to calling get() then clear(). */
- public final org.sqlite.jni.capi.sqlite3_value take(){
+ public org.sqlite.jni.capi.sqlite3_value take(){
final org.sqlite.jni.capi.sqlite3_value v = value;
value = null;
return v;
@@ -144,9 +144,9 @@ public final class OutputPointer {
/** Initializes with the value v. */
public Bool(boolean v){value = v;}
/** Returns the current value. */
- public final boolean get(){return value;}
+ public boolean get(){return value;}
/** Sets the current value to v. */
- public final void set(boolean v){value = v;}
+ public void set(boolean v){value = v;}
}
/**
@@ -164,9 +164,9 @@ public final class OutputPointer {
/** Initializes with the value v. */
public Int32(int v){value = v;}
/** Returns the current value. */
- public final int get(){return value;}
+ public int get(){return value;}
/** Sets the current value to v. */
- public final void set(int v){value = v;}
+ public void set(int v){value = v;}
}
/**
@@ -184,9 +184,9 @@ public final class OutputPointer {
/** Initializes with the value v. */
public Int64(long v){value = v;}
/** Returns the current value. */
- public final long get(){return value;}
+ public long get(){return value;}
/** Sets the current value. */
- public final void set(long v){value = v;}
+ public void set(long v){value = v;}
}
/**
@@ -204,9 +204,9 @@ public final class OutputPointer {
/** Initializes with the value v. */
public String(java.lang.String v){value = v;}
/** Returns the current value. */
- public final java.lang.String get(){return value;}
+ public java.lang.String get(){return value;}
/** Sets the current value. */
- public final void set(java.lang.String v){value = v;}
+ public void set(java.lang.String v){value = v;}
}
/**
@@ -224,9 +224,9 @@ public final class OutputPointer {
/** Initializes with the value v. */
public ByteArray(byte[] v){value = v;}
/** Returns the current value. */
- public final byte[] get(){return value;}
+ public byte[] get(){return value;}
/** Sets the current value. */
- public final void set(byte[] v){value = v;}
+ public void set(byte[] v){value = v;}
}
/**
@@ -246,8 +246,8 @@ public final class OutputPointer {
/** Initializes with the value v. */
public ByteBuffer(java.nio.ByteBuffer v){value = v;}
/** Returns the current value. */
- public final java.nio.ByteBuffer get(){return value;}
+ public java.nio.ByteBuffer get(){return value;}
/** Sets the current value. */
- public final void set(java.nio.ByteBuffer v){value = v;}
+ public void set(java.nio.ByteBuffer v){value = v;}
}
}
diff --git a/ext/jni/src/org/sqlite/jni/capi/PrepareMultiCallback.java b/ext/jni/src/org/sqlite/jni/capi/PrepareMultiCallback.java
index af242fb3c1..35bb069c49 100644
--- a/ext/jni/src/org/sqlite/jni/capi/PrepareMultiCallback.java
+++ b/ext/jni/src/org/sqlite/jni/capi/PrepareMultiCallback.java
@@ -65,7 +65,7 @@ public interface PrepareMultiCallback extends CallbackProxy {
A PrepareMultiCallback impl which steps entirely through a result set,
ignoring all non-error results.
*/
- public static final class StepAll implements PrepareMultiCallback {
+ final class StepAll implements PrepareMultiCallback {
public StepAll(){}
/**
Calls sqlite3_step() on st until it returns something other than
diff --git a/ext/jni/src/org/sqlite/jni/capi/SQLTester.java b/ext/jni/src/org/sqlite/jni/capi/SQLTester.java
index 634f844c24..5edd3aedb7 100644
--- a/ext/jni/src/org/sqlite/jni/capi/SQLTester.java
+++ b/ext/jni/src/org/sqlite/jni/capi/SQLTester.java
@@ -13,7 +13,6 @@
** SQLTester framework.
*/
package org.sqlite.jni.capi;
-import java.util.List;
import java.util.ArrayList;
import java.util.Arrays;
import java.nio.charset.StandardCharsets;
@@ -31,7 +30,7 @@ enum ResultBufferMode {
ESCAPED,
//! Append output as-is
ASIS
-};
+}
/**
Modes to specify how to emit multi-row output from
@@ -42,7 +41,7 @@ enum ResultRowMode {
ONELINE,
//! Add a newline between each result row.
NEWLINE
-};
+}
/**
Base exception type for test-related failures.
@@ -278,7 +277,7 @@ public class SQLTester {
}
private StringBuilder clearBuffer(StringBuilder b){
- b.setLength(0);;
+ b.setLength(0);
return b;
}
@@ -780,7 +779,7 @@ abstract class Command {
class CloseDbCommand extends Command {
public void process(SQLTester t, TestScript ts, String[] argv) throws Exception{
argcCheck(ts,argv,0,1);
- Integer id;
+ int id;
if(argv.length>1){
String arg = argv[1];
if("all".equals(arg)){
@@ -1020,7 +1019,7 @@ class VerbosityCommand extends Command {
class CommandDispatcher {
- private static java.util.Map