Skip to content

Commit 1d1a4ed

Browse files
Merge pull request #223 from cconlon/java20Warnings
JNI/JSSE: clean up ant build warnings for Corretto 20.0.1
2 parents 370ada7 + 9d66046 commit 1d1a4ed

File tree

6 files changed

+32
-5
lines changed

6 files changed

+32
-5
lines changed

src/java/com/wolfssl/WolfSSLCertificate.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,23 @@ public class WolfSSLCertificate implements Serializable {
5454

5555
private static final long serialVersionUID = 1L;
5656

57+
/** Flag if this class is active or not */
5758
private boolean active = false;
59+
60+
/** Internal pointer for native WOLFSSL_X509 */
5861
private long x509Ptr = 0;
5962

60-
/* Does this WolfSSLCertificate own the internal WOLFSSL_X509 pointer?
63+
/** Does this WolfSSLCertificate own the internal WOLFSSL_X509 pointer?
6164
* If not, don't try to free native memory on free(). */
6265
private boolean weOwnX509Ptr = false;
6366

64-
/* lock around active state */
67+
/** lock around active state */
6568
private transient final Object stateLock = new Object();
6669

67-
/* lock around native WOLFSSL_X509 pointer use */
70+
/** lock around native WOLFSSL_X509 pointer use */
6871
private transient final Object x509Lock = new Object();
6972

70-
/* cache alt names once retrieved once */
73+
/** Cache alt names once retrieved once */
7174
private ArrayList<List<?>> altNames = null;
7275

7376
/* Public key types used for certificate generation, mirrored from

src/java/com/wolfssl/provider/jsse/WolfSSLDebug.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ public class WolfSSLDebug {
6767
*/
6868
private static WolfSSLNativeLoggingCallback nativeLogCb = null;
6969

70+
/**
71+
* Default constructor for wolfJSSE debug class.
72+
*/
73+
public WolfSSLDebug() {
74+
}
75+
7076
/**
7177
* Check if "wolfjsse.debug" System property is set to "true".
7278
*
@@ -163,6 +169,7 @@ private static synchronized void logJSONHex(String tag, String label,
163169
* "thread_id": "thread_ID"
164170
* }
165171
*
172+
* @param <T> class type of cl
166173
* @param cl class being called from to get debug info
167174
* @param tag level of debug message i.e. WolfSSLDebug.INFO
168175
* @param string message to be printed out
@@ -205,6 +212,7 @@ public static synchronized <T> void log(Class<T> cl, String tag,
205212
* "thread_id": "thread_ID"
206213
* }
207214
*
215+
* @param <T> class type for cl
208216
* @param cl class this method is being called from
209217
* @param tag level of debug message i.e. WolfSSLDebug.INFO
210218
* @param label label string to print with hex

src/java/com/wolfssl/provider/jsse/WolfSSLEngineHelper.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,6 +1413,9 @@ protected synchronized int saveSession() {
14131413
return WolfSSL.SSL_FAILURE;
14141414
}
14151415

1416+
/**
1417+
* Clear internal state of this WolfSSLEngineHelper.
1418+
*/
14161419
protected synchronized void clearObjectState() {
14171420
this.ssl = null;
14181421
this.session = null;

src/java/com/wolfssl/provider/jsse/WolfSSLImplementSSLSession.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,9 @@ protected synchronized void setResume() {
831831
}
832832
}
833833

834+
/**
835+
* Update internally-stored session values.
836+
*/
834837
protected synchronized void updateStoredSessionValues() {
835838

836839
try {

src/java/com/wolfssl/provider/jsse/WolfSSLSessionContext.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ public class WolfSSLSessionContext implements SSLSessionContext {
4343
* WolfSSLAuthStore not given as parameter in this constructor, caller
4444
* should explicitly set with WolfSSLSessionContext.setWolfSSLAuthStore().
4545
*
46-
* @param in WolfSSLAuthStore object to use with this context
4746
* @param defaultCacheSize default session cache size
4847
* @param side client or server side. Either WolfSSL.WOLFSSL_CLIENT_END or
4948
* WolfSSL.WOLFSSL_SERVER_END
@@ -70,6 +69,11 @@ public WolfSSLSessionContext(WolfSSLAuthStore in, int defaultCacheSize,
7069
this.side = side;
7170
}
7271

72+
/**
73+
* Set WolfSSLAuthStore for this object.
74+
*
75+
* @param store WolfSSLAuthStore to use with this object
76+
*/
7377
public void setWolfSSLAuthStore(WolfSSLAuthStore store) {
7478
this.store = store;
7579
}

src/java/com/wolfssl/provider/jsse/WolfSSLUtil.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@
4242
*/
4343
public class WolfSSLUtil {
4444

45+
/**
46+
* Default constructor for WolfSSLUtil class.
47+
*/
48+
public WolfSSLUtil() {
49+
}
50+
4551
/**
4652
* Sanitize or filter protocol list based on system property limitations.
4753
*

0 commit comments

Comments
 (0)