Skip to content

Commit 0f3e0a1

Browse files
authored
Fixed javadoc warnings (#1570)
1 parent 1b30742 commit 0f3e0a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+930
-258
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,10 +472,10 @@
472472
<plugin>
473473
<groupId>org.apache.maven.plugins</groupId>
474474
<artifactId>maven-javadoc-plugin</artifactId>
475-
<version>3.0.0</version>
475+
<version>3.2.0</version>
476476
<configuration>
477477
<failOnError>true</failOnError>
478-
<excludePackageNames>mssql.googlecode.*:mssql.security.provider.MD4</excludePackageNames>
478+
<excludePackageNames>mssql.*</excludePackageNames>
479479
</configuration>
480480
<executions>
481481
<execution>

src/main/java/com/microsoft/sqlserver/jdbc/FailOverInfo.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* to keep a lock in the class through a connection open a placeholder class is used to get the failover info in one
1515
* shot. This class should never directly expose its members.
1616
*/
17-
1817
final class FailoverInfo {
1918
private String failoverPartner;
2019
private int portNumber;

src/main/java/com/microsoft/sqlserver/jdbc/Geography.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@
1010

1111

1212
/**
13-
* Geography datatype represents data in a round-earth coordinate system.
14-
* This class will stay in this current package for backwards compatibility.
13+
* Geography datatype represents data in a round-earth coordinate system. This class will stay in this current package
14+
* for backwards compatibility.
1515
*/
16-
1716
public class Geography extends SQLServerSpatialDatatype {
1817

19-
protected Geography() {}
18+
Geography() {}
2019

2120
/**
2221
* Private constructor used for creating a Geography object from WKT and Spatial Reference Identifier.
@@ -28,7 +27,7 @@ protected Geography() {}
2827
* @throws SQLServerException
2928
* if an exception occurs
3029
*/
31-
protected Geography(String wkt, int srid) throws SQLServerException {
30+
Geography(String wkt, int srid) throws SQLServerException {
3231
if (null == wkt || wkt.length() <= 0) {
3332
throwIllegalWKT();
3433
}
@@ -91,10 +90,10 @@ public static Geography STGeomFromText(String wkt, int srid) throws SQLServerExc
9190
* Constructor for a Geography instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB)
9291
* representation.
9392
*
94-
* Note: This method currently uses internal SQL Server format (CLR) to create a Geography instance,
95-
* but in the future this will be changed to accept WKB data instead, as the SQL Server counterpart of this
96-
* method (STGeomFromWKB) uses WKB.
97-
* For existing users who are already using this method, consider switching to deserialize(byte) instead.
93+
* Note: This method currently uses internal SQL Server format (CLR) to create a Geography instance, but in the
94+
* future this will be changed to accept WKB data instead, as the SQL Server counterpart of this method
95+
* (STGeomFromWKB) uses WKB. For existing users who are already using this method, consider switching to
96+
* deserialize(byte) instead.
9897
*
9998
* @param wkb
10099
* Well-Known Binary (WKB) provided by the user.

src/main/java/com/microsoft/sqlserver/jdbc/Geometry.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@
1010

1111

1212
/**
13-
* Geometry datatype represents data in a Euclidean (flat) coordinate system.
14-
* This class will stay in this current package for backwards compatibility.
13+
* Geometry datatype represents data in a Euclidean (flat) coordinate system. This class will stay in this current
14+
* package for backwards compatibility.
1515
*/
1616

1717
public class Geometry extends SQLServerSpatialDatatype {
1818

19+
/**
20+
* Creates a Geometry object
21+
*/
1922
protected Geometry() {}
2023

2124
/**
@@ -91,10 +94,10 @@ public static Geometry STGeomFromText(String wkt, int srid) throws SQLServerExce
9194
* Constructor for a Geometry instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB)
9295
* representation.
9396
*
94-
* Note: This method currently uses internal SQL Server format (CLR) to create a Geometry instance,
95-
* but in the future this will be changed to accept WKB data instead, as the SQL Server counterpart of this
96-
* method (STGeomFromWKB) uses WKB.
97-
* For existing users who are already using this method, consider switching to deserialize(byte) instead.
97+
* Note: This method currently uses internal SQL Server format (CLR) to create a Geometry instance, but in the
98+
* future this will be changed to accept WKB data instead, as the SQL Server counterpart of this method
99+
* (STGeomFromWKB) uses WKB. For existing users who are already using this method, consider switching to
100+
* deserialize(byte) instead.
98101
*
99102
* @param wkb
100103
* Well-Known Binary (WKB) provided by the user.

src/main/java/com/microsoft/sqlserver/jdbc/IOBuffer.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,9 @@ private UTC() {}
559559
}
560560

561561

562+
/**
563+
* TDS Channel
564+
*/
562565
final class TDSChannel implements Serializable {
563566
/**
564567
* Always update serialVersionUID when prompted.

src/main/java/com/microsoft/sqlserver/jdbc/ISQLServerEnclaveProvider.java

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,28 @@
4848
* Provides an interface to create an Enclave Session
4949
*
5050
*/
51-
public interface ISQLServerEnclaveProvider {
51+
interface ISQLServerEnclaveProvider {
52+
/**
53+
* sp_describe_parameter_encryption stored procedure with 2 params
54+
*/
5255
static final String SDPE1 = "EXEC sp_describe_parameter_encryption ?,?";
56+
57+
/**
58+
* sp_describe_parameter_encryption stored procedure with 3 params
59+
*/
5360
static final String SDPE2 = "EXEC sp_describe_parameter_encryption ?,?,?";
5461

62+
/**
63+
* Get the Enclave package
64+
*
65+
* @param userSQL
66+
* user sql
67+
* @param enclaveCEKs
68+
* enclave CEKs
69+
* @return the enclave package
70+
* @throws SQLServerException
71+
* if error
72+
*/
5573
default byte[] getEnclavePackage(String userSQL, ArrayList<byte[]> enclaveCEKs) throws SQLServerException {
5674
EnclaveSession enclaveSession = getEnclaveSession();
5775
if (null != enclaveSession) {
@@ -82,6 +100,23 @@ default byte[] getEnclavePackage(String userSQL, ArrayList<byte[]> enclaveCEKs)
82100
return null;
83101
}
84102

103+
/**
104+
* Execute sp_describe_parameter_encryption for AEv2
105+
*
106+
* @param stmt
107+
* statement
108+
* @param userSql
109+
* user sql
110+
* @param preparedTypeDefinitions
111+
* prepared type definitions
112+
* @param req
113+
* request
114+
* @return result set
115+
* @throws SQLException
116+
* if error
117+
* @throws IOException
118+
* if IO exception
119+
*/
85120
default ResultSet executeSDPEv2(PreparedStatement stmt, String userSql, String preparedTypeDefinitions,
86121
BaseAttestationRequest req) throws SQLException, IOException {
87122
((SQLServerPreparedStatement) stmt).isInternalEncryptionQuery = true;
@@ -95,6 +130,19 @@ default ResultSet executeSDPEv2(PreparedStatement stmt, String userSql, String p
95130
return ((SQLServerPreparedStatement) stmt).executeQueryInternal();
96131
}
97132

133+
/**
134+
* Execute sp_describe_parameter_encryption
135+
*
136+
* @param stmt
137+
* stmt
138+
* @param userSql
139+
* user sql
140+
* @param preparedTypeDefinitions
141+
* prepared type definitions
142+
* @return result set
143+
* @throws SQLException
144+
* if error
145+
*/
98146
default ResultSet executeSDPEv1(PreparedStatement stmt, String userSql,
99147
String preparedTypeDefinitions) throws SQLException {
100148
((SQLServerPreparedStatement) stmt).isInternalEncryptionQuery = true;
@@ -107,6 +155,28 @@ default ResultSet executeSDPEv1(PreparedStatement stmt, String userSql,
107155
return ((SQLServerPreparedStatement) stmt).executeQueryInternal();
108156
}
109157

158+
/**
159+
* Process result from sp_describe_parameter_encryption
160+
*
161+
* @param userSql
162+
* user sql
163+
* @param preparedTypeDefinitions
164+
* prepared type definitions
165+
* @param params
166+
* params
167+
* @param parameterNames
168+
* param names
169+
* @param connection
170+
* connection
171+
* @param stmt
172+
* statement
173+
* @param rs
174+
* result set
175+
* @param enclaveRequestedCEKs
176+
* enclave requested CEKs
177+
* @throws SQLException
178+
* if error
179+
*/
110180
default void processSDPEv1(String userSql, String preparedTypeDefinitions, Parameter[] params,
111181
ArrayList<String> parameterNames, SQLServerConnection connection, PreparedStatement stmt, ResultSet rs,
112182
ArrayList<byte[]> enclaveRequestedCEKs) throws SQLException {

src/main/java/com/microsoft/sqlserver/jdbc/InternalSpatialDatatype.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/**
99
* Specifies the spatial data types values
1010
*/
11-
public enum InternalSpatialDatatype {
11+
enum InternalSpatialDatatype {
1212
POINT((byte) 1, "POINT"),
1313
LINESTRING((byte) 2, "LINESTRING"),
1414
POLYGON((byte) 3, "POLYGON"),

src/main/java/com/microsoft/sqlserver/jdbc/SQLServerBlob.java

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,31 @@ public final class SQLServerBlob extends SQLServerLob implements java.sql.Blob,
3636
// Unique id generator for each instance (use for logging).
3737
private static final AtomicInteger BASE_ID = new AtomicInteger(0);
3838

39-
// The value of the BLOB that this Blob object represents.
40-
// This value is never null unless/until the free() method is called.
39+
/**
40+
* The value of the BLOB that this Blob object represents. This value is never null unless/until the free() method
41+
* is called.
42+
*/
4143
private byte[] value;
4244

4345
private transient SQLServerConnection con;
46+
47+
/** check if LOB has been freed */
4448
private boolean isClosed = false;
4549

46-
// Active streams which must be closed when the Blob is closed
47-
//
48-
// Initial size of the array is based on an assumption that a Blob object is
49-
// typically used either for input or output, and then only once. The array
50-
// size
51-
// grows automatically if multiple streams are used.
50+
/**
51+
* Active streams which must be closed when the Blob is closed
52+
*
53+
* Initial size of the array is based on an assumption that a Blob object is typically used either for input or
54+
* output, and then only once. The array size grows automatically if multiple streams are used.
55+
*/
5256
ArrayList<Closeable> activeStreams = new ArrayList<>(1);
5357

58+
/** trace id */
5459
private final String traceID;
5560

61+
/**
62+
* Returns string representation of object
63+
*/
5664
public final String toString() {
5765
return traceID;
5866
}

src/main/java/com/microsoft/sqlserver/jdbc/SQLServerBulkBatchInsertRecord.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ class SQLServerBulkBatchInsertRecord extends SQLServerBulkRecord {
4747
ArrayList<String> valueList, String encoding) throws SQLServerException {
4848
initLoggerResources();
4949
if (loggerExternal.isLoggable(java.util.logging.Level.FINER)) {
50-
loggerExternal.entering(loggerPackageName, loggerClassName,
51-
new Object[] {batchParam, encoding});
50+
loggerExternal.entering(loggerPackageName, loggerClassName, new Object[] {batchParam, encoding});
5251
}
5352

5453
if (null == batchParam) {

src/main/java/com/microsoft/sqlserver/jdbc/SQLServerBulkCSVFileRecord.java

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,26 +32,38 @@ public class SQLServerBulkCSVFileRecord extends SQLServerBulkRecord implements j
3232
* Update serialVersionUID when making changes to this file
3333
*/
3434
private static final long serialVersionUID = 1546487135640225989L;
35-
/*
35+
36+
/**
3637
* Resources associated with reading in the file
3738
*/
39+
/** file reader */
3840
private BufferedReader fileReader;
41+
42+
/** input stream reader */
3943
private InputStreamReader sr;
44+
45+
/** file input stream */
4046
private FileInputStream fis;
4147

42-
/*
48+
/**
4349
* Current line of data to parse.
4450
*/
4551
private String currentLine = null;
4652

47-
/*
53+
/**
4854
* Delimiter to parse lines with.
4955
*/
5056
private final String delimiter;
5157

58+
/**
59+
* Escape delimiters
60+
*/
5261
private boolean escapeDelimiters;
5362

54-
// Regex to ignore delimiter when the field is enclosed in quotes.
63+
/**
64+
* Regex to ignore delimiter when the field is enclosed in quotes.
65+
*
66+
*/
5567
private static final String escapeSplitPattern = "(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)";
5668

5769
/*

0 commit comments

Comments
 (0)