File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed 
src/main/java/org/mariadb/jdbc Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -324,7 +324,7 @@ public void addBatch() throws SQLException {
324324
325325 protected  void  validParameters () throws  SQLException  {
326326 for  (int  i  = 0 ; i  < parser .getParamCount (); i ++) {
327-  if  (parameters .containsKey (i )) {
327+  if  (! parameters .containsKey (i )) {
328328 throw  exceptionFactory ()
329329 .create ("Parameter at position "  + (i  + 1 ) + " is not set" , "07004" );
330330 }
Original file line number Diff line number Diff line change @@ -467,7 +467,7 @@ public void addBatch() throws SQLException {
467467 protected  void  validParameters () throws  SQLException  {
468468 if  (prepareResult  != null ) {
469469 for  (int  i  = 0 ; i  < prepareResult .getParameters ().length ; i ++) {
470-  if  (parameters .containsKey (i )) {
470+  if  (! parameters .containsKey (i )) {
471471 throw  exceptionFactory ()
472472 .create ("Parameter at position "  + (i  + 1 ) + " is not set" , "07004" );
473473 }
@@ -486,7 +486,7 @@ protected void validParameters() throws SQLException {
486486
487487 // ensure all parameters are set 
488488 for  (int  i  = 0 ; i  < parameters .size (); i ++) {
489-  if  (parameters .containsKey (i )) {
489+  if  (! parameters .containsKey (i )) {
490490 throw  exceptionFactory ()
491491 .create ("Parameter at position "  + (i  + 1 ) + " is not set" , "07004" );
492492 }
Original file line number Diff line number Diff line change @@ -23,16 +23,16 @@ public ParameterList() {
2323 }
2424
2525 public  Parameter  get (int  index ) {
26-  if  (index  +  1  >  length )
26+  if  (index  >=  length )
2727 throw  new  ArrayIndexOutOfBoundsException ("wrong index "  + index  + " length:"  + length );
2828 return  elementData [index ];
2929 }
3030
3131 public  boolean  containsKey (int  index ) {
3232 if  (index  >= 0  && length  > index ) {
33-  return  elementData [index ] = = null ;
33+  return  elementData [index ] ! = null ;
3434 }
35-  return  true ;
35+  return  false ;
3636 }
3737
3838 public  void  set (int  index , Parameter  element ) {
                                 You can’t perform that action at this time. 
               
                  
0 commit comments