{@inheritDoc}

@deprecated using google official ApkVerifier of apksig lib instead.
198511
@Override
    @Deprecated
    public ApkSignStatus verifyApk() throws IOException {
        ZipEntry entry = zf.getEntry("META-INF/MANIFEST.MF");
        if (entry == null) {
            // apk is not signed;
            return ApkSignStatus.notSigned;
        }

        try (JarFile jarFile = new JarFile(this.apkFile)) {
            Enumeration<JarEntry> entries = jarFile.entries();
            byte[] buffer = new byte[8192];

            while (entries.hasMoreElements()) {
                JarEntry e = entries.nextElement();
                if (e.isDirectory()) {
                    continue;
                }
                try (InputStream in = jarFile.getInputStream(e)) {
                    // Read in each jar entry. A security exception will be thrown if a signature/digest check fails.
                    int count;
                    while ((count = in.read(buffer, 0, buffer.length)) != -1) {
                        // Don't care
                    }
                } catch (SecurityException se) {
                    return ApkSignStatus.incorrect;
                }
            }
        }
        return ApkSignStatus.signed;
    }
1082788
private void debugVerifyCatalog(InMemoryJarfile origJarFile, Catalog origCatalog)
    {
        final VoltCompiler autoGenCompiler = new VoltCompiler(m_isXDCR);
        // Make the new compiler use the original jarfile's classloader so it can
        // pull in the class files for procedures and imports
        autoGenCompiler.m_classLoader = origJarFile.getLoader();
        List<VoltCompilerReader> autogenReaderList = new ArrayList<>(1);
        autogenReaderList.add(new VoltCompilerJarFileReader(origJarFile, AUTOGEN_DDL_FILE_NAME));
        InMemoryJarfile autoGenJarOutput = new InMemoryJarfile();
        autoGenCompiler.m_currentFilename = AUTOGEN_DDL_FILE_NAME;
        // This call is purposely replicated in retryFailedCatalogRebuildUnderDebug,
        // where it provides an opportunity to set a breakpoint on a do-over when this
        // mainline call produces a flawed catalog that fails the catalog diff.
        // Keep the two calls in synch to allow debugging under the same exact conditions.
        Catalog autoGenCatalog = autoGenCompiler.compileCatalogInternal(null, null,
                autogenReaderList, autoGenJarOutput);
        if (autoGenCatalog == null) {
            Log.info("Did not verify catalog because it could not be compiled.");
            return;
        }

        FilteredCatalogDiffEngine diffEng =
                new FilteredCatalogDiffEngine(origCatalog, autoGenCatalog, false);
        String diffCmds = diffEng.commands();
        if (diffCmds != null && !diffCmds.equals("")) {
            // This retry is disabled by default to avoid confusing the unwary developer
            // with a "pointless" replay of an apparently flawed catalog rebuild.
            // Enable it via this flag to provide a chance to set an early breakpoint
            // that is only triggered in hopeless cases.
            if (RETRY_FAILED_CATALOG_REBUILD_UNDER_DEBUG) {
                autoGenCatalog = replayFailedCatalogRebuildUnderDebug(
                        autoGenCompiler, autogenReaderList,
                        autoGenJarOutput);
            }
            // Re-run a failed diff more verbosely as a pre-crash test diagnostic.
            diffEng = new FilteredCatalogDiffEngine(origCatalog, autoGenCatalog, true);
            diffCmds = diffEng.commands();
            String crashAdvice = "Catalog Verification from Generated DDL failed! " +
                    "VoltDB dev: Consider" +
                    (RETRY_FAILED_CATALOG_REBUILD_UNDER_DEBUG ? "" :
                        " setting VoltCompiler.RETRY_FAILED_CATALOG_REBUILD_UNDER_DEBUG = true and") +
                    " setting a breakpoint in VoltCompiler.replayFailedCatalogRebuildUnderDebug" +
                    " to debug a replay of the faulty catalog rebuild roundtrip. ";
            VoltDB.crashLocalVoltDB(crashAdvice + "The offending diffcmds were: " + diffCmds);
        }
        else {
            Log.info("Catalog verification completed successfuly.");
        }
    }
1214059
@Deprecated
    @Override
    public void read(final File input) {
        assert input.isAbsolute();
        read(input.toURI());
    }
811206
private static void initDesugarJar(@Nullable FileCache cache) throws IOException {
        if (isDesugarJarInitialized()) {
            return;
        }

        URL url = DesugarProcessBuilder.class.getClassLoader().getResource(DESUGAR_JAR);
        Preconditions.checkNotNull(url);

        Path extractedDesugar = null;
        if (cache != null) {
            try {
                String fileHash;
                try (HashingInputStream stream =
                             new HashingInputStream(Hashing.sha256(), url.openStream())) {
                    fileHash = stream.hash().toString();
                }
                FileCache.Inputs inputs =
                        new FileCache.Inputs.Builder(FileCache.Command.EXTRACT_DESUGAR_JAR)
                                .putString("pluginVersion", Version.ANDROID_GRADLE_PLUGIN_VERSION)
                                .putString("jarUrl", url.toString())
                                .putString("fileHash", fileHash)
                                .build();

                File cachedFile =
                        cache.createFileInCacheIfAbsent(
                                inputs, file -> copyDesugarJar(url, file.toPath()))
                                .getCachedFile();
                Preconditions.checkNotNull(cachedFile);
                extractedDesugar = cachedFile.toPath();
            } catch (IOException | ExecutionException e) {
                logger.error(e, "Unable to cache Desugar jar. Extracting to temp dir.");
            }
        }

        synchronized (desugarJar) {
            if (isDesugarJarInitialized()) {
                return;
            }

            if (extractedDesugar == null) {
                extractedDesugar = PathUtils.createTmpToRemoveOnShutdown(DESUGAR_JAR);
                copyDesugarJar(url, extractedDesugar);
            }
            desugarJar.set(extractedDesugar);
        }
    }
1246098
public void validate() {
        // check if android build tool version is at least minimal required version
        Revision revBuildToolsVersion = Revision.parseRevision(buildToolsVersion);
        if (minimalBuildToolsVersion.compareTo(revBuildToolsVersion) > 0) {
            throw new GradleException("Android buildToolsVersion should be at least version " + minimalBuildToolsVersion + ": currently using " + buildToolsVersion + " from " + buildToolsDir + ". See https://developer.android.com/studio/intro/update.html on how to update the build tools in the Android SDK.");
        }

        // check if valid android build tools exists
        if (!project.file(buildToolsDir + "/aapt").exists() &&
                !project.file(buildToolsDir + "/aapt.exe").exists()) {
            throw new GradleException("Configured buildToolsVersion is invalid: " + buildToolsVersion + " (" + buildToolsDir + ")");
        }

        // check if android platform exists
        if (!project.file(androidSdk + "/platforms/android-" + compileSdkVersion).exists()) {
            throw new GradleException("Configured compileSdkVersion is invalid: " + compileSdkVersion + " (" + androidSdk + "/platforms/android-" + compileSdkVersion + ")");
        }

//        sdkHandler.initTarget(AndroidTargetHash.getPlatformHashString(new AndroidVersion(Integer.parseInt(compileSdkVersion))),
//                getBuildToolsRevision(), Collections.emptyList(), androidBuilder, false);

        sdkHandler.ensurePlatformToolsIsInstalled(extraModelInfo);
    }
367836
public static function dsnClassMap(array $map = null)
    {
        deprecationWarning(
            get_called_class() . '::setDsnClassMap() is deprecated. ' .
            'Use setDsnClassMap()/getDsnClassMap() instead.'
        );

        if ($map !== null) {
            static::setDsnClassMap($map);
        }

        return static::getDsnClassMap();
    }
1174037
@Deprecated
  public JSONObject updateUserKey(String key, List<String> acls, int validity, int maxQueriesPerIPPerHour, int maxHitsPerQuery) throws AlgoliaException {
    return updateApiKey(key, acls, validity, maxQueriesPerIPPerHour, maxHitsPerQuery);
  }
62223
public static void deprecated(Class<?> clazz, String methodOrPropName, String version) {
        if (LOG_DEPRECATED) {
            deprecated("Property or method [" + methodOrPropName + "] of class [" + clazz.getName() +
                    "] is deprecated in [" + version +
                    "] and will be removed in future releases");
        }
    }
