@@ -313,7 +313,7 @@ public boolean createSchema (String schemaName) throws MetadataException
313313 {
314314 throw new MetadataException ("response token does not match." );
315315 }
316- return ( response . getHeader (). getErrorCode () == 0 ) ? true : false ;
316+ return true ;
317317 }
318318
319319 public boolean dropSchema (String schemaName ) throws MetadataException
@@ -329,7 +329,7 @@ public boolean dropSchema (String schemaName) throws MetadataException
329329 throw new MetadataException ("failed to drop schema. error code=" + response .getHeader ().getErrorCode ()
330330 + ", error message=" + response .getHeader ().getErrorMsg ());
331331 }
332- return ( response . getHeader (). getErrorCode () == 0 ) ? true : false ;
332+ return true ;
333333 }
334334
335335 public boolean createTable (String schemaName , String tableName , List <Column > columns ) throws MetadataException
@@ -359,7 +359,7 @@ public boolean createTable (String schemaName, String tableName, List<Column> co
359359 {
360360 throw new MetadataException ("response token does not match." );
361361 }
362- return ( response . getHeader (). getErrorCode () == 0 ) ? true : false ;
362+ return true ;
363363 }
364364
365365 public boolean dropTable (String schemaName , String tableName ) throws MetadataException
@@ -381,7 +381,7 @@ public boolean dropTable (String schemaName, String tableName) throws MetadataEx
381381 {
382382 throw new MetadataException ("response token does not match." );
383383 }
384- return ( response . getHeader (). getErrorCode () == 0 ) ? true : false ;
384+ return true ;
385385 }
386386
387387 public boolean existTable (String schemaName , String tableName ) throws MetadataException
@@ -403,6 +403,6 @@ public boolean existTable (String schemaName, String tableName) throws MetadataE
403403 {
404404 throw new MetadataException ("response token does not match." );
405405 }
406- return ( response .getHeader (). getErrorCode () == 0 ) ? true : false ;
406+ return response .getExists () ;
407407 }
408408}
0 commit comments