当控制器方法不存在的时候的默认方法
@throws SwooleException
513579
public function defaultMethod()
    {
        if ($this->request_type == SwooleMarco::HTTP_REQUEST) {
            $this->http_output->setStatusHeader(302);
            $this->http_output->end($this->loader->view("server::404"));
        } else {
            throw new SwooleException($this->context['raw_method_name'] . ' method not exist');
        }
    }
186000
boolean handleCommonMethods(Object delegate, Method method, Object[] args) throws Throwable {
    if ("abort".equals(method.getName()) || "close".equals(method.getName())) {
      try {
        Reflection.invoke(delegate, method, args);
        return true;
      } finally {
        closed = true;
        afterClosure();
        interruptWaiters();
      }
    } else if ("addShutdownListener".equals(method.getName()) && args[0] != null)
      shutdownListeners.add((ShutdownListener) args[0]);
    else if ("removeShutdownListener".equals(method.getName()) && args[0] != null)
      shutdownListeners.remove((ShutdownListener) args[0]);
    return false;
  }
1277214
private void checkCallbackMethods() throws CoreException {

        for (final EnumEventType eet : getAnnotationValue()) {

            final String methodName = buildHandlingMethodName(eet);

            final Class<?> eventClass = getAnnotationApiEventClass();

            try {
                this.callbackObject.getClass().getDeclaredMethod(methodName, eventClass);
            } catch (NoSuchMethodException | SecurityException e) {
                throw new CoreException(NO_EVENT_CALLBACK.getText(this.callbackObject.getClass().getName(), methodName, eventClass.getName()), e);
            }
        }

    }
316455
public final void methodBody() throws RecognitionException {
		int methodBody_StartIndex = input.index();

		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 59) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:579:5: ( block )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:579:7: block
			{
			pushFollow(FOLLOW_block_in_methodBody2106);
			block();
			state._fsp--;
			if (state.failed) return;
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 59, methodBody_StartIndex); }

		}
	}
609850
private static Object invoke(Class target, Object o, String methodName, Object[] paras)
			throws IllegalAccessException, IllegalArgumentException, InvocationTargetException
	{

		ObjectInfo info = getObjectInfo(target);
		Class[] parameterType = new Class[paras.length];
		int i = 0;
		for (Object para : paras)
		{
			parameterType[i++] = para == null ? null : para.getClass();
		}
		ObjectMethodMatchConf mf = findMethod(target, methodName, parameterType);
		if (mf == null)
		{
			throw new BeetlParserException(BeetlParserException.NATIVE_CALL_INVALID, "根据参数未找到匹配的方法"+methodName+BeetlUtil.getParameterDescription(parameterType));
		}
		Object result = invoke(o, mf, paras);
		return result;

	}
440671
public void spoolDone()
   {
      final CountDownLatch sl = this.spoolLatch.get();
      this.spoolLatch.set(null);
      sl.countDown();
   }
628405
private static void initExceptionThreadPool() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "initExceptionThreadPool");

        // Do a synchronous check to ensure once-only creation
        synchronized (exceptionTPCreateSync) {
            if (exceptionThreadPool == null) {
                // Get the maximum size for the thread pool, defaulting if
                // not specified or if the value cannot be parsed
                int maxThreads = Integer.parseInt(ApiJmsConstants.EXCEPTION_MAXTHREADS_DEFAULT_INT);
                String maxThreadsStr = RuntimeInfo.getProperty(ApiJmsConstants.EXCEPTION_MAXTHREADS_NAME_INT,
                                                               ApiJmsConstants.EXCEPTION_MAXTHREADS_DEFAULT_INT);
                try {
                    maxThreads = Integer.parseInt(maxThreadsStr);
                } catch (NumberFormatException e) {
                    // No FFDC code needed, but we will exception this
                    SibTr.exception(tc, e);
                }

                // Trace the value we will use
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    SibTr.debug(tc, ApiJmsConstants.EXCEPTION_MAXTHREADS_NAME_INT + ": " + Integer.toString(maxThreads));

                // Create the thread pool
                exceptionThreadPool = new ThreadPool(ApiJmsConstants.EXCEPTION_THREADPOOL_NAME_INT, 0, maxThreads);
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "initExceptionThreadPool");
    }
