• Usage of API documented as @since 1.8+ less... (Ctrl+F1) Inspection info: This inspection finds all usages of methods that have @since tag in their documentation.


    1.不知道小伙伴们在日常开发过程中使用stream流的时候,有没有遇到这样的情况, 发现stream()方法是红色的 , 这是编译工具提醒的, 估计是出现了什么问题, 如下图所示:

    2.当我们把鼠标移到报红地方的时候 ,编译工具会给我们提示如下信息. 一长串的英文字符, 所以我们看可以先来看看这个提示信息大概是什么意思?

    3.Usage of API documented as @since 1.8+ less... (Ctrl+F1) 

    Inspection info: This inspection finds all usages of methods that have @since tag in their documentation. 

    This may be useful when development is performed under newer SDK version as the target platform for production. 

    这段提示信息大概的意思是:

    api文档从1.8版本开始使用

    检查信息:这次检查发现了所有使用的方法在它的文档中都有标签

    当以较新的SDK版本作为生产的目标平台进行开发时,这可能很有用。

    4.解决方式:如下图操作进入到项目的结构配置当中去

    选择对应的module, 设置source对应的Language level 为报红提示对应的版本, 信息提示的是需要api支持1.8及其以上的版本, 因此,可以设置为8 -Lambdas, type annotations etc. 然后点击应用, 确定.

    5.这时候再使用stream的时候,没有报红了,已经恢复正常了.

  • 相关阅读:
    [Azure][PowerShell][ASM][03]Cloud Service
    linux ssh连接自动断开问题
    NTP服务器实现
    xshell使用小技巧
    elasticsearch集群部署
    redis集群部署
    积分排名查看
    linux centos7.2系统升级python后yum不能使用的问题
    Python生成器generator之next和send运行流程
    python文件操作
  • 原文地址:https://www.cnblogs.com/lu97/p/14784608.html
Copyright © 2020-2023  润新知