src/jdk.jdeps/share/man/jdeprscan.1
author weijun
Thu, 24 Oct 2019 15:53:20 +0800
changeset 58776 ea153023d832
parent 55140 d4890c3721be
permissions -rw-r--r--
8231598: keytool does not export sun.security.mscapi Reviewed-by: mullan
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
55140
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
     1
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
     2
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
     3
.\"
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
     4
.\" This code is free software; you can redistribute it and/or modify it
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
     5
.\" under the terms of the GNU General Public License version 2 only, as
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
     6
.\" published by the Free Software Foundation.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
     7
.\"
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
     8
.\" This code is distributed in the hope that it will be useful, but WITHOUT
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
     9
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    10
.\" FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    11
.\" version 2 for more details (a copy is included in the LICENSE file that
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    12
.\" accompanied this code).
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    13
.\"
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    14
.\" You should have received a copy of the GNU General Public License version
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    15
.\" 2 along with this work; if not, write to the Free Software Foundation,
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    16
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    17
.\"
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    18
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    19
.\" or visit www.oracle.com if you need additional information or have any
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    20
.\" questions.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    21
.\"
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    22
.\" Automatically generated by Pandoc 2.3.1
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    23
.\"
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    24
.TH "JDEPRSCAN" "1" "2018" "JDK 13" "JDK Commands"
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    25
.hy
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    26
.SH NAME
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    27
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    28
jdeprscan \- static analysis tool that scans a jar file (or some other
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    29
aggregation of class files) for uses of deprecated API elements
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    30
.SH SYNOPSIS
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    31
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    32
\f[CB]jdeprscan\f[R] [\f[I]options\f[R]]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    33
{\f[I]dir\f[R]|\f[I]jar\f[R]|\f[I]class\f[R]}
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    34
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    35
.B \f[I]options\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    36
See \f[B]Options for the jdeprscan Command\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    37
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    38
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    39
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    40
.B \f[I]dir\f[R]|\f[I]jar\f[R]|\f[I]class\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    41
\f[CB]jdeprscan\f[R] command scans each argument for usages of deprecated
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    42
APIs.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    43
The arguments can be a:
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    44
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    45
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    46
\f[I]dir\f[R]: Directory
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    47
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    48
\f[I]jar\f[R]: JAR file
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    49
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    50
\f[I]class\f[R]: Class name or class file
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    51
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    52
The class name should use a dot (\f[CB]\&.\f[R]) as a separator.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    53
For example:
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    54
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    55
\f[CB]java.lang.Thread\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    56
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    57
For nested classes, the dollar sign \f[CB]$\f[R] separator character
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    58
should be used.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    59
For example:
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    60
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    61
\f[CB]java.lang.Thread$State\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    62
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    63
A class file can also be named.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    64
For example:
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    65
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    66
\f[CB]build/classes/java/lang/Thread$State.class\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    67
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    68
.SH DESCRIPTION
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    69
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    70
The \f[CB]jdeprscan\f[R] tool is a static analysis tool provided by the
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    71
JDK that scans a JAR file or some other aggregation of class files for
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    72
uses of deprecated API elements.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    73
The deprecated APIs identified by the \f[CB]jdeprscan\f[R] tool are only
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    74
those that are defined by Java SE.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    75
Deprecated APIs defined by third\-party libraries aren\[aq]t reported.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    76
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    77
To scan a JAR file or a set of class files, you must first ensure that
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    78
all of the classes that the scanned classes depend upon are present in
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    79
the class path.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    80
Set the class path using the \f[CB]\-\-class\-path\f[R] option described
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    81
in \f[B]Options for the jdeprscan Command\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    82
Typically, you would use the same class path as the one that you use
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    83
when invoking your application.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    84
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    85
If the \f[CB]jdeprscan\f[R] can\[aq]t find all the dependent classes, it
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    86
will generate an error message for each class that\[aq]s missing.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    87
These error messages are typically of the form:
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    88
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    89
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    90
\f[CB]error:\ cannot\ find\ class\ ...\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    91
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    92
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    93
If these errors occur, then you must adjust the class path so that it
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    94
includes all dependent classes.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    95
.SH OPTIONS FOR THE JDEPRSCAN COMMAND
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    96
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    97
The following options are available:
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    98
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
    99
