Skip to content
CAI
Software that uses CAICheck a score

mybatis/mybatis-3

66.4

Adequate · 25 September 2026

35.3k

lines of production code

Java

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is MyBatis, a Java persistence framework that maps database operations to Java objects using XML configurations, annotations, and dynamic SQL. It provides features for lazy loading, caching, and transaction management, while supporting streaming large result sets via cursors and custom scripting languages. The codebase also includes utilities for reflection, type handling, and plugin-based interception of core execution components.

How it got here

2010 — Java 11 upgrade and core refactoring

107 changes.

The project upgraded its build environment to Java 11 and migrated the test suite to JUnit 5, while removing legacy modules like OGNL and Migration. Significant internal refactoring modernized the executor, caching, and reflection systems, introducing Cursor support for streaming results and enhancing type safety. The release also added support for Java 8 Date/Time APIs and improved mapper annotation capabilities.

2011–2013 — Dynamic SQL refactoring and test expansion

78 changes.

This period focused on refactoring the dynamic SQL scripting engine to support pluggable language drivers and introducing the \<bind\> tag, alongside deprecating CGLIB in favor of Javassist for lazy-loading proxies. The work was heavily supported by extensive test coverage additions across diverse features, including generic type handling, cache behavior, and complex mapping scenarios.

2014–2019 — Cursor API and test coverage expansion

71 changes.

This period focused on introducing the Cursor interface to enable lazy, memory-efficient fetching of large result sets, accompanied by comprehensive integration tests for the new feature. The work also involved extensive expansion of test coverage across various MyBatis subsystems, including type handlers, generic type resolution, and complex mapping scenarios, while modernizing test infrastructure with JUnit 5 and Testcontainers.

2020–2026 — test coverage expansion and schema updates

28 changes.

This period focused on significantly expanding unit test coverage across MyBatis components, including reflection, data sources, transactions, and complex mapping scenarios like immutable constructors and cursor memory usage. Concurrently, the project updated its XML schema and DTD definitions to support new configuration attributes and dynamic SQL features, while establishing build and code quality standards through Maven extensions and pre-commit hooks.

Features

Add national flag icons to language selection menus

The site's language selection menus now display national flag icons next to each language option. This is achieved by adding identical CSS files to the French, Japanese, and Korean resource directories, which define background images for language list items (English, Spanish, Japanese, French, Chinese, and Korean) using flag images sourced from printableworldflags.com.

src/site/fr/resources, src/site/ja/resources, src/site/ko/resources · high confidence

Add site stylesheet for i18n flag icons and utility classes

A new CSS file (site.css) is introduced to style the site's internationalization (i18n) navigation. It defines list styles for language links (English, Spanish, Japanese, French, Chinese, Korean) that display specific flag icons as background images, and includes a utility class (.d-none) to hide elements.

src/site/resources/css · high confidence

Added Log4j 2 logging implementation

Users can now use Apache Log4j 2 as the underlying logging framework for MyBatis. This change introduces a new \org.apache.ibatis.logging.log4j2\ package containing \Log4j2Impl\, \Log4j2LoggerImpl\, and \Log4j2AbstractLoggerImpl\, which bridge MyBatis's logging interface to Log4j 2's API, ensuring proper marker handling and message factory usage for compatible Log4j 2 configurations.

src/main/java/org/apache/ibatis/logging/log4j2 · high confidence

Collection support and generic type introspection in reflection wrappers

The reflection wrapper system now supports collections directly via a new CollectionWrapper and updated ObjectWrapper interface methods (isCollection, add, addAll), enabling proper handling of indexed properties on collections. Additionally, the ObjectWrapper interface introduces default methods for generic type introspection (getGenericSetterType, getGenericGetterType), allowing the framework to preserve and expose generic type information during property access.

src/main/java/org/apache/ibatis/reflection/wrapper · high confidence

Introduce Cursor interface for lazy, memory-efficient result fetching

Added the Cursor interface in the org.apache.ibatis.cursor package, enabling users to handle large result sets (millions of items) that do not fit in memory by fetching items lazily via an Iterator. The interface extends AutoCloseable and Iterable, providing methods to check if the cursor is open or fully consumed, retrieve the current item index, and close the cursor. This feature is designed for use with ordered result maps (resultOrdered="true") to ensure correct iteration over database results.

src/main/java/org/apache/ibatis/cursor · high confidence

Introduce DefaultCursor implementation for MyBatis Cursor API

This change adds the default implementation of the MyBatis Cursor interface, specifically the DefaultCursor class and its supporting package-info file. For users, this provides the underlying mechanism that enables cursor-based result processing, allowing large result sets to be fetched and iterated over incrementally rather than loaded entirely into memory. The implementation handles the lifecycle of the underlying JDBC ResultSet, manages status transitions (CREATED, OPEN, CLOSED, CONSUMED), and integrates with RowBounds for pagination support.

src/main/java/org/apache/ibatis/cursor/defaults · high confidence

Introduce Javassist-based lazy loading proxy factory

Added a new Javassist implementation of the proxy factory (JavassistProxyFactory) to handle lazy loading of result objects. This component creates dynamic proxies that intercept method calls to trigger lazy loading of properties, supports serialization via a dedicated state holder (JavassistSerialStateHolder) to preserve unloaded properties, and uses a ReentrantLock for thread-safe access during proxy invocation.

src/main/java/org/apache/ibatis/executor/loader/javassist · high confidence

Introduction of pluggable scripting language drivers for dynamic SQL

MyBatis now supports custom scripting languages for dynamic SQL generation through a new extensible driver system. Users can implement the new LanguageDriver interface to define how SQL is parsed and parameterized, and register these drivers via the LanguageDriverRegistry. This change introduces ScriptingException for error handling and provides the core infrastructure (LanguageDriver, LanguageDriverRegistry) to allow third-party or custom SQL language implementations to be plugged into the framework.

src/main/java/org/apache/ibatis/scripting · high confidence

MyBatis annotation API enhancements and new mapping annotations

The \org.apache.ibatis.annotations\ package has been significantly expanded and refined to support more flexible and type-safe mapper definitions. New annotations have been introduced: \@AutomapConstructor\ to mark constructors for automatic mapping, \@Flush\ to invoke flush statements via the mapper interface, \@NamedResultMap\ and \@NamedResultMaps\ to define reusable result maps attached to a type, and \@ResultOrdered\ to indicate that a result set is ordered (required for collections in constructors). Existing annotations have been enhanced: \@Arg\ and \@ConstructorArgs\ now support \columnPrefix\ and \name\ attributes for parameter-name-based mapping; \@One\ and \@Many\ now support \columnPrefix\ and \resultMap\; \@CacheNamespace\ now supports \@Property\ injection for custom cache implementations; \@CacheNamespaceRef\ allows referencing caches by name; \@SelectKey\ supports multiple keys and database IDs; and SQL provider annotations (\@InsertProvider\, \@DeleteProvider\, etc.) allow omitting the \method\ attribute and support database IDs. Additionally, \@ResultMap\ now accepts multiple names, and \@ResultType\ enables type specification for \ResultHandler\-based \@Select\ methods.

