File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
hibernate-community-dialects/src/main/java/org/hibernate/community/dialect Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -191,16 +191,18 @@ public MySQLLegacyDialect(DialectResolutionInfo info) {
191191
192192 protected static DatabaseVersion createVersion (DialectResolutionInfo info ) {
193193 final String versionString = info .getDatabaseVersion ();
194- final String [] components = StringHelper .split ( "." , versionString );
195- if ( components .length >= 3 ) {
196- try {
197- final int majorVersion = Integer .parseInt ( components [0 ] );
198- final int minorVersion = Integer .parseInt ( components [1 ] );
199- final int patchLevel = Integer .parseInt ( components [2 ] );
200- return DatabaseVersion .make ( majorVersion , minorVersion , patchLevel );
201- }
202- catch (NumberFormatException ex ) {
203- // Ignore
194+ if ( versionString != null ) {
195+ final String [] components = StringHelper .split ( "." , versionString );
196+ if ( components .length >= 3 ) {
197+ try {
198+ final int majorVersion = Integer .parseInt ( components [0 ] );
199+ final int minorVersion = Integer .parseInt ( components [1 ] );
200+ final int patchLevel = Integer .parseInt ( components [2 ] );
201+ return DatabaseVersion .make ( majorVersion , minorVersion , patchLevel );
202+ }
203+ catch (NumberFormatException ex ) {
204+ // Ignore
205+ }
204206 }
205207 }
206208 return info .makeCopyOrDefault ( DEFAULT_VERSION );
You can’t perform that action at this time.
0 commit comments