156724
@SuppressWarnings("all")
    public static Method findMethodOrThrowException(Class<?> type, String methodName, Class<?>... parameterTypes) {
        Method methodToMock = findMethod(type, methodName, parameterTypes);
        throwExceptionIfMethodWasNotFound(type, methodName, methodToMock, (Object[]) parameterTypes);
        return methodToMock;
    }
841652
@Override
	public boolean permit(String resourceId, Class c, Object target, String method) {
		if (c.isArray()) {
			// 允许调用，但实际上会在在其后调用中报错。不归此处管理
			return true;
		}
		String name = c.getName();
		String className = null;
		String pkgName = null;
		int i = name.lastIndexOf('.');
		if (i != -1) {
			pkgName = name.substring(0, i);
			className = name.substring(i + 1);

		} else {
			// 无包名，允许调用
			return true;
		}

		if (pkgName.startsWith("java.lang")) {
			if (className.equals("Runtime") || className.equals("Process") || className.equals("ProcessBuilder")
					|| className.equals("System")) {
				return false;
			}
		}

		return true;
	}
722431
@Override
	public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
		//-- 处理请求，如果处理失败（无对应的Action），继续后续步骤
		if(false == ActionContext.handle(req, res)) {
			chain.doFilter(req, res);
		}
	}
906274
public void check() throws ThriftConnectionPoolException {
		if (connectTimeout <= 0) {
			throw new ThriftConnectionPoolException("连接超时时间必须大于0");
		}

		// 判断是否是单接口模式 如果是则只检测单接口
		if (getThriftServiceType() == ThriftServiceType.SINGLE_INTERFACE) {
			if (clientClass == null) {
				throw new ThriftConnectionPoolException("thrift客户端实现类未设置");
			}
			// 检测ping方法
			try {
				clientClass.getMethod("ping");
			} catch (NoSuchMethodException e) {
				throw new ThriftConnectionPoolException("Thrift客户端实现类必须带有ping()方法用于检测连接");
			}
		} else if (getThriftServiceType() == ThriftServiceType.MULTIPLEXED_INTERFACE) {
			if (clientClasses.size() == 0) {
				throw new ThriftConnectionPoolException("多服务thrift客户端实现类未设置");
			}
			// 检测所有接口
			List<String> toRemoveClasses = new ArrayList<>();
			Iterator<Entry<String, Class<? extends TServiceClient>>> iterator = clientClasses.entrySet().iterator();
			while (iterator.hasNext()) {
				Entry<String, Class<? extends TServiceClient>> entry = iterator.next();
				Class<? extends TServiceClient> clazz = entry.getValue();
				try {
					clazz.getMethod("ping");
				} catch (NoSuchMethodException e) {
					toRemoveClasses.add(entry.getKey());
					logger.warn("接口：" + entry.getKey() + " 没有实现ping方法 无法创建对应的服务客户端");
				}
			}
			for (String toRemoveClass : toRemoveClasses) {
				clientClasses.remove(toRemoveClass);
			}
			Iterator<String> servicesNameIterator = clientClasses.keySet().iterator();
			while (servicesNameIterator.hasNext()) {
				logger.info("注册服务客户端：" + servicesNameIterator.next());
			}
		}

		if (maxConnectionPerServer <= 0) {
			throw new ThriftConnectionPoolException("每台服务器的最大连接数必须大于0");
		}

		if (minConnectionPerServer < 0) {
			throw new ThriftConnectionPoolException("每台服务器最小连接数不能小于0");
		}

		if (minConnectionPerServer > maxConnectionPerServer) {
			throw new ThriftConnectionPoolException("每台服务器的最小连接数不能超过最大连接数配置");
		}

		if (idleConnectionTestPeriodInSeconds <= 0) {
			throw new ThriftConnectionPoolException("检测时间周期必须大于0秒");
		}

		if (idleMaxAgeInSeconds <= 0) {
			throw new ThriftConnectionPoolException("未使用连接关闭时间必须大于0秒");
		}

		if (maxConnectionAgeInSeconds <= 0) {
			throw new ThriftConnectionPoolException("连接最大生存时间必须大于0秒");
		}

		if (acquireRetryAttempts < 0) {
			throw new ThriftConnectionPoolException("获取连接重试次数不能小于0");
		}

		if (acquireRetryDelayInMs < 0) {
			throw new ThriftConnectionPoolException("获取连接重试等待时间不能小于0毫秒");
		}

		if (connectionTimeoutInMs < 0) {
			throw new ThriftConnectionPoolException("获取连接等待时间不能小于0毫秒");
		}

		if (acquireIncrement <= 0) {
			throw new ThriftConnectionPoolException("每次创建原始连接的数量必须大于0个");
		}
	}