src/main/java/org/apache/ibatis/annotations · high confidence

New Maven configuration and extension setup

The project now includes a new Maven extension configuration that enables the maven-profiler (version 3.3) to provide build performance insights. Additionally, default Maven settings are defined to configure secure deployment servers for Sonatype central, GitHub Pages, and the NVD API, while JVM and Maven configurations enforce SHA-512 checksums and disable transfer progress for cleaner logs.

.mvn · high confidence

New SqlSessionManager and configurable auto-mapping behavior

MyBatis now provides SqlSessionManager, a convenience class that manages SqlSession instances via ThreadLocal to simplify session lifecycle in multi-threaded environments. Additionally, the new AutoMappingUnknownColumnBehavior enum allows users to configure how MyBatis handles unknown columns during auto-mapping, with options to ignore them, log a warning, or fail the mapping. The SqlSessionFactoryBuilder has also been enhanced to support building sessions from InputStreams in addition to Readers.

src/main/java/org/apache/ibatis/session · high confidence

New type handlers for Java 8 Date/Time API and SQL types

This change introduces a comprehensive set of new type handlers in the org.apache.ibatis.type package to support Java 8 Date and Time API types (including LocalDate, LocalTime, LocalDateTime, ZonedDateTime, OffsetDateTime, OffsetTime, Instant, Year, Month, YearMonth, and JapaneseDate) as well as SQL types like SQLXML and Java arrays. It also adds new annotations (@Alias, @MappedTypes, @MappedJdbcTypes) to allow custom type handlers to be registered via annotations, and includes utility classes like TypeReference for generic type resolution and ByteArrayUtils for byte array conversions.

src/main/java/org/apache/ibatis/type · high confidence

Spanish site now displays language selection with national flags

The Spanish site now includes a dedicated CSS file that styles the internationalization (i18n) navigation list. This change adds visual national flag icons (for English, Spanish, Japanese, French, Chinese, and Korean) next to each language link, improving the user experience for selecting the preferred language version of the site.

src/site/es/resources · high confidence

Standardized repository setup with Maven Wrapper and contributor guidelines

The repository now includes a Maven Wrapper (version 3.3.4) to ensure consistent builds across environments, along with \.editorconfig\ and \.gitattributes\ to enforce uniform code formatting and line endings. A new \CONTRIBUTING.md\ file provides detailed instructions for reporting bugs, proposing features, and submitting code, including specific formatting rules. The project also introduces an Individual Contributor License Agreement (ICLA) and a \LICENSE\_HEADER\ template to standardize copyright notices in new files.

(repo-wide) · high confidence

Support for multi-database vendor identification and improved mapping validation

MyBatis now allows users to dynamically identify the database vendor at runtime via the new DatabaseIdProvider interface and VendorDatabaseIdProvider implementation, enabling the use of different SQL statements for different database types. Additionally, the mapping configuration has been strengthened with stricter validation: the Environment class now enforces non-null parameters during construction, and ResultMapping objects now support the notNullColumns attribute to ensure specific columns are present in the result set, improving data integrity checks.

src/main/java/org/apache/ibatis/mapping · high confidence

Support for parametrized SQL fragments in XML mappers

MyBatis now allows \<include /\> tags to define and pass variable placeholders to included SQL fragments. This enables reusable SQL snippets to accept parameters, with values resolved against the configuration's variables context, improving flexibility in dynamic SQL composition.

src/main/java/org/apache/ibatis/builder/xml · high confidence

Removals

Migration module removed from source tree

The database migration functionality (including the command-line interface, core migration logic, and associated SQL templates) has been removed from this module. This code has been moved to a separate sub-project, so users must now rely on the standalone migration tool for database schema management.

src/main/java/org/apache/ibatis/migration · high confidence

OGNL expression engine source files removed

The OGNL expression engine source files in \src/main/java/org/apache/ibatis/ognl\ have been deleted. This change removes the local implementation of the OGNL library, aligning with the project's shift to use an external or merged dependency rather than maintaining its own copy of the code.

src/main/java/org/apache/ibatis/ognl · high confidence

Removal of MyBatis Migration command implementations

The migration command implementations (including BaseCommand, BootstrapCommand, UpCommand, DownCommand, and others) have been removed from this source tree, as the migration functionality has been moved to a separate sub-project. Users will no longer have access to these database migration commands within this module.

src/main/java/org/apache/ibatis/migration/commands · high confidence

Removal of legacy MyBatis Migrations shell and batch scripts

The custom shell (migrate) and Windows batch (migrate.cmd) scripts previously located in src/main/scripts have been removed. These scripts manually constructed the classpath and invoked the MyBatis Migrator; their removal indicates that the migration tooling is now distributed or executed via a different mechanism, likely the appassembler-generated scripts mentioned in the commit history, rather than these hand-written launchers.

src/main/scripts · high confidence

Removal of legacy dynamic SQL implementation classes

The dynamic SQL builder components in \src/main/java/org/apache/ibatis/builder/xml/dynamic\ have been removed. This includes the deletion of \DynamicContext\, \DynamicSqlSource\, \ExpressionEvaluator\, and all specific SQL node implementations (\IfSqlNode\, \ForEachSqlNode\, \MixedSqlNode\, \SetSqlNode\, \SqlNode\, \TextSqlNode\, \WhereSqlNode\). This change eliminates the previous OGNL-based dynamic SQL generation mechanism from this package.

src/main/java/org/apache/ibatis/builder/xml/dynamic · high confidence

Removed OGNL documentation PDFs

The English-language PDF documentation files for the OGNL project, specifically the Developer Guide and the Language Guide, have been removed from the repository. Users will no longer have access to these specific PDF resources in this location.

doc · high confidence

Removed domain model classes from test sources

Deleted the domain model classes (Account, Cart, CartItem, Category, Item, LineItem, Order, Product, Sequence) from the test source directory, as these files were duplicates of the production domain classes and no longer needed in the test scope.

src/test/java/domain/jpetstore · high confidence

Removed obsolete metadata model classes

The \Column\, \Database\, \DatabaseFactory\, and \Table\ classes in the \org.apache.ibatis.metadata\ package have been removed. These classes previously provided a basic model for representing database schema information (catalogs, schemas, tables, columns, and primary keys) and a factory for populating this model from JDBC metadata. Their removal eliminates this legacy metadata handling capability from the library.

src/main/java/org/apache/ibatis/metadata · high confidence

Behavioural changes

Added localized site styling for language flags

A new CSS file (site.css) was added to the Chinese localization resources to style the internationalization navigation list. This stylesheet defines visual indicators for available language options (English, Spanish, Japanese, French, Chinese, and Korean) by applying specific flag images as background icons to list items, ensuring a consistent and recognizable interface for users switching between language versions.

_src/site/zh\CN/resources · high confidence

