Commit 59b8d59 1 parent 9f81ca8 commit 59b8d59 Copy full SHA for 59b8d59
File tree 1 file changed +5
-6
lines changed
src/java.security.jgss/share/classes/sun/security/krb5
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -167,17 +167,16 @@ private static boolean isMacosLionOrBetter() {
167
167
168
168
String osVersion = GetPropertyAction .privilegedGetProperty ("os.version" );
169
169
String [] fragments = osVersion .split ("\\ ." );
170
-
171
- // sanity check the "10." part of the version
172
- if (!fragments [0 ].equals ("10" )) return false ;
173
170
if (fragments .length < 2 ) return false ;
174
171
175
- // check if Mac OS X 10.7(.y)
172
+ // check if Mac OS X 10.7(.y) or higher
176
173
try {
174
+ int majorVers = Integer .parseInt (fragments [0 ]);
177
175
int minorVers = Integer .parseInt (fragments [1 ]);
178
- if (minorVers >= 7 ) return true ;
176
+ if (majorVers > 10 ) return true ;
177
+ if (majorVers == 10 && minorVers >= 7 ) return true ;
179
178
} catch (NumberFormatException e ) {
180
- // was not an integer
179
+ // were not integers
181
180
}
182
181
183
182
return false ;
You can’t perform that action at this time.
0 commit comments