190735
public function onRequest($swooleRequest, $swooleResponse)
    {
        $this->app->make('events')->dispatch('swoole.request');

        $this->resetOnRequest();
        $sandbox = $this->app->make(Sandbox::class);
        $handleStatic = $this->container->make('config')->get('swoole_http.handle_static_files', true);
        $publicPath = $this->container->make('config')->get('swoole_http.server.public_path', base_path('public'));

        try {
            // handle static file request first
            if ($handleStatic && Request::handleStatic($swooleRequest, $swooleResponse, $publicPath)) {
                return;
            }
            // transform swoole request to illuminate request
            $illuminateRequest = Request::make($swooleRequest)->toIlluminate();

            // set current request to sandbox
            $sandbox->setRequest($illuminateRequest);

            // enable sandbox
            $sandbox->enable();

            // handle request via laravel/lumen's dispatcher
            $illuminateResponse = $sandbox->run($illuminateRequest);

            // send response
            Response::make($illuminateResponse, $swooleResponse)->send();
        } catch (Throwable $e) {
            try {
                $exceptionResponse = $this->app
                    ->make(ExceptionHandler::class)
                    ->render(
                        $illuminateRequest,
                        $this->normalizeException($e)
                    );
                Response::make($exceptionResponse, $swooleResponse)->send();
            } catch (Throwable $e) {
                $this->logServerError($e);
            }
        } finally {
            // disable and recycle sandbox resource
            $sandbox->disable();
        }
    }
448721
private boolean methodMatchsModelGET(Method method) {
		boolean condition = false;
		try {
			if (isModelCache.contains(method)) {
				condition = true;
				return condition;
			}

			String mehtodName = method.getName();
			if (method.getReturnType() == null)
				return condition; // 无返回值，不做缓存
			Class returnClass = method.getReturnType();
			if (returnClass.getSuperclass() == null)
				return condition; // 无返回值，不做缓存

			Debug.logVerbose(
					"[JdonFramework]methodMatchsModelGET: returnClassName = "
							+ returnClass.getName(), module);
			if (ModelUtil.isModel(returnClass)) {
				if (mehtodName.indexOf(match_MethodName) != -1) {
					condition = true;
					// method name include "getXXXX" and return Type is subClass
					// of Model
					isModelCache.add(method);
				}
			}
		} catch (Exception ex) {
			Debug.logError("[JdonFramework]Exception error:" + ex, module);
		} catch (Throwable the) {
			Debug.logError("[JdonFramework]Throwable error:" + the, module);
		}
		return condition;

	}
313924
private static void packagingAction(Method[] methods, Object handlerBean) {
        if (ArrayUtils.isEmpty(methods)) {
            return;
        }
        // 参数唯一，且为public
        Predicate<Method> commonFilter = method -> Modifier.isPublic(method.getModifiers())
                && method.getParameterCount() == 1
                && Objects.isNull(handlerBean) == Modifier.isStatic(method.getModifiers());

        Arrays.stream(methods).filter(commonFilter).forEach(method -> ConverterContext.setAction(method, handlerBean));
    }