CGLIB proxy factory deprecated in favor of Javassist

The CGLIB-based lazy-loading proxy implementation (CglibProxyFactory) is now deprecated and users are advised to switch to the Javassist implementation. The code has also been updated to use java.util.concurrent.locks.ReentrantLock instead of synchronized blocks for thread safety, and lazy loading is now correctly invalidated when a property's setter is called.

src/main/java/org/apache/ibatis/executor/loader/cglib · high confidence

Cache API and implementation refinements

The caching subsystem introduces a safer NullCacheKey to prevent accidental updates to null keys, updates the Cache interface to use a default method for getReadWriteLock (indicating locking is now internal to providers), and refactors CacheKey to use StringJoiner and ArrayUtil for better performance and correctness. Additionally, TransactionalCacheManager gains an getObject method and uses computeIfAbsent for thread-safe lazy initialization, while CacheException now extends PersistenceException instead of the deprecated IbatisException.

src/main/java/org/apache/ibatis/cache · high confidence

DataSourceException now extends PersistenceException

The DataSourceException class in the org.apache.ibatis.datasource package has been updated to extend PersistenceException instead of the deprecated IbatisException. This change aligns the exception hierarchy with the current MyBatis exception model, ensuring consistent error handling for data source related issues.

src/main/java/org/apache/ibatis/datasource · high confidence

Enforce code formatting and import sorting before commits

A new pre-commit hook has been added to automatically validate that Java code is properly formatted and imports are sorted using Maven plugins. If the validation fails, the hook attempts to fix the issues automatically but then aborts the commit, requiring the developer to review the changes and commit again. This ensures consistent code style and import organization across the project.

hooks · high confidence

Enhanced ObjectFactory with serialization, generics, and broader collection support

The ObjectFactory interface and its DefaultObjectFactory implementation have been updated to support generic type creation, allowing MyBatis to properly instantiate typed objects without unchecked casts. The factory now supports creating instances for Iterable types (mapped to ArrayList) and SortedSet types (mapped to TreeSet), in addition to existing List, Map, and Set support. Additionally, DefaultObjectFactory now implements Serializable for proper serialization handling, and the instantiation logic has been refined to use safer access control checks via Reflector.canControlMemberAccessible() instead of blindly calling setAccessible.

src/main/java/org/apache/ibatis/reflection/factory · high confidence

Enhanced SqlSession capabilities and improved session lifecycle management

The default SqlSession implementation now supports streaming results via the new selectCursor() method and allows retrieving results as a Map via selectMap(). Additionally, the DefaultSqlSessionFactory has been refactored to expose a protected createSqlSession() method, enabling subclasses to provide custom SqlSession implementations, while connection handling has been consolidated to use the Transaction abstraction for more robust resource cleanup.

src/main/java/org/apache/ibatis/session/defaults · high confidence

Enhanced key generation for multiple properties and batch operations

The key generator components in the executor package have been significantly refactored to support more complex key assignment scenarios. Jdbc3KeyGenerator now handles multiple key properties and batch inserts more robustly, including specific error messages when too many keys are generated or when Map parameters are used incorrectly. SelectKeyGenerator has been updated to support multiple key properties, allowing users to map multiple generated columns to object fields, and now throws a clear exception if the select statement returns no data. Additionally, shared singleton instances (INSTANCE) have been added to Jdbc3KeyGenerator and NoKeyGenerator to improve performance and consistency.

src/main/java/org/apache/ibatis/executor/keygen · high confidence

Enhanced placeholder parsing and XML security in the parsing module

The parsing module now supports configurable default values for placeholders (e.g., ${key:default}) via system properties, allowing users to specify fallback values directly in their configuration strings. The underlying token parser has been rewritten to improve performance and correctly handle escaped tokens. Additionally, XML parsing security has been strengthened by disabling external entity processing to prevent XXE attacks, and the exception hierarchy has been updated to extend PersistenceException instead of the deprecated IbatisException.

src/main/java/org/apache/ibatis/parsing · high confidence

Exception hierarchy migrated from IbatisException to PersistenceException

The framework's exception handling has been updated to use a new \PersistenceException\ class as the base for persistence-related errors, replacing the legacy \IbatisException\. \IbatisException\ is now deprecated, and specific exceptions like \TooManyResultsException\ now extend \PersistenceException\. Additionally, the \ExceptionFactory\ now wraps errors in \PersistenceException\ instead of \IbatisException\, ensuring consistent exception types for users catching persistence failures.

src/main/java/org/apache/ibatis/exceptions · high confidence

Executor API refactored to support cursors and statement reuse

The executor layer has been updated to support streaming results via the new Cursor API and to improve statement reuse in BatchExecutor and ReuseExecutor. The Executor interface now includes queryCursor() and overloaded query() methods that accept BoundSql, while BaseExecutor and its subclasses (SimpleExecutor, ReuseExecutor, BatchExecutor) implement doQueryCursor() and updated doQuery() signatures. BatchExecutor now tracks the current MappedStatement to correctly reuse prepared statements for identical SQL, and ReuseExecutor clears its statement map on flush. Additionally, a new ResultExtractor utility class handles conversion of query results to specific target types (collections, arrays, or single objects), and ExecutorException now extends PersistenceException.

src/main/java/org/apache/ibatis/executor · high confidence

Improved parameter resolution and static SQL optimization

The default parameter handling now checks for additional parameters before falling back to the main parameter object, resolving issues where extra parameters were ignored. Additionally, static SQL statements are now automatically detected and pre-processed at startup into a faster execution path, removing the need to manually use the 'RAW' language driver for performance gains.

src/main/java/org/apache/ibatis/scripting/defaults · high confidence

Improved reflection access handling in invoker classes

The reflection invoker classes (GetFieldInvoker, SetFieldInvoker, MethodInvoker) now handle IllegalAccessException by attempting to set the member as accessible via Reflector.canControlMemberAccessible() before failing. This change reduces the likelihood of access errors when invoking methods or accessing fields through reflection, particularly in environments with stricter security managers or module restrictions. Additionally, a new AmbiguousMethodInvoker class has been introduced to explicitly throw a ReflectionException when ambiguous method invocations occur, providing clearer error messaging.

src/main/java/org/apache/ibatis/reflection/invoker · high confidence

JDBC transaction manager adds lazy connection loading and auto-commit skip option

The JDBC transaction implementation now delays acquiring the database connection until it is actually needed (lazy loading) rather than at construction time, and introduces a new \skipSetAutoCommitOnClose\ configuration property. When this property is enabled, the transaction manager will not attempt to reset autocommit to true before closing the connection, which prevents exceptions on databases (such as Sybase) that mandate a commit or rollback before closing even if no write operations occurred. Additionally, debug logging has been added to track connection lifecycle events.

src/main/java/org/apache/ibatis/transaction/jdbc · high confidence

JNDI DataSource Factory modernized with type-safe iteration and updated license headers

