Returns true if this is an exception corresponding to a HTTP 404 error
returned by the storage provider

@return true if the specified exception is an AmazonServiceException
instance and if it was thrown because of a 404, false otherwise.
516187
public boolean isServiceException404()
  {
    if ((Exception) this instanceof AmazonServiceException)
    {
      AmazonServiceException asEx = (AmazonServiceException) ((java.lang.Exception) this);
      return (asEx.getStatusCode() == HttpStatus.SC_NOT_FOUND);
    }

    return false;
  }
1182567
public static boolean isTransientError(Throwable throwable) {
        if (throwable instanceof CouchbaseLiteException) {
            CouchbaseLiteException e = (CouchbaseLiteException) throwable;
            return isTransientError(e.getCBLStatus().getCode());
        } else if (throwable instanceof RemoteRequestResponseException) {
            RemoteRequestResponseException e = (RemoteRequestResponseException) throwable;
            return isTransientError(e.getCode());
        } else if (throwable instanceof java.net.SocketTimeoutException)
            // connection and socket timeouts => transient error
            return true;
        else if (throwable instanceof java.net.ConnectException)
            return true;
        else if (throwable instanceof java.net.SocketException)
            return true;
        else if (throwable instanceof IOException)
            // NOTE: Exception is thrown from HttpClient.execute() or InputStream.read()
            //       As InputStream.read() thrown IOException, So IOException is considered
            //       temporary issue.
            return true;
        else
            return false;
    }
1161682
private boolean isExceptionEdge(Edge edge) {
        boolean isExceptionEdge = edge.isExceptionEdge();
        if (isExceptionEdge) {
            if (DEBUG) {
                System.out.println("NOT Ignoring " + edge);
            }
            return true; // false
        }
        if (edge.getType() != EdgeTypes.FALL_THROUGH_EDGE) {
            return false;
        }
        InstructionHandle h = edge.getSource().getLastInstruction();
        return h != null
            && h.getInstruction() instanceof IFNONNULL
            && isNullCheck(h, methodGen.getConstantPool());
    }
437707
public boolean check() throws Exception {
        // we need to create a copy of the file, because the container file
        // might be at the end of the stream.
        File fileCopy = File.createTempFile("modeshape-sequencer-epub", ".tmp");
        IoUtil.write(in, new BufferedOutputStream(new FileOutputStream(fileCopy)));

        List<String> rootfiles = new ArrayList<>();
        try (ZipInputStream zipStream =
                new ZipInputStream(new FileInputStream(fileCopy))) {
            rootfiles = getRootfiles(zipStream);
        }

        if (!rootfiles.isEmpty()) {
            try (ZipInputStream zipStream =
                    new ZipInputStream(new FileInputStream(fileCopy))) {
                ZipEntry entry = null;
                while ((entry = zipStream.getNextEntry()) != null) {
                    String entryName = entry.getName();
                    if (rootfiles.contains(entryName)) {
                        checkRootfile(zipStream, entry);
                    }
                }
            }
        } else {
            throw new IllegalArgumentException("No rootfile package found in given EPUB file.");
        }

        // try to delete the file immediately or on JVM exit
        boolean deleted = false;
        try {
            deleted = fileCopy.delete();
        } catch (SecurityException e) {
            // ignore
        }
        if (!deleted) {
            fileCopy.deleteOnExit();
        }

        return true;
    }
561042
public static boolean hasService(Class<?> service, URL[] urls)
            throws ServiceConfigurationError {
        for (URL url: urls) {
            try {
                String fullName = prefix + service.getName();
                URL u = new URL(url, fullName);
                boolean found = parse(service, u);
                if (found)
                    return true;
            } catch (MalformedURLException e) {
                // should not happen; ignore it if it does
            }
        }
        return false;
    }
45340
private static boolean isAdaptiveException(Throwable t) {
        if (t instanceof FrameTooLongException) {
            return true;
        }

        if (t instanceof NoHostAvailableException) {
            // If the issue on every host is adaptive then the exception is adaptive
            Collection<Throwable> hostExceptions = ((NoHostAvailableException) t).getErrors().values();
            return !hostExceptions.isEmpty() && hostExceptions.stream().allMatch(AdaptiveResultSet::isAdaptiveException);
        }

        return false;
    }