1343132
@Override
    protected void onPostExecute(Integer result) {
        if (result == VERSION_DOWNLOADABLE_FOUND) {
            mResultInterface.versionDownloadableFound(mVersionDownloadable);
        } else if (result == NETWORK_ERROR) {
            mResultInterface.networkError();
            Network.logConnectionError();
        } else if (result == MULTIPLE_APKS_PUBLISHED) {
            mResultInterface.multipleApksPublished();
            Log.e(Constants.LOG_TAG, "Multiple APKs published ");
        } else if (result == PACKAGE_NOT_PUBLISHED) {
            mResultInterface.appUnpublished();
            Log.e(Constants.LOG_TAG, "App unpublished");
        } else if (result == STORE_ERROR) {
            mResultInterface.storeError();
            Log.e(Constants.LOG_TAG, "Store page format error");
        }
    }
667569
@Deprecated
  public JSONObject updateUserKey(String key, JSONObject params) throws AlgoliaException {
    return updateApiKey(key, params);
  }
1003921
public function validate($deprecated=null)
    {
        //Resetting violations
        $this->violations = array();

        if ($this->_adapter) {
            $violations = $this->_adapter->validate($this);
            if (is_array($violations) && count($violations) > 0) {
                $this->isValidated = true;

                return false;
            }
        }

        /*
         * All child stores should be validated
         */
        $jsonSchema = $this->_jsonSchema;
        foreach ($jsonSchema['definition'] as $propertyName=>$prodSchema) {
            if ($prodSchema['type']=="object" || $prodSchema['type']=="id") {
                if ($prodSchema['type']=="id" && is_scalar($this->$propertyName)) continue;

                /**
                 * we enter here if we are not able to unserialize the object
                 * because it does not have a valid _className property, or/and there
                 * is two StoreClasses possible
                 */
                if ($this->$propertyName instanceof \stdClass && count($prodSchema['storeClasses'])) {

                    if (isset($this->$propertyName->_className)) {
                        $className = $this->$propertyName->_className;
                        /**
                         * the _className class does not exists
                         */
                        if (!class_exists($className)) {
                            $this->addViolation($propertyName, "$propertyName ->_className '$className' store class does not exists ");
                        }

                        if (!in_array($className, $prodSchema['storeClasses'])) {
                            $this->addViolation($propertyName, "$propertyName ->_className is not allowed here");
                        }
                    }

                    $this->addViolation($propertyName, "$propertyName should define _className property. see store definition");
                }

                if ((!$this->$propertyName instanceof BaseStore)) continue;

                $validationChild = $this->$propertyName->validate();
                if (!$validationChild) {
                    $violationsChild = $this->$propertyName->getViolations();
                    foreach ($violationsChild as $violation) {
                        /*
                         * Adding violations with propertyName as prefix on the
                         * violations of the parent
                         */
                        $this->violations[] = new ConstraintViolation(
                            $violation->getMessage(),
                            $violation->getMessageTemplate(),
                            $violation->getMessageParameters(),
                            $violation->getRoot(),
                            $propertyName . "." . $violation->getPropertyPath(),
                            $violation->getInvalidValue(),
                            $violation->getMessagePluralization(),
                            $violation->getCode()
                        );
                    }
                }
            } elseif ($prodSchema['type']=="array" && count($prodSchema['storeClasses']) >0
                && is_array($this->$propertyName)) {

                foreach ($this->$propertyName as $store) {
                    if (!StoreHelper::checkStoreClass($store, $prodSchema['storeClasses'], $prodSchema['allowedId'])) {
                        $this->addViolation($propertyName, "'$propertyName' array element has a wrong "
                            ."store type.");
                    }
                }
            }
        }

        $violationsFromValidation = StoreManager::getValidator()->validate($this);
        foreach($violationsFromValidation as $violation) $this->violations[] = $violation;

        $this->isValidated = true;

        if (count($this->violations)>0) return false;
        return true;
    }
1102910
@Deprecated
  public JSONObject updateUserKey(String key, List<String> acls) throws AlgoliaException {
    return updateApiKey(key, acls);
  }
