Skip to content
Permalink
Browse files

[misc] code cleaning

(cherry picked from commit 1daec80)
  • Loading branch information...
rusher committed Feb 5, 2019
1 parent 613fa7d commit 7cc47a117c4397370702001bb1f6ead347f63b2e
Showing with 20,110 additions and 19,519 deletions.
  1. +135 −143 src/main/java/org/mariadb/jdbc/BasePrepareStatement.java
  2. +39 −39 src/main/java/org/mariadb/jdbc/BlobOutputStream.java
  3. +104 −104 src/main/java/org/mariadb/jdbc/CallParameter.java
  4. +7 −7 src/main/java/org/mariadb/jdbc/CallableFunctionStatement.java
  5. +1 −1 src/main/java/org/mariadb/jdbc/CallableParameterMetaData.java
  6. +7 −7 src/main/java/org/mariadb/jdbc/CallableProcedureStatement.java
  7. +10 −10 src/main/java/org/mariadb/jdbc/ClientSidePreparedStatement.java
  8. +106 −105 src/main/java/org/mariadb/jdbc/Driver.java
  9. +1 −1 src/main/java/org/mariadb/jdbc/LocalInfileInterceptor.java
  10. +3 −3 src/main/java/org/mariadb/jdbc/MariaDbBlob.java
  11. +78 −77 src/main/java/org/mariadb/jdbc/MariaDbConnection.java
  12. +1 −2 src/main/java/org/mariadb/jdbc/MariaDbDataSource.java
  13. +30 −30 src/main/java/org/mariadb/jdbc/MariaDbDatabaseMetaData.java
  14. +103 −104 src/main/java/org/mariadb/jdbc/MariaDbFunctionStatement.java
  15. +181 −177 src/main/java/org/mariadb/jdbc/MariaDbPooledConnection.java
  16. +112 −113 src/main/java/org/mariadb/jdbc/MariaDbProcedureStatement.java
  17. +2 −2 src/main/java/org/mariadb/jdbc/MariaDbResultSetMetaData.java
  18. +0 −1 src/main/java/org/mariadb/jdbc/MariaDbSavepoint.java
  19. +53 −55 src/main/java/org/mariadb/jdbc/MariaDbStatement.java
  20. +39 −39 src/main/java/org/mariadb/jdbc/MariaDbXid.java
  21. +0 −2 src/main/java/org/mariadb/jdbc/MySQLDataSource.java
  22. +2 −2 src/main/java/org/mariadb/jdbc/ServerSidePreparedStatement.java
  23. +366 −357 src/main/java/org/mariadb/jdbc/UrlParser.java
  24. +2 −2 src/main/java/org/mariadb/jdbc/internal/ColumnType.java
  25. +28 −28 src/main/java/org/mariadb/jdbc/internal/MariaDbServerCapabilities.java
  26. +22 −22 src/main/java/org/mariadb/jdbc/internal/com/Packet.java
  27. +360 −350 src/main/java/org/mariadb/jdbc/internal/com/read/Buffer.java
  28. +25 −25 src/main/java/org/mariadb/jdbc/internal/com/read/EndOfFilePacket.java
  29. +35 −35 src/main/java/org/mariadb/jdbc/internal/com/read/ErrorPacket.java
  30. +39 −39 src/main/java/org/mariadb/jdbc/internal/com/read/OkPacket.java
  31. +127 −128 src/main/java/org/mariadb/jdbc/internal/com/read/ReadInitialHandShakePacket.java
  32. +17 −18 src/main/java/org/mariadb/jdbc/internal/com/read/dao/CmdInformation.java
  33. +180 −182 src/main/java/org/mariadb/jdbc/internal/com/read/dao/CmdInformationBatch.java
  34. +166 −164 src/main/java/org/mariadb/jdbc/internal/com/read/dao/CmdInformationMultiple.java
  35. +110 −111 src/main/java/org/mariadb/jdbc/internal/com/read/dao/CmdInformationSingle.java
  36. +6 −5 src/main/java/org/mariadb/jdbc/internal/com/read/dao/Results.java
  37. +260 −261 src/main/java/org/mariadb/jdbc/internal/com/read/resultset/ColumnInformation.java
  38. +7 −7 src/main/java/org/mariadb/jdbc/internal/com/read/resultset/SelectResultSet.java
  39. +39 −39 src/main/java/org/mariadb/jdbc/internal/com/read/resultset/UpdatableColumnInformation.java
  40. +3 −4 src/main/java/org/mariadb/jdbc/internal/com/read/resultset/UpdatableResultSet.java
  41. +3 −3 src/main/java/org/mariadb/jdbc/internal/com/read/resultset/rowprotocol/BinaryRowProtocol.java
  42. +142 −136 src/main/java/org/mariadb/jdbc/internal/com/read/resultset/rowprotocol/RowProtocol.java
  43. +3 −3 src/main/java/org/mariadb/jdbc/internal/com/read/resultset/rowprotocol/TextRowProtocol.java
  44. +5 −5 src/main/java/org/mariadb/jdbc/internal/com/send/ComQuery.java
  45. +5 −5 src/main/java/org/mariadb/jdbc/internal/com/send/ComStmtExecute.java
  46. +105 −96 src/main/java/org/mariadb/jdbc/internal/com/send/ComStmtPrepare.java
  47. +2 −2 src/main/java/org/mariadb/jdbc/internal/com/send/SendChangeDbPacket.java
  48. +14 −15 src/main/java/org/mariadb/jdbc/internal/com/send/SendClosePacket.java
  49. +138 −157 src/main/java/org/mariadb/jdbc/internal/com/send/SendHandshakeResponsePacket.java
  50. +3 −3 src/main/java/org/mariadb/jdbc/internal/com/send/SendSslConnectionRequestPacket.java
  51. +3 −4 src/main/java/org/mariadb/jdbc/internal/com/send/authentication/AuthenticationPlugin.java
  52. +6 −7 src/main/java/org/mariadb/jdbc/internal/com/send/authentication/ClearPasswordPlugin.java
  53. +28 −30 src/main/java/org/mariadb/jdbc/internal/com/send/authentication/Ed25519PasswordPlugin.java
  54. +7 −8 src/main/java/org/mariadb/jdbc/internal/com/send/authentication/NativePasswordPlugin.java
  55. +4 −6 src/main/java/org/mariadb/jdbc/internal/com/send/authentication/OldPasswordPlugin.java
  56. +6 −5 src/main/java/org/mariadb/jdbc/internal/com/send/authentication/SendGssApiAuthPacket.java
  57. +10 −13 src/main/java/org/mariadb/jdbc/internal/com/send/authentication/SendPamAuthPacket.java
  58. +79 −75 src/main/java/org/mariadb/jdbc/internal/com/send/authentication/ed25519/Utils.java
  59. +6 −6 src/main/java/org/mariadb/jdbc/internal/com/send/authentication/ed25519/math/Constants.java
  60. +33 −29 src/main/java/org/mariadb/jdbc/internal/com/send/authentication/ed25519/math/Encoding.java
  61. +38 −37 src/main/java/org/mariadb/jdbc/internal/com/send/authentication/ed25519/math/FieldElement.java
  62. +3 −3 src/main/java/org/mariadb/jdbc/internal/com/send/authentication/ed25519/math/GroupElement.java
  63. +264 −261 ...riadb/jdbc/internal/com/send/authentication/ed25519/math/ed25519/Ed25519LittleEndianEncoding.java
  64. +896 −896 src/main/java/org/mariadb/jdbc/internal/com/send/authentication/ed25519/math/ed25519/ScalarOps.java
  65. +10 −10 ...main/java/org/mariadb/jdbc/internal/com/send/authentication/ed25519/spec/EdDSANamedCurveSpec.java
  66. +1 −1 src/main/java/org/mariadb/jdbc/internal/com/send/authentication/ed25519/spec/EdDSAParameterSpec.java
  67. +0 −1 src/main/java/org/mariadb/jdbc/internal/com/send/authentication/gssapi/GssapiAuth.java
  68. +5 −5 ...n/java/org/mariadb/jdbc/internal/com/send/authentication/gssapi/StandardGssapiAuthentication.java
  69. +6 −8 ...ava/org/mariadb/jdbc/internal/com/send/authentication/gssapi/WindowsNativeSspiAuthentication.java
  70. +36 −37 src/main/java/org/mariadb/jdbc/internal/com/send/parameters/BigDecimalParameter.java
  71. +48 −49 src/main/java/org/mariadb/jdbc/internal/com/send/parameters/ByteArrayParameter.java
  72. +33 −34 src/main/java/org/mariadb/jdbc/internal/com/send/parameters/ByteParameter.java
  73. +81 −80 src/main/java/org/mariadb/jdbc/internal/com/send/parameters/DateParameter.java
  74. +36 −37 src/main/java/org/mariadb/jdbc/internal/com/send/parameters/DefaultParameter.java
  75. +33 −35 src/main/java/org/mariadb/jdbc/internal/com/send/parameters/DoubleParameter.java
  76. +33 −35 src/main/java/org/mariadb/jdbc/internal/com/send/parameters/FloatParameter.java
  77. +33 −35 src/main/java/org/mariadb/jdbc/internal/com/send/parameters/IntParameter.java
  78. +32 −33 src/main/java/org/mariadb/jdbc/internal/com/send/parameters/LongParameter.java
  79. +46 −47 src/main/java/org/mariadb/jdbc/internal/com/send/parameters/NullParameter.java
  80. +16 −17 src/main/java/org/mariadb/jdbc/internal/com/send/parameters/ParameterHolder.java
  81. +74 −71 src/main/java/org/mariadb/jdbc/internal/com/send/parameters/SerializableParameter.java
  82. +45 −46 src/main/java/org/mariadb/jdbc/internal/com/send/parameters/StringParameter.java
  83. +3 −3 src/main/java/org/mariadb/jdbc/internal/failover/AbstractMastersListener.java
  84. +115 −116 src/main/java/org/mariadb/jdbc/internal/failover/AbstractMastersSlavesListener.java
  85. +1 −1 src/main/java/org/mariadb/jdbc/internal/failover/FailoverProxy.java
  86. +20 −20 src/main/java/org/mariadb/jdbc/internal/failover/HandleErrorResult.java
  87. +2 −2 src/main/java/org/mariadb/jdbc/internal/failover/Listener.java
  88. +1 −1 src/main/java/org/mariadb/jdbc/internal/failover/impl/MastersFailoverListener.java
  89. +82 −83 src/main/java/org/mariadb/jdbc/internal/failover/thread/ConnectionValidator.java
  90. +30 −31 src/main/java/org/mariadb/jdbc/internal/failover/thread/FailoverLoop.java
  91. +50 −50 src/main/java/org/mariadb/jdbc/internal/failover/thread/TerminableRunnable.java
  92. +49 −49 src/main/java/org/mariadb/jdbc/internal/failover/tools/SearchFilter.java
  93. +87 −84 src/main/java/org/mariadb/jdbc/internal/io/LruTraceCache.java
  94. +8 −9 src/main/java/org/mariadb/jdbc/internal/io/input/PacketInputStream.java
  95. +5 −5 src/main/java/org/mariadb/jdbc/internal/io/input/ReadAheadBufferedStream.java
  96. +2 −2 src/main/java/org/mariadb/jdbc/internal/io/input/StandardPacketInputStream.java
  97. +3 −3 src/main/java/org/mariadb/jdbc/internal/io/output/AbstractPacketOutputStream.java
  98. +317 −323 src/main/java/org/mariadb/jdbc/internal/io/output/CompressPacketOutputStream.java
  99. +37 −38 src/main/java/org/mariadb/jdbc/internal/io/output/PacketOutputStream.java
  100. +150 −147 src/main/java/org/mariadb/jdbc/internal/io/socket/NamedPipeSocket.java
  101. +291 −287 src/main/java/org/mariadb/jdbc/internal/io/socket/SharedMemorySocket.java
  102. +37 −35 src/main/java/org/mariadb/jdbc/internal/io/socket/SocketUtility.java
  103. +195 −196 src/main/java/org/mariadb/jdbc/internal/io/socket/UnixDomainSocket.java
  104. +30 −30 src/main/java/org/mariadb/jdbc/internal/logging/Logger.java
  105. +34 −34 src/main/java/org/mariadb/jdbc/internal/logging/LoggerFactory.java
  106. +90 −90 src/main/java/org/mariadb/jdbc/internal/logging/NoLogger.java
  107. +2 −2 src/main/java/org/mariadb/jdbc/internal/logging/ProtocolLoggingProxy.java
  108. +94 −94 src/main/java/org/mariadb/jdbc/internal/logging/Slf4JLogger.java
  109. +16 −16 src/main/java/org/mariadb/jdbc/internal/protocol/AbstractConnectProtocol.java
  110. +9 −9 src/main/java/org/mariadb/jdbc/internal/protocol/AbstractMultiSend.java
  111. +41 −41 src/main/java/org/mariadb/jdbc/internal/protocol/AbstractQueryProtocol.java
  112. +2 −2 src/main/java/org/mariadb/jdbc/internal/protocol/AsyncMultiRead.java
  113. +19 −20 src/main/java/org/mariadb/jdbc/internal/protocol/AsyncMultiReadResult.java
  114. +6 −6 src/main/java/org/mariadb/jdbc/internal/protocol/AuroraProtocol.java
  115. +118 −113 src/main/java/org/mariadb/jdbc/internal/protocol/MasterProtocol.java
  116. +12 −12 src/main/java/org/mariadb/jdbc/internal/protocol/MastersSlavesProtocol.java
  117. +12 −12 src/main/java/org/mariadb/jdbc/internal/protocol/Protocol.java
  118. +1 −2 src/main/java/org/mariadb/jdbc/internal/protocol/authentication/AuthenticationProviderHolder.java
  119. +4 −5 src/main/java/org/mariadb/jdbc/internal/protocol/authentication/DefaultAuthenticationProvider.java
  120. +308 −279 src/main/java/org/mariadb/jdbc/internal/protocol/tls/HostnameVerifierImpl.java
  121. +127 −108 src/main/java/org/mariadb/jdbc/internal/protocol/tls/MariaDbX509KeyManager.java
  122. +1 −1 src/main/java/org/mariadb/jdbc/internal/protocol/tls/SslFactory.java
  123. +3 −3 src/main/java/org/mariadb/jdbc/internal/util/BulkStatus.java
  124. +13 −14 src/main/java/org/mariadb/jdbc/internal/util/CallableStatementCache.java
  125. +5 −5 src/main/java/org/mariadb/jdbc/internal/util/ConnectionState.java
  126. +30 −30 src/main/java/org/mariadb/jdbc/internal/util/DefaultOptions.java
  127. +135 −135 src/main/java/org/mariadb/jdbc/internal/util/LogQueryTool.java
  128. +57 −56 src/main/java/org/mariadb/jdbc/internal/util/PidFactory.java
  129. +59 −60 src/main/java/org/mariadb/jdbc/internal/util/ServerPrepareStatementCache.java
  130. +38 −38 src/main/java/org/mariadb/jdbc/internal/util/SqlStates.java
  131. +2 −2 src/main/java/org/mariadb/jdbc/internal/util/Utils.java
  132. +12 −12 src/main/java/org/mariadb/jdbc/internal/util/constant/ColumnFlags.java
  133. +1 −1 src/main/java/org/mariadb/jdbc/internal/util/constant/HaMode.java
  134. +2 −2 src/main/java/org/mariadb/jdbc/internal/util/constant/ParameterConstant.java
  135. +13 −13 src/main/java/org/mariadb/jdbc/internal/util/constant/ServerStatus.java
  136. +6 −6 src/main/java/org/mariadb/jdbc/internal/util/constant/StateChange.java
  137. +5 −5 src/main/java/org/mariadb/jdbc/internal/util/constant/Version.java
  138. +23 −23 src/main/java/org/mariadb/jdbc/internal/util/dao/CallableStatementCacheKey.java
  139. +7 −7 src/main/java/org/mariadb/jdbc/internal/util/dao/ClientPrepareResult.java
  140. +2 −3 src/main/java/org/mariadb/jdbc/internal/util/dao/CloneableCallableStatement.java
  141. +12 −12 src/main/java/org/mariadb/jdbc/internal/util/dao/Identifier.java
  142. +2 −2 src/main/java/org/mariadb/jdbc/internal/util/dao/PrepareResult.java
  143. +3 −3 src/main/java/org/mariadb/jdbc/internal/util/dao/ReconnectDuringTransactionException.java
  144. +126 −127 src/main/java/org/mariadb/jdbc/internal/util/dao/ServerPrepareResult.java
  145. +453 −451 src/main/java/org/mariadb/jdbc/internal/util/exceptions/ExceptionMapper.java
  146. +8 −8 src/main/java/org/mariadb/jdbc/internal/util/exceptions/MaxAllowedPacketException.java
  147. +64 −64 src/main/java/org/mariadb/jdbc/internal/util/pool/GlobalStateInfo.java
  148. +518 −497 src/main/java/org/mariadb/jdbc/internal/util/pool/Pool.java
  149. +5 −5 src/main/java/org/mariadb/jdbc/internal/util/pool/PoolMBean.java
  150. +77 −73 src/main/java/org/mariadb/jdbc/internal/util/pool/Pools.java
  151. +16 −16 src/main/java/org/mariadb/jdbc/internal/util/scheduler/DynamicSizedSchedulerImpl.java
  152. +6 −6 src/main/java/org/mariadb/jdbc/internal/util/scheduler/DynamicSizedSchedulerInterface.java
  153. +9 −9 src/main/java/org/mariadb/jdbc/internal/util/scheduler/FixedSizedSchedulerImpl.java
  154. +14 −14 src/main/java/org/mariadb/jdbc/internal/util/scheduler/MariaDbThreadFactory.java
  155. +111 −108 src/main/java/org/mariadb/jdbc/internal/util/scheduler/SchedulerServiceProviderHolder.java
  156. +5 −5 src/main/resources/Version.java.template
  157. +168 −150 src/test/java/org/mariadb/jdbc/AllowMultiQueriesTest.java
  158. +28 −28 src/test/java/org/mariadb/jdbc/BaseTest.java
  159. +310 −296 src/test/java/org/mariadb/jdbc/BasicBatchTest.java
  160. +27 −24 src/test/java/org/mariadb/jdbc/BasicFailover.java
  161. +4 −2 src/test/java/org/mariadb/jdbc/BlobTest.java
  162. +3 −1 src/test/java/org/mariadb/jdbc/BooleanTest.java
  163. +197 −190 src/test/java/org/mariadb/jdbc/BufferTest.java
  164. +37 −38 src/test/java/org/mariadb/jdbc/CatalogTest.java
  165. +150 −151 src/test/java/org/mariadb/jdbc/CheckDataTest.java
  166. +2 −2 src/test/java/org/mariadb/jdbc/ClientPreparedStatementParsingTest.java
  167. +1 −2 src/test/java/org/mariadb/jdbc/ClientPreparedStatementTest.java
  168. +218 −200 src/test/java/org/mariadb/jdbc/CollationTest.java
  169. +10 −10 src/test/java/org/mariadb/jdbc/ComMultiPrepareStatementTest.java
  170. +93 −82 src/test/java/org/mariadb/jdbc/ConnectionPoolTest.java
  171. +25 −27 src/test/java/org/mariadb/jdbc/ConnectionTest.java
  172. +160 −159 src/test/java/org/mariadb/jdbc/DataNTypeTest.java
  173. +211 −192 src/test/java/org/mariadb/jdbc/DataSourcePoolTest.java
  174. +30 −10 src/test/java/org/mariadb/jdbc/DataSourceTest.java
  175. +357 −354 src/test/java/org/mariadb/jdbc/DataTypeSignedTest.java
  176. +582 −577 src/test/java/org/mariadb/jdbc/DataTypeUnsignedTest.java
  177. +1,169 −1,159 src/test/java/org/mariadb/jdbc/DatabaseMetadataTest.java
  178. +2 −2 src/test/java/org/mariadb/jdbc/DatatypeCompatibilityTest.java
  179. +1 −1 src/test/java/org/mariadb/jdbc/DateTest.java
  180. +205 −204 src/test/java/org/mariadb/jdbc/DistributedTransactionTest.java
  181. +4 −4 src/test/java/org/mariadb/jdbc/DriverTest.java
  182. +10 −8 src/test/java/org/mariadb/jdbc/ExecuteBatchTest.java
  183. +188 −184 src/test/java/org/mariadb/jdbc/FetchSizeTest.java
  184. +77 −72 src/test/java/org/mariadb/jdbc/GeneratedKeysTest.java
  185. +47 −46 src/test/java/org/mariadb/jdbc/GeneratedTest.java
  186. +85 −84 src/test/java/org/mariadb/jdbc/GeometryTest.java
  187. +37 −36 src/test/java/org/mariadb/jdbc/LocalInfileDisableTest.java
  188. +252 −243 src/test/java/org/mariadb/jdbc/LocalInfileInputStreamTest.java
  189. +4 −4 src/test/java/org/mariadb/jdbc/LocalInfileInterceptorImpl.java
  190. +227 −227 src/test/java/org/mariadb/jdbc/MariaDbBlobTest.java
  191. +1 −1 src/test/java/org/mariadb/jdbc/MariaDbClobTest.java
  192. +60 −55 src/test/java/org/mariadb/jdbc/MariaDbCompatibilityTest.java
  193. +40 −37 src/test/java/org/mariadb/jdbc/MariaDbDatabaseMetaDataTest.java
  194. +8 −6 src/test/java/org/mariadb/jdbc/MariaDbPoolDataSourceTest.java
  195. +85 −33 src/test/java/org/mariadb/jdbc/MultiTest.java
  196. +29 −29 src/test/java/org/mariadb/jdbc/MyEventListener.java
  197. +108 −100 src/test/java/org/mariadb/jdbc/ParserTest.java
  198. +107 −96 src/test/java/org/mariadb/jdbc/PasswordEncodingTest.java
  199. +74 −73 src/test/java/org/mariadb/jdbc/PooledConnectionTest.java
  200. +0 −2 src/test/java/org/mariadb/jdbc/PreparedStatementTest.java
  201. +97 −95 src/test/java/org/mariadb/jdbc/RePrepareTest.java
  202. +52 −49 src/test/java/org/mariadb/jdbc/ReconnectionStateMaxAllowedStatement.java
  203. +178 −169 src/test/java/org/mariadb/jdbc/ResultSetMetaDataTest.java
  204. +1 −0 src/test/java/org/mariadb/jdbc/ResultSetTest.java
  205. +538 −539 src/test/java/org/mariadb/jdbc/ResultSetUnsupportedMethodsTest.java
  206. +104 −105 src/test/java/org/mariadb/jdbc/ScrollTypeTest.java
  207. +13 −13 src/test/java/org/mariadb/jdbc/SerializableClass.java
  208. +969 −937 src/test/java/org/mariadb/jdbc/ServerPrepareStatementTest.java
  209. +1 −1 src/test/java/org/mariadb/jdbc/SslTest.java
  210. +117 −104 src/test/java/org/mariadb/jdbc/StateChangeTest.java
  211. +0 −1 src/test/java/org/mariadb/jdbc/StatementTest.java
  212. +2 −2 src/test/java/org/mariadb/jdbc/StoredProcedureTest.java
  213. +164 −148 src/test/java/org/mariadb/jdbc/TimeoutTest.java
  214. +47 −21 src/test/java/org/mariadb/jdbc/TimezoneDaylightSavingTimeTest.java
  215. +137 −123 src/test/java/org/mariadb/jdbc/TruncateExceptionTest.java
  216. +99 −92 src/test/java/org/mariadb/jdbc/UnicodeTest.java
  217. +920 −869 src/test/java/org/mariadb/jdbc/UpdateResultSetTest.java
  218. +52 −51 src/test/java/org/mariadb/jdbc/UtilTest.java
  219. +186 −160 src/test/java/org/mariadb/jdbc/failover/AllowMasterDownTest.java
  220. +43 −39 src/test/java/org/mariadb/jdbc/failover/AuroraAutoDiscoveryTest.java
  221. +0 −2 src/test/java/org/mariadb/jdbc/failover/AuroraFailoverTest.java
  222. +175 −164 src/test/java/org/mariadb/jdbc/failover/BaseMonoServer.java
  223. +1 −1 src/test/java/org/mariadb/jdbc/failover/BaseMultiHostTest.java
  224. +49 −23 src/test/java/org/mariadb/jdbc/failover/BaseReplication.java
  225. +69 −60 src/test/java/org/mariadb/jdbc/failover/CancelTest.java
  226. +114 −105 src/test/java/org/mariadb/jdbc/failover/GaleraFailoverTest.java
  227. +174 −161 src/test/java/org/mariadb/jdbc/failover/MonoServerFailoverTest.java
  228. +36 −35 src/test/java/org/mariadb/jdbc/failover/OldFailoverTest.java
  229. +180 −167 src/test/java/org/mariadb/jdbc/failover/ReplicationFailoverTest.java
  230. +56 −57 src/test/java/org/mariadb/jdbc/failover/TcpProxy.java
  231. +153 −150 src/test/java/org/mariadb/jdbc/failover/TcpProxySocket.java
  232. +356 −349 src/test/java/org/mariadb/jdbc/internal/protocol/tls/HostnameVerifierImplTest.java
  233. +1 −1 src/test/java/org/mariadb/jdbc/internal/util/DefaultOptionsTest.java
  234. +90 −89 src/test/java/org/mariadb/jdbc/internal/util/SchedulerServiceProviderHolderTest.java
  235. +33 −33 src/test/java/org/mariadb/jdbc/internal/util/UtilsTest.java
  236. +40 −40 src/test/java/org/mariadb/jdbc/internal/util/dao/ClientPrepareResultTest.java