1136574
public void releaseExceptionallyAndReset(Throwable e) {
        ArrayList<CompletableFuture<T>> toComplete = null;
        synchronized (lock) {
            if (!waitingFutures.isEmpty()) {
                toComplete = new ArrayList<>(waitingFutures);
                waitingFutures.clear();
            }
            released = false;
            this.e = null;
            result = null;
            runningThreadId = null;
        }
        if (toComplete != null) {
            for (CompletableFuture<T> f : toComplete) {
                f.completeExceptionally(e);
            }
        }
    }
874356
@AroundInvoke
    public Object handle(InvocationContext ic) throws Exception {
        Method m = ic.getMethod();
        Object targetObject = ic.getTarget();
        Class<?> targetClass = targetObject == null ? m.getDeclaringClass()
                : targetObject.getClass();
        CatchHandler exceptionHandlerAnnotation = AnnotationUtils
                .findAnnotation(m, targetClass, CatchHandler.class);
        Exception unexpectedException = null;

        if (exceptionHandlerAnnotation == null) {
            throw new IllegalStateException(
                    "The interceptor annotation can not be determined!");
        }

        CatchHandling[] exceptionHandlingAnnotations = exceptionHandlerAnnotation
                .value();
        Class<? extends Throwable>[] unwrap = exceptionHandlerAnnotation
                .unwrap();

        try {
            return ic.proceed();
        } catch (Exception ex) {
            if (!contains(unwrap, InvocationTargetException.class)) {
                unwrap = Arrays.copyOf(unwrap, unwrap.length + 1);
                unwrap[unwrap.length - 1] = InvocationTargetException.class;
            }

            // Unwrap Exception if ex is instanceof InvocationTargetException
            Throwable t = ExceptionUtils.unwrap(ex,
                    InvocationTargetException.class);
            boolean exceptionHandled = false;
            boolean cleanupInvoked = false;

            if (exceptionHandlingAnnotations.length > 0) {
                for (CatchHandling handling : exceptionHandlingAnnotations) {
                    if (handling.exception().isInstance(t)) {
                        try {
                            handleThrowable(t);
                            exceptionHandled = true;
                        } catch (Exception unexpected) {
                            unexpectedException = unexpected;
                        }

                        // Only invoke cleanup declared at handling level
                        if (!handling.cleanup().equals(Object.class)) {
                            cleanupInvoked = invokeCleanups(targetClass, targetObject,
                                    handling.cleanup(), t);
                        }

                        break;
                    }
                }
            }

            // Handle the default exception type if no handlings are
            // declared or the handling did not handle the exception
            if (!exceptionHandled) {
                if (exceptionHandlerAnnotation.exception().isInstance(t)) {
                    try {
                        handleThrowable(t);
                        exceptionHandled = true;
                    } catch (Exception unexpected) {
                        unexpectedException = unexpected;
                    }

                    if (!exceptionHandlerAnnotation.cleanup().equals(
                            Object.class) && !cleanupInvoked) {
                        if (!cleanupInvoked) {
                            invokeCleanups(targetClass, targetObject,
                                    exceptionHandlerAnnotation.cleanup(), t);
                        }
                    }
                }
            }

            if (!exceptionHandled) {
                if (t instanceof Exception) {
                    unexpectedException = (Exception) t;
                } else {
                    unexpectedException = new Exception(t);
                }
            }
        }

        if (unexpectedException != null) {
            throw unexpectedException;
        }

        return null;
    }
767417
public void handleException(Throwable e) {
    while (e instanceof InvocationTargetException) {
      e = ((InvocationTargetException) e).getTargetException();
    }

    if (e instanceof SQLException) {
      handleSQLException((SQLException) e);
    } else if (e instanceof WrappedSqlException) {
      handleSQLException((SQLException) e.getCause());
    } else if (!initComplete && !getOpts().getVerbose()) {
      // all init errors must be verbose
      if (e.getMessage() == null) {
        error(e.getClass().getName());
      } else {
        error(e.getMessage());
      }
    } else {
      e.printStackTrace(getErrorStream());
    }
  }