We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@Async private JPromise<Void> simpleAwait() { Object obj = null; // 这种写法没问题 if (obj instanceof String) { String stringObj = (String) obj; JAsync.just(null).await(); System.out.println(stringObj); } // 这种写法编译报错 if (obj instanceof String stringObj) { JAsync.just(null).await(); System.out.println(stringObj); } return JAsync.just(null); } public static void main(String[] args) { App app = new App(); System.out.println(app.simpleAwait().block()); }
报 System.out.println(stringObj); ^ 符号: 变量 stringObj 位置: 类 App
The text was updated successfully, but these errors were encountered:
No branches or pull requests
报
System.out.println(stringObj);
^
符号: 变量 stringObj
位置: 类 App
The text was updated successfully, but these errors were encountered: