Version { public static Version getInstance() { synchronized (staticLock) { if (version != null) { try { licenseScheduledCheck(); } catch (Exception e) { atomicSetVersion(initAGPLVersion(e, null)); } return version; } } Version localVersion; String key = null; try { String coreVersion = release; String[] info = getLicenseeInfoFromLicenseKey(coreVersion); if(info != null){ if (info[3] != null && info[3].trim().length() > 0) { key = info[3]; } else { key = "Trial version "; if (info[5] == null) { key += "unauthorised"; } else { key += info[5]; } } if (info.length > 6) { if (info[6] != null && info[6].trim().length() > 0) { checkLicenseVersion(coreVersion, info[6]); } } if (info[4] != null && info[4].trim().length() > 0) { localVersion = initVersion(info[4], key, false); } else if (info[2] != null && info[2].trim().length() > 0) { localVersion = initDefaultLicensedVersion(info[2], key); } else if (info[0] != null && info[0].trim().length() > 0) { localVersion = initDefaultLicensedVersion(info[0], key); } else { localVersion = initAGPLVersion(null, key); } } else { localVersion = initAGPLVersion(null, key); } } catch(LicenseVersionException lve) { throw lve; }catch(ClassNotFoundException cnfe){ localVersion = initAGPLVersion(null, key); } catch (Exception e) { if(e.getCause() != null && e.getCause().getMessage().equals(LicenseVersionException.LICENSE_FILE_NOT_LOADED)) { if (isiText5licenseLoaded()) { throw new LicenseVersionException(LicenseVersionException.NO_I_TEXT7_LICENSE_IS_LOADED_BUT_AN_I_TEXT5_LICENSE_IS_LOADED); } } localVersion = initAGPLVersion(e.getCause(), key); } return atomicSetVersion(localVersion); } @Deprecated  Version();   Version(VersionInfo info, boolean expired); static Version getInstance(); static boolean isAGPLVersion(); static boolean isExpired(); String getProduct(); String getRelease(); String getVersion(); String getKey(); VersionInfo getInfo();  }
@Test public void getInstanceTest() { Version instance = Version.getInstance(); checkVersionInstance(instance); }