The JNDI datasource factory now uses a type-safe for-each loop over map entries instead of an untyped Iterator, improving code clarity and safety. Additionally, the file includes updated copyright years (2009-2024) and license headers, and adds a package-info.java file to document the JNDI datasource factory package.

src/main/java/org/apache/ibatis/datasource/jndi · high confidence

License header updates and package documentation for parameter handling

The parameter handling package now includes a package-info.java file that documents the base package for handling parameters. The DefaultParameterHandler implementation has been removed, and the ParameterHandler interface has been updated with Apache License 2.0 headers and Javadoc documentation.

src/main/java/org/apache/ibatis/executor/parameter · medium confidence

Log4j 1.x logging implementation deprecated and updated

The Log4j 1.x logging adapter (Log4jImpl) is now deprecated and will be removed in a future release, aligning with the end-of-life of Log4j 1.x. The implementation has been updated to use the modern Logger.log() API with explicit fully qualified class names and log levels, and now supports trace-level logging in addition to debug, info, warn, and error. A package-info.java file has been added to document this deprecation.

src/main/java/org/apache/ibatis/logging/log4j · high confidence

Logging API enhancements and Log4j 2 support

The logging subsystem now supports trace-level logging via new methods in the Log interface and adds a dedicated adapter for Log4j 2 (Log4j2Impl), while the legacy Log4j 1.x adapter is deprecated. The LogFactory has been refactored to use a ReentrantLock for thread safety, supports custom logging implementations via useCustomLogging, and introduces a standard marker for logging integrations. Additionally, LogException now extends PersistenceException instead of the removed IbatisException.

src/main/java/org/apache/ibatis/logging · high confidence

Logging implementations now support trace-level logging and accept class names

The Jakarta Commons Logging and JDK 14 logging adapters have been updated to support trace-level logging. Both \JakartaCommonsLoggingImpl\ and \Jdk14LoggingImpl\ now implement the \isTraceEnabled()\ and \trace(String)\ methods, allowing users to capture more detailed diagnostic information. Additionally, the constructors for both classes now accept a \String\ class name instead of a \Class\ object, and the internal log fields are marked as final. These changes enhance the granularity of available logs without altering the core logging behavior.

src/main/java/org/apache/ibatis/logging/jdk14 · high confidence

Logging implementations now support trace-level output

The NoLoggingImpl and StdOutImpl logging adapters have been updated to implement the full Log interface, adding support for trace-level logging. StdOutImpl now outputs trace messages to standard out, while NoLoggingImpl silently discards them. This change also aligns the constructor signature to accept a String class name instead of a Class object and adds standard license headers and package documentation.

src/main/java/org/apache/ibatis/logging/nologging, src/main/java/org/apache/ibatis/logging/stdout · high confidence

ManagedTransaction now supports configurable connection closing and lazy initialization

The ManagedTransaction and ManagedTransactionFactory have been updated to allow users to control whether the JDBC connection is closed when the transaction ends. A new 'closeConnection' property (defaulting to true) can be set on the factory to prevent closing connections in environments where the application server manages the lifecycle. Additionally, connection retrieval is now delayed until getConnection() is called, and the factory now accepts a DataSource and isolation level, ignoring them silently to maintain portability with external transaction managers.

src/main/java/org/apache/ibatis/transaction/managed · high confidence

New BlockingCache decorator and concurrency fixes in cache decorators

A new BlockingCache decorator has been added to prevent cache stampedes by making concurrent threads wait for a single database hit to populate the cache, with a configurable timeout. Several existing cache decorators (FifoCache, LruCache, SoftCache, WeakCache, SynchronizedCache, TransactionalCache) were updated to fix concurrency issues: SoftCache and WeakCache now use ReentrantLock to protect internal state modifications during reads, FifoCache and LruCache now correctly remove keys from their internal tracking structures when removeObject is called, SynchronizedCache uses a dedicated ReentrantLock instead of the delegate's lock, and TransactionalCache now supports blocking cache semantics. Additionally, SerializedCache now enforces serialization filters to mitigate unsafe deserialization risks.

src/main/java/org/apache/ibatis/cache/decorators · high confidence

PerpetualCache removes external locking and adds generics

The PerpetualCache implementation no longer provides a ReadWriteLock, meaning it relies on external synchronization for thread safety rather than managing locks internally. Additionally, the internal cache map is now typed with generics (Map\<Object, Object\>), and fields are marked as final for better immutability.

src/main/java/org/apache/ibatis/cache/impl · high confidence

Plugin API modernization and security hardening

The plugin system has been updated to support Java 8+ default methods on the Interceptor interface, allowing plugins to omit boilerplate for plugin wrapping and property setting. Security and stability are improved by restricting Invocation targets to specific MyBatis handler interfaces (Executor, ParameterHandler, ResultSetHandler, StatementHandler) and enforcing the presence of the @Intercepts annotation on all interceptors. Additionally, PluginException now extends PersistenceException instead of the deprecated IbatisException, and internal collection handling has been modernized to use generics and immutable copies.

src/main/java/org/apache/ibatis/plugin · high confidence

Pooled DataSource synchronization refactored to use ReentrantLock

The pooled datasource implementation in \org.apache.ibatis.datasource.pooled\ has replaced Java's intrinsic \synchronized\ blocks with \java.util.concurrent.locks.ReentrantLock\ for thread safety. This change affects \PoolState\, \PooledConnection\, and \PooledDataSource\, where explicit lock acquisition and release are now used to protect shared state and connection pool operations. For users, this represents a behavioral change in how the connection pool manages concurrency, potentially altering locking granularity and performance characteristics under high contention, while maintaining the same functional API.

src/main/java/org/apache/ibatis/datasource/pooled · high confidence

Property reflection utilities refined and new copier added

The property reflection package now includes a new PropertyCopier utility for copying bean properties across inheritance hierarchies. PropertyTokenizer no longer implements Iterable, removing the ability to use it directly in enhanced for-loops, and now throws an IllegalArgumentException for unclosed index brackets (e.g., 'prop\['). PropertyNamer's getter and setter detection now requires names to have more than three characters for 'get'/'set' prefixes and more than two for 'is', preventing false positives on short names, and uses Locale.ENGLISH for consistent case conversion.

src/main/java/org/apache/ibatis/reflection/property · high confidence

Refactored JDBC logging proxies to use configurable loggers and improved result set tracking

The JDBC logging proxies (ConnectionLogger, PreparedStatementLogger, StatementLogger, and ResultSetLogger) have been refactored to accept external Log instances and query stack levels instead of using static, class-specific loggers. This change allows the logging behavior to be controlled by the application's configuration. Additionally, the ResultSetLogger now tracks and logs the total number of rows retrieved upon iteration completion, and it uses the trace level for row details while filtering out BLOB column values to prevent performance issues and log clutter. The BaseJdbcLogger also now dynamically identifies setter methods via reflection and logs update counts for non-query executions.

src/main/java/org/apache/ibatis/logging/jdbc · high confidence

