Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #825

Merged
merged 1 commit into from
Oct 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
### Changed
- Switched to clean rounding for bigDecimal [#118](https://github.com/Microsoft/mssql-jdbc/pull/118)
- Updated BVT tests to use jUnit test framework [#120](https://github.com/Microsoft/mssql-jdbc/pull/120)
- In case of socket timeout occurance, avoid connection retry [#122](https://github.com/Microsoft/mssql-jdbc/pull/122)
- In case of socket timeout occurrence, avoid connection retry [#122](https://github.com/Microsoft/mssql-jdbc/pull/122)
- Changed ant build file to skip tests [#126](https://github.com/Microsoft/mssql-jdbc/pull/126)

### Fixed Issues
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/microsoft/sqlserver/jdbc/DDC.java
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,7 @@ static String convertReaderToString(Reader reader, int readerLength) throws SQLS
try {
// Set up a StringBuilder big enough to hold the Reader value. If we weren't told the size of
// the value then start with a "reasonable" guess StringBuilder size. If necessary, the StringBuilder
// will grow automatically to accomodate arbitrary amounts of data.
// will grow automatically to accommodate arbitrary amounts of data.
StringBuilder sb = new StringBuilder(
(DataTypes.UNKNOWN_STREAM_LENGTH != readerLength) ? readerLength : 4000);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

/**
*
* This class is used to handle exceptions that may be recieved from sqljdbc_auth.dll and sqljdbc_xa.dll
* This class is used to handle exceptions that may be received from sqljdbc_auth.dll and sqljdbc_xa.dll
*
*/
class DLLException extends Exception {
Expand Down
36 changes: 18 additions & 18 deletions src/main/java/com/microsoft/sqlserver/jdbc/IOBuffer.java
Original file line number Diff line number Diff line change
Expand Up @@ -2484,7 +2484,7 @@ private void findSocketUsingJavaNIO(InetAddress[] inetAddrs, int portNumber,
} catch (IOException ex) {
if (logger.isLoggable(Level.FINER))
logger.finer(this.toString() + " the exception: " + ex.getClass() + " with message: "
+ ex.getMessage() + " occured while processing the channel: " + ch);
+ ex.getMessage() + " occurred while processing the channel: " + ch);
updateSelectedException(ex, this.toString());
// close the channel pro-actively so that we do not
// rely to network resources
Expand Down Expand Up @@ -2913,7 +2913,7 @@ public void run() {
} catch (IOException ex) {
if (logger.isLoggable(Level.FINER)) {
logger.finer(this.toString() + " exception:" + ex.getClass() + " with message:" + ex.getMessage()
+ " occured while connecting to InetSocketAddress:" + inetSocketAddress);
+ " occurred while connecting to InetSocketAddress:" + inetSocketAddress);
}
exception = ex;
}
Expand Down Expand Up @@ -3281,7 +3281,7 @@ void writeBigDecimal(BigDecimal bigDecimalVal, int srcJdbcType, int precision,
*/

/*
* setScale of all BigDecimal value based on metadata as scale is not sent seperately for individual value. Use
* setScale of all BigDecimal value based on metadata as scale is not sent separately for individual value. Use
* the rounding used in Server. Say, for BigDecimal("0.1"), if scale in metdadata is 0, then ArithmeticException
* would be thrown if RoundingMode is not set
*/
Expand Down Expand Up @@ -4099,7 +4099,7 @@ void flush(boolean atEOM) throws SQLServerException {
* @param sName
* the optional parameter name
* @param bOut
* boolean true if the value that follows is being registered as an ouput parameter
* boolean true if the value that follows is being registered as an output parameter
* @param tdsType
* TDS type of the value that follows
*/
Expand Down Expand Up @@ -4130,7 +4130,7 @@ void writeRPCNameValType(String sName, boolean bOut, TDSType tdsType) throws SQL
* @param booleanValue
* the data value
* @param bOut
* boolean true if the data value is being registered as an ouput parameter
* boolean true if the data value is being registered as an output parameter
*/
void writeRPCBit(String sName, Boolean booleanValue, boolean bOut) throws SQLServerException {
writeRPCNameValType(sName, bOut, TDSType.BITN);
Expand All @@ -4151,7 +4151,7 @@ void writeRPCBit(String sName, Boolean booleanValue, boolean bOut) throws SQLSer
* @param shortValue
* the data value
* @param bOut
* boolean true if the data value is being registered as an ouput parameter
* boolean true if the data value is being registered as an output parameter
*/
void writeRPCByte(String sName, Byte byteValue, boolean bOut) throws SQLServerException {
writeRPCNameValType(sName, bOut, TDSType.INTN);
Expand All @@ -4172,7 +4172,7 @@ void writeRPCByte(String sName, Byte byteValue, boolean bOut) throws SQLServerEx
* @param shortValue
* the data value
* @param bOut
* boolean true if the data value is being registered as an ouput parameter
* boolean true if the data value is being registered as an output parameter
*/
void writeRPCShort(String sName, Short shortValue, boolean bOut) throws SQLServerException {
writeRPCNameValType(sName, bOut, TDSType.INTN);
Expand All @@ -4193,7 +4193,7 @@ void writeRPCShort(String sName, Short shortValue, boolean bOut) throws SQLServe
* @param intValue
* the data value
* @param bOut
* boolean true if the data value is being registered as an ouput parameter
* boolean true if the data value is being registered as an output parameter
*/
void writeRPCInt(String sName, Integer intValue, boolean bOut) throws SQLServerException {
writeRPCNameValType(sName, bOut, TDSType.INTN);
Expand All @@ -4214,7 +4214,7 @@ void writeRPCInt(String sName, Integer intValue, boolean bOut) throws SQLServerE
* @param longValue
* the data value
* @param bOut
* boolean true if the data value is being registered as an ouput parameter
* boolean true if the data value is being registered as an output parameter
*/
void writeRPCLong(String sName, Long longValue, boolean bOut) throws SQLServerException {
writeRPCNameValType(sName, bOut, TDSType.INTN);
Expand All @@ -4235,7 +4235,7 @@ void writeRPCLong(String sName, Long longValue, boolean bOut) throws SQLServerEx
* @param floatValue
* the data value
* @param bOut
* boolean true if the data value is being registered as an ouput parameter
* boolean true if the data value is being registered as an output parameter
*/
void writeRPCReal(String sName, Float floatValue, boolean bOut) throws SQLServerException {
writeRPCNameValType(sName, bOut, TDSType.FLOATN);
Expand Down Expand Up @@ -4269,7 +4269,7 @@ void writeRPCSqlVariant(String sName, SqlVariant sqlVariantValue, boolean bOut)
* @param doubleValue
* the data value
* @param bOut
* boolean true if the data value is being registered as an ouput parameter
* boolean true if the data value is being registered as an output parameter
*/
void writeRPCDouble(String sName, Double doubleValue, boolean bOut) throws SQLServerException {
writeRPCNameValType(sName, bOut, TDSType.FLOATN);
Expand Down Expand Up @@ -4303,7 +4303,7 @@ void writeRPCDouble(String sName, Double doubleValue, boolean bOut) throws SQLSe
* @param nScale
* the desired scale
* @param bOut
* boolean true if the data value is being registered as an ouput parameter
* boolean true if the data value is being registered as an output parameter
*/
void writeRPCBigDecimal(String sName, BigDecimal bdValue, int nScale, boolean bOut) throws SQLServerException {
writeRPCNameValType(sName, bOut, TDSType.DECIMALN);
Expand Down Expand Up @@ -4364,7 +4364,7 @@ void writeRPCStringUnicode(String sValue) throws SQLServerException {
* @param sValue
* the data value
* @param bOut
* boolean true if the data value is being registered as an ouput parameter
* boolean true if the data value is being registered as an output parameter
* @param collation
* the collation of the data value
*/
Expand Down Expand Up @@ -4679,7 +4679,7 @@ private void writeInternalTVPRowValues(JDBCType jdbcType, String currentColumnSt
BigDecimal bdValue = new BigDecimal(currentColumnStringValue);

/*
* setScale of all BigDecimal value based on metadata as scale is not sent seperately for individual
* setScale of all BigDecimal value based on metadata as scale is not sent separately for individual
* value. Use the rounding used in Server. Say, for BigDecimal("0.1"), if scale in metdadata is 0,
* then ArithmeticException would be thrown if RoundingMode is not set
*/
Expand Down Expand Up @@ -5239,7 +5239,7 @@ void writeRPCByteArray(String sName, byte bValue[], boolean bOut, JDBCType jdbcT
* @param subSecondNanos
* the sub-second nanoseconds (0 - 999,999,999)
* @param bOut
* boolean true if the data value is being registered as an ouput parameter
* boolean true if the data value is being registered as an output parameter
*
*/
void writeRPCDateTime(String sName, GregorianCalendar cal, int subSecondNanos,
Expand Down Expand Up @@ -5934,7 +5934,7 @@ private byte[] scaledNanosToEncodedBytes(long scaledNanos, int encodedLength) {
* @param streamLength
* length of the stream (may be unknown)
* @param bOut
* boolean true if the data value is being registered as an ouput parameter
* boolean true if the data value is being registered as an output parameter
* @param jdbcType
* The JDBC type used to determine whether the value is textual or non-textual.
* @param collation
Expand Down Expand Up @@ -6033,7 +6033,7 @@ void writeRPCInputStream(String sName, InputStream stream, long streamLength, bo
* @param streamLength
* length of the stream (may be unknown)
* @param bOut
* boolean true if the data value is being registered as an ouput parameter
* boolean true if the data value is being registered as an output parameter
* @throws SQLServerException
*/
void writeRPCXML(String sName, InputStream stream, long streamLength, boolean bOut) throws SQLServerException {
Expand Down Expand Up @@ -6072,7 +6072,7 @@ void writeRPCXML(String sName, InputStream stream, long streamLength, boolean bO
* @param reLength
* the reader data length (in characters)
* @param bOut
* boolean true if the data value is being registered as an ouput parameter
* boolean true if the data value is being registered as an output parameter
* @param collation
* The SQL collation associated with the value. Null for non-textual SQL Server types.
* @throws SQLServerException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,19 +142,19 @@ private static byte[] decryptRSAOAEP(byte[] cipherText,
private static boolean verifyRSASignature(byte[] hash, byte[] signature, X509Certificate certificate,
String masterKeyPath) throws SQLServerException {
Signature signVerify;
boolean verificationSucess = false;
boolean verificationSuccess = false;
try {
signVerify = Signature.getInstance("SHA256withRSA");
signVerify.initVerify(certificate.getPublicKey());
signVerify.update(hash);
verificationSucess = signVerify.verify(signature);
verificationSuccess = signVerify.verify(signature);
} catch (InvalidKeyException | NoSuchAlgorithmException | SignatureException e) {
MessageFormat form = new MessageFormat(SQLServerException.getErrString("R_InvalidCertificateSignature"));
Object[] msgArgs = {masterKeyPath};
throw new SQLServerException(form.format(msgArgs), e);
}

return verificationSucess;
return verificationSuccess;

}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/microsoft/sqlserver/jdbc/Parameter.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ final class Parameter {
// Value type info for OUT parameters (excluding return status)
private TypeInfo typeInfo;

// For unencrypted paramters cryptometa will be null. For encrypted parameters it will hold encryption metadata.
// For unencrypted parameters cryptometa will be null. For encrypted parameters it will hold encryption metadata.
CryptoMetadata cryptoMeta = null;

TypeInfo getTypeInfo() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2265,51 +2265,51 @@ public void registerOutParameter(String parameterName, int sqlType) throws SQLSe
}

@Override
public void registerOutParameter(int paramterIndex, SQLType sqlType) throws SQLServerException {
public void registerOutParameter(int parameterIndex, SQLType sqlType) throws SQLServerException {

if (loggerExternal.isLoggable(java.util.logging.Level.FINER))
loggerExternal.entering(getClassNameLogging(), "registerOutParameter",
new Object[] {paramterIndex, sqlType});
new Object[] {parameterIndex, sqlType});

// getVendorTypeNumber() returns the same constant integer values as in java.sql.Types
registerOutParameter(paramterIndex, sqlType.getVendorTypeNumber());
registerOutParameter(parameterIndex, sqlType.getVendorTypeNumber());
loggerExternal.exiting(getClassNameLogging(), "registerOutParameter");
}

@Override
public void registerOutParameter(int paramterIndex, SQLType sqlType, String typeName) throws SQLServerException {
public void registerOutParameter(int parameterIndex, SQLType sqlType, String typeName) throws SQLServerException {

if (loggerExternal.isLoggable(java.util.logging.Level.FINER))
loggerExternal.entering(getClassNameLogging(), "registerOutParameter",
new Object[] {paramterIndex, sqlType, typeName});
new Object[] {parameterIndex, sqlType, typeName});

// getVendorTypeNumber() returns the same constant integer values as in java.sql.Types
registerOutParameter(paramterIndex, sqlType.getVendorTypeNumber(), typeName);
registerOutParameter(parameterIndex, sqlType.getVendorTypeNumber(), typeName);
loggerExternal.exiting(getClassNameLogging(), "registerOutParameter");
}

@Override
public void registerOutParameter(int paramterIndex, SQLType sqlType, int scale) throws SQLServerException {
public void registerOutParameter(int parameterIndex, SQLType sqlType, int scale) throws SQLServerException {

if (loggerExternal.isLoggable(java.util.logging.Level.FINER))
loggerExternal.entering(getClassNameLogging(), "registerOutParameter",
new Object[] {paramterIndex, sqlType, scale});
new Object[] {parameterIndex, sqlType, scale});

// getVendorTypeNumber() returns the same constant integer values as in java.sql.Types
registerOutParameter(paramterIndex, sqlType.getVendorTypeNumber(), scale);
registerOutParameter(parameterIndex, sqlType.getVendorTypeNumber(), scale);
loggerExternal.exiting(getClassNameLogging(), "registerOutParameter");
}

@Override
public void registerOutParameter(int paramterIndex, SQLType sqlType, int precision,
public void registerOutParameter(int parameterIndex, SQLType sqlType, int precision,
int scale) throws SQLServerException {

if (loggerExternal.isLoggable(java.util.logging.Level.FINER))
loggerExternal.entering(getClassNameLogging(), "registerOutParameter",
new Object[] {paramterIndex, sqlType, scale});
new Object[] {parameterIndex, sqlType, scale});

// getVendorTypeNumber() returns the same constant integer values as in java.sql.Types
registerOutParameter(paramterIndex, sqlType.getVendorTypeNumber(), precision, scale);
registerOutParameter(parameterIndex, sqlType.getVendorTypeNumber(), precision, scale);
loggerExternal.exiting(getClassNameLogging(), "registerOutParameter");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ public int setString(long pos, String s) throws SQLException {
* Writes len characters of str, starting at character offset, to the CLOB value that this Clob represents. The
* string will overwrite the existing characters in the Clob object starting at the position pos. If the end of the
* Clob value is reached while writing the given string, then the length of the Clob value will be increased to
* accomodate the extra characters.
* accommodate the extra characters.
*
* SQL Server behavior: If the value specified for pos is greater than then length+1 of the CLOB value then a
* SQLException is thrown.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ static ParsedSQLCacheItem parseAndCacheSQL(CityHash128Key key, String sql) throw
* Locates statement parameters.
*
* @param sql
* SQL text to parse for positions of parameters to intialize.
* SQL text to parse for positions of parameters to initialize.
*/
private static int[] locateParams(String sql) {
LinkedList<Integer> parameterPositions = new LinkedList<>();
Expand Down Expand Up @@ -2326,8 +2326,8 @@ static int TimerRemaining(long timerExpire) {
// maximum timeout the socket takes is int max.
if (result > Integer.MAX_VALUE)
result = Integer.MAX_VALUE;
// we have to make sure that we return atleast one ms
// we want atleast one attempt to happen with a positive timeout passed by the user.
// we have to make sure that we return at least one ms
// we want at least one attempt to happen with a positive timeout passed by the user.
if (result <= 0)
result = 1;
return (int) result;
Expand Down Expand Up @@ -5453,7 +5453,7 @@ protected void endRequestInternal() throws SQLException {
}

/**
* Replaces JDBC syntax parameter markets '?' with SQL Server paramter markers @p1, @p2 etc...
* Replaces JDBC syntax parameter markets '?' with SQL Server parameter markers @p1, @p2 etc...
*
* @param sql
* the user's SQL
Expand Down Expand Up @@ -5502,7 +5502,7 @@ String replaceParameterMarkers(String sqlSrc, int[] paramPositions, Parameter[]
* @param nParam
* the parameter number
* @param name
* the paramter name
* the parameter name
* @param offset
* @return int
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ public java.sql.ResultSet getCatalogs() throws SQLServerException, SQLTimeoutExc
loggerExternal.finer(toString() + " ActivityId: " + ActivityCorrelator.getNext().toString());
}
checkClosed();
// Return the orginal case instead of CAPS.removed Upper().
// Return the original case instead of CAPS.removed Upper().
String s = "SELECT name AS TABLE_CAT FROM sys.databases order by name"; // Need
// to
// match
Expand Down Expand Up @@ -531,7 +531,7 @@ private static String EscapeIDName(String inID) throws SQLServerException {
// \x -> \x where x is any char other than the ones above.

char ch;
// Add 2 extra chars wild guess thinking atleast one escape.
// Add 2 extra chars wild guess thinking at least one escape.
StringBuilder outID = new StringBuilder(inID.length() + 2);

for (int i = 0; i < inID.length(); i++) {
Expand Down
Loading