Large diffs are not rendered by default.

@@ -60,51 +60,51 @@
*/
class BlobOutputStream extends OutputStream {

private int pos;
private final MariaDbBlob blob;
private final MariaDbBlob blob;
private int pos;

public BlobOutputStream(MariaDbBlob blob, int pos) {
this.blob = blob;
this.pos = pos;
}
public BlobOutputStream(MariaDbBlob blob, int pos) {
this.blob = blob;
this.pos = pos;
}

@Override
public void write(int bit) throws IOException {
@Override
public void write(int bit) throws IOException {

if (this.pos >= blob.length) {
byte[] tmp = new byte[2 * blob.length + 1];
System.arraycopy(blob.data, blob.offset, tmp, 0, blob.length);
blob.data = tmp;
pos -= blob.offset;
blob.offset = 0;
blob.length++;
}
blob.data[pos] = (byte) bit;
pos++;
if (this.pos >= blob.length) {
byte[] tmp = new byte[2 * blob.length + 1];
System.arraycopy(blob.data, blob.offset, tmp, 0, blob.length);
blob.data = tmp;
pos -= blob.offset;
blob.offset = 0;
blob.length++;
}
blob.data[pos] = (byte) bit;
pos++;
}

@Override
public void write(byte[] buf, int off, int len) throws IOException {
if (off < 0) {
throw new IOException("Invalid offset " + off);
}
int realLen = Math.min(buf.length - off, len);
if (pos + realLen >= blob.length) {
int newLen = 2 * blob.length + realLen;
byte[] tmp = new byte[newLen];
System.arraycopy(blob.data, blob.offset, tmp, 0, blob.length);
blob.data = tmp;
pos -= blob.offset;
blob.offset = 0;
blob.length = pos + realLen;
}
System.arraycopy(buf, off, blob.data, pos, realLen);
pos += realLen;
@Override
public void write(byte[] buf, int off, int len) throws IOException {
if (off < 0) {
throw new IOException("Invalid offset " + off);
}

@Override
public void write(byte[] buf) throws IOException {
write(buf, 0, buf.length);
int realLen = Math.min(buf.length - off, len);
if (pos + realLen >= blob.length) {
int newLen = 2 * blob.length + realLen;
byte[] tmp = new byte[newLen];
System.arraycopy(blob.data, blob.offset, tmp, 0, blob.length);
blob.data = tmp;
pos -= blob.offset;
blob.offset = 0;
blob.length = pos + realLen;
}
System.arraycopy(buf, off, blob.data, pos, realLen);
pos += realLen;
}

@Override
public void write(byte[] buf) throws IOException {
write(buf, 0, buf.length);
}
}

@@ -59,108 +59,108 @@
*/
class CallParameter {

private boolean isInput;
private boolean isOutput;
private int sqlType;
private int outputSqlType;
private int scale;
private String typeName;
private boolean isSigned;
private int canBeNull;
private int precision;
private String className;
private String name;

public CallParameter() {
sqlType = Types.OTHER;
outputSqlType = Types.OTHER;
}

public boolean isInput() {
return isInput;
}

public void setInput(boolean input) {
isInput = input;
}

public boolean isOutput() {
return isOutput;
}

public void setOutput(boolean output) {
isOutput = output;
}

public int getSqlType() {
return sqlType;
}

public void setSqlType(int sqlType) {
this.sqlType = sqlType;
}

public int getOutputSqlType() {
return outputSqlType;
}

public void setOutputSqlType(int outputSqlType) {
this.outputSqlType = outputSqlType;
}

public int getScale() {
return scale;
}

public void setScale(int scale) {
this.scale = scale;
}

public String getTypeName() {
return typeName;
}

public void setTypeName(String typeName) {
this.typeName = typeName;
}

public boolean isSigned() {
return isSigned;
}

public void setSigned(boolean signed) {
isSigned = signed;
}

public int getCanBeNull() {
return canBeNull;
}

public void setCanBeNull(int canBeNull) {
this.canBeNull = canBeNull;
}

public int getPrecision() {
return precision;
}

public void setPrecision(int precision) {
this.precision = precision;
}

public String getClassName() {
return className;
}

public void setClassName(String className) {
this.className = className;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}
private boolean isInput;
private boolean isOutput;
private int sqlType;
private int outputSqlType;
private int scale;
private String typeName;
private boolean isSigned;
private int canBeNull;
private int precision;
private String className;
private String name;

public CallParameter() {
sqlType = Types.OTHER;
outputSqlType = Types.OTHER;
}

public boolean isInput() {
return isInput;
}

public void setInput(boolean input) {
isInput = input;
}

public boolean isOutput() {
return isOutput;
}

public void setOutput(boolean output) {
isOutput = output;
}

public int getSqlType() {
return sqlType;
}

public void setSqlType(int sqlType) {
this.sqlType = sqlType;
}

public int getOutputSqlType() {
return outputSqlType;
}

public void setOutputSqlType(int outputSqlType) {
this.outputSqlType = outputSqlType;
}

public int getScale() {
return scale;
}

public void setScale(int scale) {
this.scale = scale;
}

public String getTypeName() {
return typeName;
}

public void setTypeName(String typeName) {
this.typeName = typeName;
}

public boolean isSigned() {
return isSigned;
}

public void setSigned(boolean signed) {
isSigned = signed;
}

public int getCanBeNull() {
return canBeNull;
}

public void setCanBeNull(int canBeNull) {
this.canBeNull = canBeNull;
}

public int getPrecision() {
return precision;
}

public void setPrecision(int precision) {
this.precision = precision;
}

public String getClassName() {
return className;
}

public void setClassName(String className) {
this.className = className;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}
}
@@ -101,7 +101,7 @@
* @throws SQLException if clientPrepareStatement creation throw an exception
*/
public CallableFunctionStatement(MariaDbConnection connection, String sql, int resultSetType,
final int resultSetConcurrency) throws SQLException {
final int resultSetConcurrency) throws SQLException {
super(connection, sql, resultSetType, resultSetConcurrency, Statement.NO_GENERATED_KEYS);
}

@@ -540,9 +540,9 @@ public Reader getCharacterStream(String parameterName) throws SQLException {
* @param parameterIndex the first parameter is 1, the second is 2,...
* @param sqlType a value from {@link Types}
* @param typeName the fully-qualified name of an SQL structured type
* @throws SQLException if the parameterIndex is not valid; if a database
* access error occurs or this method is called on a
* closed <code>CallableStatement</code>
* @throws SQLException if the parameterIndex is not valid; if a database
* access error occurs or this method is called on a
* closed <code>CallableStatement</code>
* @see Types
*/
public void registerOutParameter(int parameterIndex, int sqlType, String typeName)
@@ -573,9 +573,9 @@ public void registerOutParameter(int parameterIndex, int sqlType) throws SQLExce
* @param sqlType the SQL type code defined by <code>java.sql.Types</code>.
* @param scale the desired number of digits to the right of the decimal point. It must
* be greater than or equal to zero.
* @throws SQLException if the parameterIndex is not valid; if a database
* access error occurs or this method is called on a
* closed <code>CallableStatement</code>
* @throws SQLException if the parameterIndex is not valid; if a database
* access error occurs or this method is called on a
* closed <code>CallableStatement</code>
* @see Types
*/
@Override
@@ -89,7 +89,7 @@
* @param isFunction is it a function
*/
public CallableParameterMetaData(MariaDbConnection con, String database, String name,
boolean isFunction) {
boolean isFunction) {
this.params = null;
this.con = con;
if (database != null) {
@@ -105,7 +105,7 @@
* @throws SQLException is prepareStatement connection throw any error
*/
public CallableProcedureStatement(MariaDbConnection connection, String sql,
int resultSetScrollType, int resultSetConcurrency)
int resultSetScrollType, int resultSetConcurrency)
throws SQLException {
super(connection, sql, resultSetScrollType, resultSetConcurrency, Statement.NO_GENERATED_KEYS);
}
@@ -561,9 +561,9 @@ public Reader getCharacterStream(String parameterName) throws SQLException {
* @param parameterIndex the first parameter is 1, the second is 2,...
* @param sqlType a value from {@link Types}
* @param typeName the fully-qualified name of an SQL structured type
* @throws SQLException if the parameterIndex is not valid; if a database
* access error occurs or this method is called on a
* closed <code>CallableStatement</code>
* @throws SQLException if the parameterIndex is not valid; if a database
* access error occurs or this method is called on a
* closed <code>CallableStatement</code>
* @see Types
*/
public void registerOutParameter(int parameterIndex, int sqlType, String typeName)
@@ -594,9 +594,9 @@ public void registerOutParameter(int parameterIndex, int sqlType) throws SQLExce
* @param sqlType the SQL type code defined by <code>java.sql.Types</code>.
* @param scale the desired number of digits to the right of the decimal point. It must
* be greater than or equal to zero.
* @throws SQLException if the parameterIndex is not valid; if a database
* access error occurs or this method is called on a
* closed <code>CallableStatement</code>
* @throws SQLException if the parameterIndex is not valid; if a database
* access error occurs or this method is called on a
* closed <code>CallableStatement</code>
* @see Types
*/
@Override

0 comments on commit 7cc47a1

Please sign in to comment.
You can’t perform that action at this time.