.B \f[CB]\-\-class\-path\f[R] \f[I]path\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   100
Provides a search path for resolution of dependent classes.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   101
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   102
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   103
\f[I]path\f[R] can be a search path that consists of one or more
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   104
directories separated by the system\-specific path separator.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   105
For example:
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   106
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   107
\f[B]Oracle Solaris, Linux, and OS X:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   108
.RS 2
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   109
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   110
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   111
\f[CB]\-\-class\-path\ /some/directory:/another/different/dir\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   112
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   113
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   114
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   115
\f[B]Note:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   116
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   117
On Windows, use a semicolon (\f[CB];\f[R]) as the separator instead of a
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   118
colon (\f[CB]:\f[R]).
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   119
.IP \[bu] 2
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   120
\f[B]Windows:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   121
.RS 2
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   122
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   123
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   124
\f[CB]\-\-class\-path\ \\some\\directory;\\another\\different\\dir\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   125
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   126
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   127
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   128
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   129
.B \f[CB]\-\-for\-removal\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   130
Limits scanning or listing to APIs that are deprecated for removal.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   131
Can\[aq]t be used with a release value of 6, 7, or 8.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   132
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   133
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   134
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   135
.B \f[CB]\-\-full\-version\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   136
Prints out the full version string of the tool.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   137
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   138
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   139
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   140
.B \f[CB]\-\-help\f[R] or \f[CB]\-h\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   141
Prints out a full help message.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   142
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   143
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   144
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   145
.B \f[CB]\-\-list\f[R] or \f[CB]\-l\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   146
Prints the set of deprecated APIs.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   147
No scanning is done, so no directory, jar, or class arguments should be
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   148
provided.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   149
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   150
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   151
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   152
.B \f[CB]\-\-release\f[R] \f[CB]6\f[R]|\f[CB]7\f[R]|\f[CB]8\f[R]|\f[CB]9\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   153
Specifies the Java SE release that provides the set of deprecated APIs
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   154
for scanning.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   155
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   156
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   157
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   158
.B \f[CB]\-\-verbose\f[R] or \f[CB]\-v\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   159
Enables additional message output during processing.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   160
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   161
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   162
.TP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   163
.B \f[CB]\-\-version\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   164
Prints out the abbreviated version string of the tool.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   165
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   166
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   167
.SH EXAMPLE OF JDEPRSCAN OUTPUT
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   168
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   169
The JAR file for this library will be named something similar to
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   170
\f[CB]commons\-math3\-3.6.1.jar\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   171
To scan this JAR file for the use of deprecated APIs, run the following
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   172
command:
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   173
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   174
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   175
\f[CB]jdeprscan\ commons\-math3\-3.6.1.jar\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   176
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   177
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   178
This command produces several lines of output.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   179
For example, one line of output might be:
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   180
.IP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   181
.nf
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   182
\f[CB]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   183
class\ org/apache/commons/math3/util/MathUtils\ uses\ deprecated\ method\ java/lang/Double::<init>(D)V
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   184
\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   185
.fi
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   186
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   187
\f[B]Note:\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   188
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   189
The class name is specified using the slash\-separated binary name as
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   190
described in JVMS 4.2.1.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   191
This is the form used internally in class files.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   192
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   193
The deprecated API it uses is a method on the \f[CB]java.lang.Double\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   194
class.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   195
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   196
The name of the deprecated method is \f[CB]<init>\f[R], which is a special
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   197
name that means that the method is actually a constructor.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   198
Another special name is \f[CB]<clinit>\f[R], which indicates a class
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   199
static initializer.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   200
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   201
Other methods are listed just by their method name.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   202
Following the method name is the argument list and return type:
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   203
.RS
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   204
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   205
\f[CB](D)V\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   206
.RE
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   207
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   208
This indicates that it takes just one double value (a primitive) and
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   209
returns void.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   210
The argument and return types can become cryptic.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   211
For example, another line of output might be:
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   212
.IP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   213
.nf
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   214
\f[CB]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   215
class\ org/apache/commons/math3/util/Precision\ uses\ deprecated\ method\ java/math/BigDecimal::setScale(II)Ljava/math/BigDecimal;
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   216
\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   217
.fi
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   218
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   219
In this line of output, the deprecated method is on class
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   220
\f[CB]java.math.BigDecimal\f[R], and the method is \f[CB]setScale()\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   221
In this case, the \f[CB](II)\f[R] means that it takes two \f[CB]int\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   222
arguments.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   223
The \f[CB]Ljava/math/BigDecimal;\f[R] after the parentheses means that it
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   224
returns a reference to \f[CB]java.math.BigDecimal\f[R].
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   225
.SH JDEPRSCAN ANALYSIS CAN BE VERSION\-SPECIFIC
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   226
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   227
You can use \f[CB]jdeprscan\f[R] relative to the previous three JDK
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   228
releases.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   229
For example, if you are running JDK 9, then you can check against JDK 8,
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   230
7, and 6.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   231
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   232
As an example, look at this code snippet:
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   233
.IP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   234
.nf
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   235
\f[CB]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   236
public\ class\ Deprecations\ {
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   237
\ \ \ SecurityManager\ sm\ =\ new\ RMISecurityManager();\ \ \ \ //\ deprecated\ in\ 8
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   238
\ \ \ Boolean\ b2\ =\ new\ Boolean(true);\ \ \ \ \ \ \ \ \ \ //\ deprecated\ in\ 9
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   239
}
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   240
\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   241
.fi
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   242
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   243
The complete class compiles without warnings in JDK 7.
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   244
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   245
If you run \f[CB]jdeprscan\f[R] on a system with JDK 9, then you see:
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   246
.IP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   247
.nf
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   248
\f[CB]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   249
$\ jdeprscan\ \-\-class\-path\ classes\ \-\-release\ 7\ example.Deprecations
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   250
(no\ output)
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   251
\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   252
.fi
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   253
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   254
Run \f[CB]jdeprscan\f[R] with a release value of 8:
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   255
.IP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   256
.nf
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   257
\f[CB]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   258
$\ jdeprscan\ \-\-class\-path\ classes\ \-\-release\ 8\ example.Deprecations
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   259
class\ example/Deprecations\ uses\ type\ java/rmi/RMISecurityManager\ deprecated
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   260
class\ example/Deprecations\ uses\ method\ in\ type\ java/rmi/RMISecurityManager\ deprecated
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   261
\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   262
.fi
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   263
.PP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   264
Run \f[CB]jdeprscan\f[R] on JDK 9:
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   265
.IP
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   266
.nf
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   267
\f[CB]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   268
$\ jdeprscan\ \-\-class\-path\ classes\ example.Deprecations
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   269
class\ example/Deprecations\ uses\ type\ java/rmi/RMISecurityManager\ deprecated
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   270
class\ example/Deprecations\ uses\ method\ in\ type\ java/rmi/RMISecurityManager\ deprecated
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   271
class\ example/Deprecations\ uses\ method\ java/lang/Boolean\ <init>\ (Z)V\ deprecated
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   272
\f[R]
d4890c3721be 8225134: Update man-page files
jjg
parents:
diff changeset
   273
.fi