/** * Tries to initialize SRA. Initialization error is saved during first call, * all subsequent calls will return the same saved error or null. * * @return ExceptionInInitializerError if initialization failed, null if initialization was successful */ public static ExceptionInInitializerError checkIfInitialized() { final ExceptionInInitializerError ngsInitError; if (!initTried) { log.debug("Initializing SRA module"); ngsInitError = NGS.getInitializationError(); if (ngsInitError != null) { log.info("SRA initialization failed. Will not be able to read from SRA"); } else { NGS.setAppVersionString(getFullVersionString()); } initTried = true; } else { ngsInitError = NGS.getInitializationError(); } return ngsInitError; }
/** * Tries to initialize SRA. Initialization error is saved during first call, * all subsequent calls will return the same saved error or null. * * @return ExceptionInInitializerError if initialization failed, null if initialization was successful */ public static ExceptionInInitializerError checkIfInitialized() { final ExceptionInInitializerError ngsInitError; if (!initTried) { log.debug("Initializing SRA module"); ngsInitError = NGS.getInitializationError(); if (ngsInitError != null) { log.info("SRA initialization failed. Will not be able to read from SRA"); } else { NGS.setAppVersionString(getFullVersionString()); } initTried = true; } else { ngsInitError = NGS.getInitializationError(); } return ngsInitError; }