Refactored SQL builders to use instance-based API and deprecated legacy ThreadLocal classes

The JDBC SQL generation API has been refactored to use an instance-based approach via the new AbstractSQL and SQL classes, replacing the previous static, ThreadLocal-based builders. The legacy SelectBuilder and SqlBuilder classes are now deprecated and delegate to the new SQL class, encouraging users to migrate to the safer, non-static API. Additionally, the Null enum now uses ObjectTypeHandler.INSTANCE for OBJECT and OTHER types, and ScriptRunner has been updated to use StringBuilder instead of StringBuffer for better performance.

src/main/java/org/apache/ibatis/jdbc · high confidence

Refactored SQL provider method resolution with pluggable strategy and context

The annotation-based mapper builder now uses a new \ProviderMethodResolver\ interface to allow pluggable strategies for locating the SQL provider method, alongside a new \ProviderContext\ object that supplies the mapper type, method, and database ID during resolution. \ProviderSqlSource\ has been updated to support this new resolution flow and accepts a \LanguageDriver\ to enable dynamic SQL generation optimizations, while the previous constructors are marked deprecated.

src/main/java/org/apache/ibatis/builder/annotation · high confidence

Refactored SQL source building and parameter mapping with new expression parser

The \builder\ package has been restructured to improve how SQL statements and parameters are processed. The inline parameter parsing logic has been extracted from \SqlSourceBuilder\ into a dedicated \ParameterExpression\ class, enabling more robust parsing of complex parameter syntaxes (including expressions and attributes). \SqlSourceBuilder\ is now a utility class that handles SQL whitespace minimization based on the \shrinkWhitespacesInSql\ configuration setting. Additionally, \ParameterMappingTokenHandler\ has been moved to the top level to support enhanced type resolution, including checking additional parameters first (fixing issue \#448) and better handling of generic types in \@Param\ scenarios. Several builder helper classes (\CacheRefResolver\, \ResultMapResolver\, \ResultMappingConstructorResolver\) have been introduced to encapsulate specific resolution logic, and \BaseBuilder\ has been updated to use \clazz.getDeclaredConstructor().newInstance()\ instead of the deprecated \Class.newInstance()\.

src/main/java/org/apache/ibatis/builder · high confidence

Refactored VFS singleton and added serialization filter warnings

The VFS resource-loading mechanism now uses a thread-safe inner-class singleton pattern (VFSHolder) to ensure safe initialization of the VFS implementation. Additionally, a new SerialFilterChecker class has been introduced to detect when the JEP-290 serialization filter is missing and log a warning to guide users toward secure deserialization practices.

src/main/java/org/apache/ibatis/io · high confidence

Refactored dynamic SQL scripting engine and added \<bind\> support

The dynamic SQL scripting engine in the \org.apache.ibatis.scripting.xmltags\ package has been refactored to improve performance and extensibility. The core \DynamicContext\ and \DynamicSqlSource\ classes have been rewritten to streamline SQL generation and parameter binding. A new \\<bind\>\ tag is now supported, allowing users to define variables using OGNL expressions within dynamic SQL statements. Additionally, the \ForEachSqlNode\ now supports Map iteration, exposing map keys as the index variable, and the \ExpressionEvaluator\ has been updated to handle nullable iterables. The refactoring also includes a custom \OgnlClassResolver\ for safer class loading and a thread-safe \OgnlMemberAccess\ implementation to prevent issues with flipping accessible flags.

src/main/java/org/apache/ibatis/scripting/xmltags · high confidence

Refactored lazy loading and serialization to support deserialization of partially loaded objects

The lazy loading mechanism has been restructured to allow MyBatis proxies to be safely deserialized while retaining their lazy-loaded state. New classes (AbstractEnhancedDeserializationProxy, AbstractSerialStateHolder) and a refactored ResultLoaderMap now capture the necessary SQL statement IDs and parameters during serialization, enabling properties to be reloaded from the database upon deserialization. This change also introduces a new ProxyFactory interface, deprecates the legacy CglibProxyFactory and JavassistProxyFactory wrappers, and improves thread safety by replacing synchronized blocks with ReentrantLock in the proxy invocation logic.

src/main/java/org/apache/ibatis/executor/loader · high confidence

Refactored mapper proxy architecture for improved performance and Java 9+ compatibility

The mapper binding mechanism has been restructured to improve performance and support modern Java versions. MapperProxy now delegates method invocations through a new MapperMethodInvoker interface, caching invoker instances to avoid repeated reflection lookups. Default methods on mapper interfaces are now invoked directly via Java 9+ MethodHandles, eliminating illegal reflective access warnings. Additionally, MapperRegistry now uses a ConcurrentHashMap for thread-safe mapper registration and ensures that mappers are removed from the registry if their configuration fails, preventing inconsistent state.

src/main/java/org/apache/ibatis/binding · high confidence

Refactoring of reflection utilities and introduction of array handling support

The reflection package has been refactored to improve type resolution and add utility support for arrays. A new ArrayUtil class provides hashCode, equals, and toString methods that correctly handle primitive and object arrays, addressing issues with collection element handling. The ReflectorFactory and MetaObject classes now utilize a ReflectorFactory interface to manage reflector caching, replacing the previous static cache mechanism. Additionally, the ParamNameResolver and ParamNameUtil classes have been updated to support resolving actual parameter names from method signatures, enabling more intuitive parameter binding in SQL statements.

src/main/java/org/apache/ibatis/reflection · high confidence

Result handlers and context classes are now generic and support configurable object factories

The result handling classes in the executor.result package have been updated to use Java generics for type safety: DefaultResultContext and DefaultResultHandler now implement generic interfaces (ResultContext\<T\> and ResultHandler\<Object\> respectively), and a new DefaultMapResultHandler\<K,V\> has been added to support selecting maps of results keyed by a property. Additionally, DefaultResultHandler now supports an ObjectFactory constructor to allow custom list instantiation, replacing the hardcoded ArrayList default.

src/main/java/org/apache/ibatis/executor/result · high confidence

Slf4j logging now uses location-aware markers when available

The SLF4J logging implementation now automatically detects if the underlying SLF4J runtime supports the LocationAwareLogger interface (SLF4J 1.6+). When supported, it uses a specialized logger that includes source location information in log output via SLF4J markers; otherwise, it falls back to the standard logger. This improves log accuracy for users running newer SLF4J versions without requiring configuration changes.

src/main/java/org/apache/ibatis/logging/slf4j · high confidence

Statement handlers now support transaction timeouts and cursor-based queries

The statement execution layer in MyBatis has been updated to respect transaction-level timeouts and to support cursor-based result retrieval. The \StatementHandler\ interface now accepts a \transactionTimeout\ parameter during preparation, and a new \StatementUtil\ helper applies this timeout to the underlying JDBC statement when it is more restrictive than the query-specific timeout. Additionally, all statement handlers (\SimpleStatementHandler\, \PreparedStatementHandler\, \CallableStatementHandler\) now implement \queryCursor\, allowing applications to stream large result sets efficiently. The handlers also now accept a pre-computed \BoundSql\ object in their constructors, which optimizes performance by ensuring the cache key and dynamic SQL are calculated only once.

src/main/java/org/apache/ibatis/executor/statement · high confidence

Transaction API modernization and timeout support

The transaction package has been updated to support transaction timeouts via a new getTimeout() method on the Transaction interface, allowing users to leverage configured timeout settings. The TransactionFactory interface has been expanded with new methods to create transactions from a DataSource with specific isolation levels and auto-commit settings, and setProperties now uses a default implementation. Additionally, TransactionException now extends PersistenceException instead of the deprecated IbatisException, and a package-info.java file has been added to document the base transaction package.

src/main/java/org/apache/ibatis/transaction · high confidence

Unified result-set handling with Cursor support and refactored internals

The result-set processing logic in the executor has been consolidated into a single DefaultResultSetHandler, replacing the previous FastResultSetHandler and NestedResultSetHandler implementations. This change introduces support for Cursor-based result handling via a new handleCursorResultSets method in the ResultSetHandler interface, enabling streaming of large result sets. Internally, the refactoring introduces new classes (PendingConstructorCreation, PendingCreationKey, PendingCreationMetaInfo) to manage complex constructor auto-mapping and nested collection linking, while ResultSetWrapper now centralizes column metadata and type handler resolution. Users benefit from improved performance, reduced memory overhead, and the ability to stream results using Cursors.

src/main/java/org/apache/ibatis/executor/resultset · high confidence

UnpooledDataSource now supports default network timeout and improved driver registration

The UnpooledDataSource now exposes a new defaultNetworkTimeout property, allowing users to configure the timeout for database operations via Connection.setNetworkTimeout. Additionally, driver initialization has been refactored to cache registered drivers in a ConcurrentHashMap at startup, improving thread safety and performance. The UnpooledDataSourceFactory has also been updated to use SystemMetaObject for property handling and corrected a typo in error messages.

src/main/java/org/apache/ibatis/datasource/unpooled · high confidence

Updated MyBatis XML schema and DTD definitions for configuration and mapper files

The MyBatis configuration and mapper XML schemas (XSD) and Document Type Definitions (DTD) have been updated to reflect the current framework capabilities. The configuration schema now includes definitions for objectWrapperFactory, reflectorFactory, and databaseIdProvider, while allowing optional package scanning for type aliases, type handlers, and mappers. The mapper schema has been expanded to support new attributes on SELECT, INSERT, UPDATE, and DELETE statements, including databaseId, lang, resultOrdered, resultSets, and the new affectData attribute. Additionally, the bind element is now supported within dynamic SQL tags, and various other attributes like keyColumn, fetchType, and autoMapping have been added or refined to improve mapping precision and dynamic SQL flexibility.

src/main/resources · high confidence

Test coverage

Added XSD-based XML parsing tests for configuration and mapper builders; Added and updated unit tests for the reflection package; Added and upgraded unit tests for the io package; Added base test sample for MyBatis usage; Added batch test suite for batch insert operations; Added blog domain model classes for testing; Added comprehensive test suite for SQL provider functionality; Added immutable domain model classes for blog tests; Added integration tests for SQL OFFSET and FETCH FIRST support; Added integration tests for global variables defaults and ambiguity handling; Added test container utilities for MySQL, Oracle, and PostgreSQL; Added test coverage for ResultMap extension scenarios; Added test coverage for annotation-based many-to-one and one-to-many result map resolution; Added test coverage for auto-constructor mapping; Added test coverage for batch operations with mixed parameter types; Added test coverage for cache-ref resolution; Added test coverage for map class name conflict scenario; Added test coverage for missing ID property mapping; Added test coverage for multiple foreach loop iteration; Added test coverage for property replacement in mapper files; Added test coverage for result maps with associations; Added test coverage for unmatched property type mapping; Added test domain classes for reflection and generics scenarios; Added test fixtures for autodiscovered type handlers and aliases; Added test fixtures for generic type parameter resolution; Added test for NamedResultMap validation; Added test for OGNL static field caching bug; Added test for cache reference resolution order; Added test for complex type property updates; Added test for cursor memory usage with nested results; Added test for deeply nested result map resolution; Added test for empty namespace validation; Added test for extended result maps; Added test for local cache behavior in association type mapping; Added test for mapper interface inheritance override; Added test for nonexistent variables handling; Added test for primitive type mapping with List support; Added test for type handler injection; Added test for unknown object mapping failure; Added test mapper interfaces for blog domain; Added test resources for MyBatis test suite; Added test suite for auto-mapping behavior and nested result maps; Added test suite for stored procedure handling; Added tests for @One and @Many column prefix mapping; Added tests for @ResultType annotation with ResultHandler; Added tests for ArrayTypeHandler; Added tests for AwfulTable mapping with generated keys; Added tests for BLOB handling with primitive type aliases; Added tests for Cursor functionality with annotation mappers and testcontainers; Added tests for Cursor with nested collections and RowBounds; Added tests for DML mapper return types; Added tests for DefaultCursor lifecycle and DB2-style closed ResultSet handling; Added tests for HashMap type handler behavior; Added tests for Java method resolution with cross-mapper cache and result map references; Added tests for Javassist lazy loading proxy support; Added tests for Jdbc3KeyGenerator key assignment scenarios; Added tests for LocalTime nanosecond precision; Added tests for Map support in \<foreach\>; Added tests for Map type handler resolution; Added tests for MyBatis component autodiscovery; Added tests for NPE when re-executing updates after commit; Added tests for OGNL caching and XML script building; Added tests for OGNL static method access; Added tests for OffsetDateTime and OffsetTime type handling; Added tests for Optional return types in mapper methods; Added tests for Oracle nested cursor mapping scenarios; Added tests for PostgreSQL generated keys with Testcontainers; Added tests for RawSqlSource behavior and whitespace handling; Added tests for ResultSetType behavior with RowBounds; Added tests for SQL script encoding handling; Added tests for SqlSession lifecycle and auto-mapping behavior; Added tests for UUID handling and custom type handler; Added tests for XML external reference scenarios; Added tests for XML mapper references with enums and OGNL; Added tests for XML-defined mapper interface inheritance; Added tests for actual parameter name resolution in MyBatis; Added tests for actual parameter name resolution in MyBatis mappers; Added tests for ancestor reference and circular association mappings; Added tests for annotation-based many-to-many mapping; Added tests for association mapping with automatic type detection; Added tests for auto-type resolution with non-ambiguous constructors; Added tests for batch insert with generated keys; Added tests for bind usage within foreach loops; Added tests for blocking cache concurrency and lock behavior; Added tests for cache namespace reference and custom cache property injection; Added tests for cache-ref resolution from XML configuration; Added tests for callSettersOnNulls behavior; Added tests for circular reference serialization with lazy loading; Added tests for collection parameter support; Added tests for collections injected via constructor; Added tests for column forwarding with nested associations; Added tests for column-order-based constructor auto-mapping; Added tests for columnPrefix auto-mapping and nested query scenarios; Added tests for constructor auto-mapping with nested objects; Added tests for custom SqlSession support in DefaultSqlSessionFactory; Added tests for custom Velocity-based SQL language driver; Added tests for custom collection handling; Added tests for database ID fallback to product name; Added tests for default result handler collection types; Added tests for deferred loading of common properties in result handlers; Added tests for dirty select rollback behavior; Added tests for disallowing dots in mapped statement names; Added tests for discriminator result mapping in constructor and nested associations; Added tests for duplicate mapper method handling; Added tests for empty collection handling; Added tests for empty row handling and constructor auto-mapping; Added tests for enum type handler support in annotations; Added tests for enum type handlers implementing interfaces; Added tests for enums with methods; Added tests for extends with constructor mapping; Added tests for foreach null handling and variable cleanup; Added tests for generic type handling in MyBatis; Added tests for generic type resolution on fields; Added tests for global variables in annotation-driven cache configuration; Added tests for immutable POJO constructor mapping; Added tests for immutable collection constructor creation; Added tests for immutable collection constructor injection; Added tests for include property placeholders in XML attributes; Added tests for initialized collection property handling; Added tests for inline association mapping with dot notation; Added tests for key column mapping with generated keys; Added tests for lazy deserialization behavior; Added tests for lazy loading with shared ancestor properties; Added tests for lazy property loading behavior; Added tests for lazy-load proxy factory comparison; Added tests for lazy-loading immutable POJOs; Added tests for lazy-loading proxy serialization behavior; Added tests for literal string control character retention; Added tests for local session cache flushing behavior on select statements; Added tests for map property named 'value' and list handling; Added tests for mapper binding validation and batch flush operations; Added tests for mapper default method invocation; Added tests for mapper type parameter resolution; Added tests for mapping nested select results to primitive array properties; Added tests for member access in parameter and result mapping; Added tests for multi-database support and database ID providers; Added tests for multiple result sets with PostgreSQL; Added tests for multiple result sets with association mapping; Added tests for named constructor argument mapping and validation; Added tests for named result map reuse and conflict detection; Added tests for nested object mapping in bringrags scenario; Added tests for nested query cache behavior; Added tests for nested result handler association with RowBounds and stop control; Added tests for nested result handler with multiple associations; Added tests for nested result map and select loops in permissions mapping; Added tests for nested result mapping and RowHandler behavior; Added tests for nested result mapping with large numeric IDs; Added tests for network timeout and driver registration in unpooled data sources; Added tests for notNullColumn resultMap behavior; Added tests for null setter behavior with nested beans; Added tests for order prefix removal behavior; Added tests for orphan result map handling; Added tests for parametrized type handling in collections and maps; Added tests for parent-child relationship mapping with constructor support; Added tests for plugin schema switching and method invocation security; Added tests for refcursor handling with nested result maps; Added tests for refid resolution edge cases; Added tests for repeatable database-specific statement annotations; Added tests for resolving generic types in collection parameters; Added tests for result type resolution in the no\_result\_type\_map scenario; Added tests for rounding mode handling in MyBatis; Added tests for string list mapping and ambiguous collection handling; Added tests for three-level parent reference mapping; Added tests for timezone edge cases with LocalDateTime and LocalDate; Added tests for type handler resolution and registration scenarios; Added tests for type-based type handler resolution and JDBC-type mapping; Added tests for underscore-to-camelCase mapping behavior; Added unit tests for DefaultObjectFactory; Added unit tests for DefaultParameterHandler; Added unit tests for DefaultResultSetHandler edge cases; Added unit tests for JDBC logging components; Added unit tests for JDBC transaction behavior; Added unit tests for LanguageDriverRegistry; Added unit tests for ManagedTransaction and ManagedTransactionFactory; Added unit tests for PooledDataSource connection pooling behavior; Added unit tests for PropertyCopier and PropertyTokenizer; Added unit tests for TypeHandlers in org.apache.ibatis.type; Added unit tests for statement timeout and fetch size configuration; Cache module tests migrated to JUnit 5 with expanded coverage; Executor test suite modernized and expanded; Expanded test coverage for MyBatis parsing components; Migrate JDBC module tests to JUnit 5 and modernize test code; Migrate cglib\_lazy\_error tests to JUnit 5 and modernize Java code; Migrate count and criterion tests to JUnit 5; Migrate enum-related tests to JUnit 5 and modernize test infrastructure; Migrate overwritingproperties test suite to JUnit 5; Migrated null\_associations tests to JUnit 5 and updated test infrastructure; Refactor BaseDataTest for cleaner resource management and updated paths; Refactor test domain classes to new package and modernize Java syntax; Removal of legacy database test fixtures and mapper conflict tests; Removal of unused test domain classes; Removed legacy MyBatis test configuration and schema files; Removed legacy OGNL test suite files; Removed migration test suite and example resources; Removed obsolete iBATIS 2.x test resources for map class name conflict; Removed obsolete metadata integration test; Removed obsolete test fixtures and database scripts; Removed test domain model classes from src/test/java/domain/blog; Removed test for null JDBC type handling; Removed test for unsupported circular parent-child join mapping; Removed test mapper interfaces for Author and Blog; Removed test-specific log4j configuration file; Updated QuotedColumnNames test suite to JUnit 5 and modernized resource handling; Updated complex\_column test suite to JUnit 5 and added new mapper scenarios; Updated complex\_property tests to JUnit 5 and modernized test setup; Updated duplicate\_resource\_loaded test to JUnit 5 and modernized resource handling; Updated dynamic SQL tests to JUnit 5; Updated dynamic SQL tests to JUnit 5 and modern Java practices; Updated exception tests to JUnit 5 and new exception types; Updated includes test suite to JUnit 5 with parametrized include support; Updated integer\_enum test suite to JUnit 5; Updated logging factory tests to JUnit 5 and added coverage for Log4j2 and configuration-based logging; Updated nested foreach tests to JUnit 5 and added primitive array support; Updated primitive result type test suite to JUnit 5 and modernized resource management; Updated selectKey tests to JUnit 5 and added multi-key property coverage; Updated substitution\_in\_annots tests to JUnit 5 and resource management.

Dependencies

MyBatis 3.6.0-SNAPSHOT build environment and dependency updates

The project has been upgraded to version 3.6.0-SNAPSHOT and now extends the mybatis-parent POM version 52. The build minimum Java version has been raised to 11, replacing the previous Java 1.5 target. Several dependencies have been updated to their latest versions, including Mockito 5.23.0, Log4j 2.26.1, Byte Buddy 1.18.14-jdk5, Derby 10.17.1.0, Testcontainers 1.21.4, and the Microsoft SQL Server JDBC driver 13.6.0.jre11. The project URL has been updated to the official MyBatis 3 site, and the SCM configuration now points to the GitHub repository.

(dependencies) · high confidence

Upgrade Maven Wrapper to 3.3.4 with Maven 3.9.16

The Maven Wrapper has been updated to version 3.3.4, and the project is now configured to use Apache Maven 3.9.16. This change includes a new MavenWrapperDownloader.java and updated maven-wrapper.properties that enforce SHA-256 checksums for both the wrapper JAR and the Maven distribution, ensuring integrity verification during the build process.

.mvn/wrapper · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 65 → 66 (+1.2)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 82 → 89 (+7.5)
  • Architecture 100 → 98 (-2.4)
  • Maturity 53 → 53 (+0.0)
  • Readiness 66 → 68 (+1.7)
  • Security 85 → 85 (+0.0)

Resolved (20)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • Duplicated block (10 lines × 2) (src/main/java/org/apache/ibatis/executor/loader/cglib/CglibProxyFactory.java)
  • Duplicated block (13 lines × 2) (src/main/java/org/apache/ibatis/session/SqlSessionFactoryBuilder.java)
  • Duplicated block (15 lines × 2) (src/main/java/org/apache/ibatis/cache/decorators/SoftCache.java)
  • Duplicated block (6 lines × 2) (src/main/java/org/apache/ibatis/builder/annotation/MapperAnnotationBuilder.java)
  • Duplicated block (6 lines × 2) (src/main/java/org/apache/ibatis/executor/loader/cglib/CglibProxyFactory.java)
  • Duplicated block (7 lines × 2) (src/main/java/org/apache/ibatis/builder/annotation/MapperAnnotationBuilder.java)
  • Duplicated block (7 lines × 2) (src/main/java/org/apache/ibatis/executor/loader/cglib/CglibProxyFactory.java)
  • Duplicated block (7 lines × 2) (src/main/java/org/apache/ibatis/logging/jdbc/PreparedStatementLogger.java)
  • Duplicated block (8 lines × 2) (src/main/java/org/apache/ibatis/executor/resultset/DefaultResultSetHandler.java)
  • Duplicated block (8 lines × 2) (src/main/java/org/apache/ibatis/executor/resultset/DefaultResultSetHandler.java)
  • Duplicated block (9 lines × 2) (src/main/java/org/apache/ibatis/executor/loader/cglib/CglibProxyFactory.java)
  • Duplicated block (9 lines × 2) (src/main/java/org/apache/ibatis/executor/loader/cglib/CglibProxyFactory.java)
  • No exposed public API
  • Off-boarding risk: anonymized user #1
  • Scanner failed to run — not a clean result
  • Test reliability not included
  • The README links only to CONTRIBUTING.md for contributions but does not explain how to run tests or configure the framework. (README.md)
  • knowledge concentrated in recent work — freshness signal contradicted by repo activity

New (196)

  • ClassTooLong: Configuration (src/main/java/org/apache/ibatis/session/Configuration.java)
  • ClassTooLong: DefaultResultSetHandler (src/main/java/org/apache/ibatis/executor/resultset/DefaultResultSetHandler.java)
  • ClassTooLong: MapperAnnotationBuilder (src/main/java/org/apache/ibatis/builder/annotation/MapperAnnotationBuilder.java)
  • Coverage not measured — no coverage collector is wired up
  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • Documentation: no architecture or design documentation (README.md)
  • Documentation: no contributor guidance (README.md)
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (10 lines × 2) (src/main/java/org/apache/ibatis/cache/decorators/SoftCache.java)
  • Duplicated block (10 lines × 2) (src/main/java/org/apache/ibatis/executor/resultset/DefaultResultSetHandler.java)
  • Duplicated block (11 lines × 2) (src/main/java/org/apache/ibatis/executor/loader/cglib/CglibProxyFactory.java)
  • Duplicated block (12 lines × 2) (src/main/java/org/apache/ibatis/executor/loader/cglib/CglibProxyFactory.java)
  • Duplicated block (13–15 lines × 2) (src/main/java/org/apache/ibatis/executor/loader/cglib/CglibProxyFactory.java)
  • Duplicated block (16 lines × 2) (src/main/java/org/apache/ibatis/session/SqlSessionFactoryBuilder.java)
  • Duplicated block (18–19 lines × 2) (src/main/java/org/apache/ibatis/cache/decorators/SoftCache.java)
  • Duplicated block (5 lines × 2) (src/main/java/org/apache/ibatis/executor/BaseExecutor.java)
  • Duplicated block (5 lines × 3) (src/main/java/org/apache/ibatis/logging/jdbc/ConnectionLogger.java)
  • Duplicated block (5–6 lines × 3) (src/main/java/org/apache/ibatis/logging/jdbc/PreparedStatementLogger.java)
  • Duplicated block (6 lines × 2) (src/main/java/org/apache/ibatis/builder/annotation/MapperAnnotationBuilder.java)
  • …and 176 more

Changes since last survey

  • 42 commits — 40 feature/other, 2 fixes

By area

  • (repo) — 21 commits
  • (root) — 12 commits
  • .github/workflows — 7 commits
  • src/site — 2 commits

Notable commits

  • fix: Merge pull request #3753 from kycasdzxc/docs/fix-code-and-api-errors
  • fix: Merge pull request #3754 from kycasdzxc/docs/fix-korean-translation
  • change: Merge pull request #3751 from mybatis/renovate/junit-framework-monorepo
  • change: Merge pull request #3752 from mybatis/renovate/jamesives-github-pages-deploy-action-digest
  • change: Merge pull request #3755 from mybatis/renovate/logback-monorepo
  • change: Merge pull request #3756 from mybatis/renovate/github-codeql-action-digest
  • change: Merge pull request #3757 from mybatis/renovate/logback-monorepo
  • change: Merge pull request #3758 from mybatis/renovate/byte-buddy.version
  • change: Merge pull request #3759 from mybatis/renovate/github-codeql-action-digest
  • change: Merge pull request #3760 from mybatis/renovate/ognl-ognl-3.x
  • change: Merge pull request #3761 from mybatis/renovate/org.javassist-javassist-3.x
  • change: Merge pull request #3762 from mybatis/renovate/actions-setup-java-6.x
  • change: Merge pull request #3767 from mybatis/renovate/byte-buddy.version
  • change: Merge pull request #3773 from mybatis/renovate/slf4j-monorepo
  • change: Merge pull request #3774 from mybatis/renovate/com.h2database-h2-2.x
  • change: Merge pull request #3775 from mybatis/renovate/actions-setup-java-digest
  • change: Merge pull request #3776 from mybatis/renovate/github-codeql-action-digest
  • change: Merge pull request #3777 from mybatis/renovate/mssql-jdbc.version
  • change: Merge pull request #3779 from mybatis/renovate/ognl-ognl-3.x
  • change: Merge pull request #3780 from mybatis/renovate/byte-buddy.version
  • …and 22 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

mybatis/mybatis-3 was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 25 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 34147d0bd2f5ed0016ef367c92b25e174149326b — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-f917f263222d.