1185353
protected boolean isHostUnavailableException(Throwable throwable, Set<Throwable> path) {
    // Check if the exception is an IOException and check if the
    // message indicates an end of stream on a Connection.
    if ( IOException.class.isInstance(throwable) && throwable.getMessage().contains("unexpected end of stream on") ) {
      return true;
    }
    // we need to check our recursion path to avoid infinite recursion if a
    // getCause() pointed to itself or an ancestor
    if ( throwable.getCause() != null && !path.contains(throwable.getCause()) ) {
      path.add(throwable.getCause());
      boolean isCauseHostUnavailableException = isHostUnavailableException(throwable.getCause(), path);
      if ( isCauseHostUnavailableException == true )
        return true;
    }
    return false;
  }
621491
public boolean isHttpSuccess() {
		if (isRevisitDigest() && (getDuplicatePayload() != null)) {
			return getDuplicatePayload().isHttpSuccess();
		}
		String httpCode = getHttpCode();
		return (httpCode.startsWith("2"));
	}
183806
public boolean checkResponseForException() {
    if (!finished && rsp != null) {
      Exception e;
      if ((e = rsp.getException()) != null) {
        setError(e.getMessage());
        setFinished();
        return true;
      }
    }
    return false;
  }
712271
public boolean isEIPBound() {
        InstanceInfo myInfo = applicationInfoManager.getInfo();
        String myInstanceId = ((AmazonInfo) myInfo.getDataCenterInfo()).get(MetaDataKey.instanceId);
        String myZone = ((AmazonInfo) myInfo.getDataCenterInfo()).get(MetaDataKey.availabilityZone);
        String myPublicIP = ((AmazonInfo) myInfo.getDataCenterInfo()).get(MetaDataKey.publicIpv4);

        Collection<String> candidateEIPs = getCandidateEIPs(myInstanceId, myZone);
        for (String eipEntry : candidateEIPs) {
            if (eipEntry.equals(myPublicIP)) {
                logger.info("My instance {} seems to be already associated with the public ip {}",
                        myInstanceId, myPublicIP);
                return true;
            }
        }
        return false;
    }
190557
private static boolean isPermanentError(Throwable throwable) {
    Status status = getStatus(throwable);

    switch (status.getCode()) {
      case CANCELLED:
      case UNKNOWN:
      case DEADLINE_EXCEEDED:
      case RESOURCE_EXHAUSTED:
      case INTERNAL:
      case UNAVAILABLE:
      case UNAUTHENTICATED:
        return false;
      default:
        return true;
    }
  }
1246093
public boolean hasException() {
        return Optional.ofNullable(commandResult)
                        .map(result -> StringUtils.hasText(result.getException()))
                        .orElse(false);
    }
584159
protected boolean isStoreValid() {
        boolean result = false;
        String requestURI = this.request.getUri();
        this.storeName = parseStoreName(requestURI);
        if(storeName != null) {
            result = true;
        } else {
            logger.error("Error when validating request. Missing store name.");
            RestErrorHandler.writeErrorResponse(this.messageEvent,
                                                HttpResponseStatus.BAD_REQUEST,
                                                "Missing store name. Critical error.");
        }
        return result;
    }
14527
public static boolean isRetryableServiceException(SdkBaseException exception) {
        return isAse(exception) && RETRYABLE_STATUS_CODES.contains(toAse(exception).getStatusCode());
    }
111717
public boolean isValid() {
		if(parsedHost != null) {
			return true;
		}
		if(validationException != null) {
			return false;
		}
		try {
			validate();
			return true;
		} catch(HostNameException e) {
			return false;
		}
	}
627549
public boolean isHttpError() {
		if (isRevisitDigest() && (getDuplicatePayload() != null)) {
			return getDuplicatePayload().isHttpError();
		}
		String httpCode = getHttpCode();
		return (httpCode.startsWith("4") || httpCode.startsWith("5"));
	}
371344
void throwCloudExceptionIfInFailedState() {
        if (this.isStatusFailed()) {
            if (this.errorBody() != null) {
                throw new CloudException("Async operation failed with provisioning state: " + this.status(), this.response(), this.errorBody());
            } else {
                throw new CloudException("Async operation failed with provisioning state: " + this.status(), this.response());
            }
        }
    }