376424
private void buildDeprecatedAPIInfo(Configuration configuration) {
        PackageDoc[] packages = configuration.packages;
        PackageDoc pkg;
        for (int c = 0; c < packages.length; c++) {
            pkg = packages[c];
            if (Util.isDeprecated(pkg)) {
                getList(PACKAGE).add(pkg);
            }
        }
        ClassDoc[] classes = configuration.root.classes();
        for (int i = 0; i < classes.length; i++) {
            ClassDoc cd = classes[i];
            if (Util.isDeprecated(cd)) {
                if (cd.isOrdinaryClass()) {
                    getList(CLASS).add(cd);
                } else if (cd.isInterface()) {
                    getList(INTERFACE).add(cd);
                } else if (cd.isException()) {
                    getList(EXCEPTION).add(cd);
                } else if (cd.isEnum()) {
                    getList(ENUM).add(cd);
                } else if (cd.isError()) {
                    getList(ERROR).add(cd);
                } else if (cd.isAnnotationType()) {
                    getList(ANNOTATION_TYPE).add(cd);
                }
            }
            composeDeprecatedList(getList(FIELD), cd.fields());
            composeDeprecatedList(getList(METHOD), cd.methods());
            composeDeprecatedList(getList(CONSTRUCTOR), cd.constructors());
            if (cd.isEnum()) {
                composeDeprecatedList(getList(ENUM_CONSTANT), cd.enumConstants());
            }
            if (cd.isAnnotationType()) {
                composeDeprecatedList(getList(ANNOTATION_TYPE_MEMBER),
                        ((AnnotationTypeDoc) cd).elements());
            }
        }
        sortDeprecatedLists();
    }
940968
function useVersion($version)
    {
        // If passed php7.2 or php72 formats, convert to php@7.2 format:
        $version = preg_replace('/(php)([0-9+])(?:.)?([0-9+])/i', '$1@$2.$3', $version);

        if (!$this->brew->supportedPhpVersions()->contains($version)) {
            throw new DomainException(
                sprintf(
                    'Valet doesn\'t support PHP version: %s (try something like \'php7.2\' instead)',
                    $version
                )
            );
        }

        // Install the relevant formula if not already installed
        $this->brew->ensureInstalled($version);

        // Unlink the current php if there is one
        if ($this->brew->hasLinkedPhp()) {
            $currentVersion = $this->brew->getLinkedPhpFormula();
            info(sprintf('Unlinking current version: %s', $currentVersion));
            $this->brew->unlink($currentVersion);
        }

        info(sprintf('Linking new version: %s', $version));
        $this->brew->link($version, true);

        $this->install();

        return $version;
    }
203658
function() {
            // -------------------------------------------- synonymy application

            ariaUtilsArray.forEach(this._deprecatedProperties, function(property) {
                var type = property.type;

                if (type == "attribute") {
                    var synonym = property.synonym;

                    if (synonym != null) {
                        var name = property.name;
                        var prefixedName = "_" + name;

                        this[prefixedName] = this[synonym];
                    }
                }
            }, this);

            // ----------------------------------------------- value propagation

            if (!this.supportsPropertyDescriptors()) {
                ariaUtilsArray.forEach(this._deprecatedProperties, function(property) {
                    var type = property.type;

                    if (type == "attribute") {
                        var name = property.name;
                        var prefixedName = "_" + name;

                        this[name] = this[prefixedName];
                    }
                }, this);
            }
        }
1338742
public function validatePhpVersionAgainstTravis($composerJson, $travisYml)
    {
        if (empty($composerJson['require']['php'])) {
            return true;
        }

        $versionParser       = new VersionParser();
        $constraintsComposer = $versionParser->parseConstraints($composerJson['require']['php']);

        foreach (!empty($travisYml['php']) ? $travisYml['php'] : array() as $version) {
            if ('nightly' === $version) {
                continue;
            }

            // Travis only allows major.minor specification.
            $constraintsTravis = $versionParser->parseConstraints($version . '.9999999.9999999');
            if (!$constraintsComposer->matches($constraintsTravis)) {
                $this->output->writeln(
                    sprintf(
                        '<error>composer.json "%s" does not match travis.yml "%s". ' .
                        'Please remove "%s" from .travis.yml</error>',
                        $constraintsComposer->getPrettyString(),
                        $version,
                        $version
                    )
                );

                return false;
            }
        }

        return true;
    }
391763
public void removeTangoQualityChangeListener(ITangoQualityChangeListener listener, String attrName)
            throws DevFailed {
        synchronized (moni) {
            TangoQualityChange tangoQualityChange;
            String key = deviceName+"/"+attrName;
            if ((tangoQualityChange = tango_quality_change_source.get(key)) != null)
                tangoQualityChange.removeTangoQualityChangeListener(listener);
        }
    }