Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8281286

jdeprscan is scanning class-path items for deprecations when wildcard(*) is used

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 21
    • tools
    • None

      If you star (*) the --class-path option, and it matches on multiple items, the subsequent matches to the first one, in alphanumerical order, in the class-path will be scanned as if they are part of the primary target being scanned.

      Example:
      "Manually" added the jars logback-classic-1.2.3.jar & logback-core-1.2.3.jar to classpath, only the target class(es) is scanned:

      target $ jdeprscan --class-path logback-classic-1.2.3.jar:logback-core-1.2.3.jar someClass.class
      class DeprecatedAPIs uses deprecated method java/lang/Long::<init>(J)V (forRemoval=true)
      class DeprecatedAPIs uses deprecated method java/lang/Runtime$Version::major()I
      class DeprecatedAPIs uses deprecated method java/lang/Runtime$Version::minor()I

      Adding the same jars, but with wildcard "logback*", logback-core-1.2.3.jar (because it is sorted after logback-classic-1.2.3.jar) and the target class(es) are scanned:

      target $ jdeprscan --class-path logback* someClass.class
      Jar file logback-core-1.2.3.jar:
      error: cannot find class org/codehaus/janino/ScriptEvaluator
      error: cannot find class org/codehaus/janino/ClassBodyEvaluator
      class ch/qos/logback/core/joran/spi/ConfigurationWatchList uses deprecated method java/net/URLDecoder::decode(Ljava/lang/String;)Ljava/lang/String;
      class ch/qos/logback/core/joran/util/StringToObjectConverter uses deprecated method java/lang/Integer::<init>(Ljava/lang/String;)V (forRemoval=true)
      class ch/qos/logback/core/joran/util/StringToObjectConverter uses deprecated method java/lang/Long::<init>(Ljava/lang/String;)V (forRemoval=true)
      class ch/qos/logback/core/joran/util/StringToObjectConverter uses deprecated method java/lang/Float::<init>(Ljava/lang/String;)V (forRemoval=true)
      class ch/qos/logback/core/joran/util/StringToObjectConverter uses deprecated method java/lang/Double::<init>(Ljava/lang/String;)V (forRemoval=true)
      error: cannot find class javax/mail/Authenticator
      error: cannot find class javax/mail/PasswordAuthentication
      error: cannot find class javax/mail/Session
      error: cannot find class javax/mail/internet/InternetAddress
      error: cannot find class javax/mail/internet/MimeBodyPart
      error: cannot find class javax/mail/internet/MimeMessage
      error: cannot find class javax/mail/internet/MimeMultipart
      error: cannot find class javax/mail/Multipart
      error: cannot find class javax/mail/Transport
      error: cannot find class javax/mail/Message$RecipientType
      class ch/qos/logback/core/rolling/helper/FileFilterUtil uses deprecated method java/lang/Integer::<init>(Ljava/lang/String;)V (forRemoval=true)
      error: cannot find class javax/servlet/http/HttpServlet
      error: cannot find class javax/servlet/http/HttpServletResponse
      error: cannot find class javax/servlet/http/HttpServletRequest
      class ch/qos/logback/core/util/Loader$1 uses deprecated class java/security/AccessController (forRemoval=true)
      class ch/qos/logback/core/util/Loader uses deprecated class java/security/AccessController (forRemoval=true)
      class DeprecatedAPIs uses deprecated method java/lang/Long::<init>(J)V (forRemoval=true)
      class DeprecatedAPIs uses deprecated method java/lang/Runtime$Version::major()I
      class DeprecatedAPIs uses deprecated method java/lang/Runtime$Version::minor()I

            smarks Stuart Marks
            bkorando Billy Korando
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: