Caratacus 8 jaren geleden
bovenliggende
commit
fe6f9c62b5

+ 1 - 1
mybatis-plus/src/main/java/com/baomidou/mybatisplus/mapper/SqlHelper.java

@@ -124,7 +124,7 @@ public class SqlHelper {
 	 * @return boolean
 	 */
 	public static boolean retBool(Integer result) {
-		return (null == result) ? false : result >= 1;
+		return null != result && result >= 1;
 	}
 
 	/**

+ 1 - 1
mybatis-plus/src/main/java/com/baomidou/mybatisplus/plugins/pagination/DialectFactory.java

@@ -124,7 +124,7 @@ public class DialectFactory {
 	 * @throws Exception
 	 */
 	private static IDialect getDialectByDbtype(String dbtype) throws Exception {
-		IDialect dialect = null;
+		IDialect dialect;
 		if (DBType.MYSQL.getDb().equalsIgnoreCase(dbtype)) {
 			dialect = MySqlDialect.INSTANCE;
 		} else if (DBType.ORACLE.getDb().equalsIgnoreCase(dbtype)) {

+ 2 - 2
mybatis-plus/src/main/java/com/baomidou/mybatisplus/toolkit/StringUtils.java

@@ -66,7 +66,7 @@ public class StringUtils {
 			return true;
 		}
 		for (int i = 0; i < strLen; i++) {
-			if (Character.isWhitespace(cs.charAt(i)) == false) {
+			if (!Character.isWhitespace(cs.charAt(i))) {
 				return false;
 			}
 		}
@@ -331,7 +331,7 @@ public class StringUtils {
 		if (object instanceof CharSequence) {
 			return isNotEmpty((CharSequence) object);
 		}
-		return object == null ? false : true;
+		return object != null;
 	}
 
 	/**