List of usage examples for java.lang AbstractMethodError getStackTrace
public StackTraceElement[] getStackTrace()
From source file:org.ofbiz.core.entity.transaction.DBCPConnectionFactory.java
@VisibleForTesting static boolean checkIfProblemMayBeCausedByIsValidMethod(final BasicDataSource dataSource, final AbstractMethodError error) { final String validationQuery = dataSource.getValidationQuery(); if (validationQuery == null || validationQuery.isEmpty()) { final List<StackTraceElement> stackTraceElements = Lists.newArrayList(error.getStackTrace()); return stackTraceElements.stream() .anyMatch(stackTraceElement -> stackTraceElement.getMethodName().contains("isValid")); }// w w w. j a v a2s . c om return false; }