gpt4 book ai didi

java - GWT 2.8 编译器警告

转载 作者:搜寻专家 更新时间:2023-11-01 02:21:27 27 4
gpt4 key购买 nike

当我从 GWT 2.7 切换到 2.8 时,我开始收到以下警告。我正在使用 ant 和 Oracle Java 7 从命令行进行编译。当我切换回 GWT 2.7 时,我没有收到任何这些警告

                           [WARN] Ignoring unresolvable annotation type java.lang.FunctionalInterface
[java] Resolving java.lang.Runnable
[java] Found type 'java.lang.Runnable'
[java] [WARN] Ignoring unresolvable annotation type java.lang.FunctionalInterface
[java] Resolving java.util.Arrays
[java] Found type 'java.util.Arrays'
[java] Resolving method parallelPrefix
[java] Found type 'java.util.function.BinaryOperator'
[java] [WARN] Ignoring unresolvable annotation type java.lang.FunctionalInterface
[java] Found type 'java.util.function.BiFunction'
[java] [WARN] Ignoring unresolvable annotation type java.lang.FunctionalInterface
[java] Resolving method setAll
[java] Found type 'java.util.function.IntFunction'
[java] [WARN] Ignoring unresolvable annotation type java.lang.FunctionalInterface
[java] Resolving method stream
[java] Found type 'java.util.stream.Stream'
[java] Resolving method collect
[java] Found type 'java.util.stream.Collector'
[java] Resolving method supplier
[java] Found type 'java.util.function.Supplier'
[java] [WARN] Ignoring unresolvable annotation type java.lang.FunctionalInterface
[java] Resolving method accumulator
[java] Found type 'java.util.function.BiConsumer'
[java] [WARN] Ignoring unresolvable annotation type java.lang.FunctionalInterface
[java] Resolving method flatMapToDouble
[java] Found type 'java.util.stream.DoubleStream'
[java] Resolving method collect
[java] Found type 'java.util.function.ObjDoubleConsumer'
[java] [WARN] Ignoring unresolvable annotation type java.lang.FunctionalInterface
[java] Resolving method flatMap
[java] Found type

最佳答案

java.lang.FunctionalInterface 是在 Java 8 中添加的,GWT 从类路径解析注解,因此,由于 Java Runtime Emulation 库已更新到 Java 8,当将 GWT 2.8 与 Java 7 VM 结合使用。

因为 Java 7 已经 EOL 一段时间了,所以在这种情况下出现这些警告被认为是可以接受的。独立于 GWT,我们鼓励您迁移到 Java 8。

关于java - GWT 2.8 编译器警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40774023/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com