RFR(s): 8165646 (jdeprscan) adjust tool output to improve clarity
Stuart Marks
stuart.marks at oracle.com
Thu Oct 27 20:42:41 UTC 2016
Oh yes, good point about line breaks in multi-line messages. I looked around for
techniques to deal with this, and I found that javap simply does a string
replace() operation to change the line breaks prior to output. I've retrofitted
a similar technique into jdeprscan's messages.
Revised webrev:
http://cr.openjdk.java.net/~smarks/reviews/8165646/webrev.1/
s'marks
On 10/25/16 4:17 PM, Jonathan Gibbons wrote:
> Not entirely (but somewhat) related to this review, the message reporting is
> suspect. You use out.println, which will do the right thing with respect to
> line endings on Windows, but the strings you print have embedded \n characters,
> which will not be translated into the correct separator on Windows.
>
> In javac, we use methods that break the string to be printed into lines, and
> then println each line separately.
>
> -- Jon
>
>
> On 10/25/16 3:19 PM, Stuart Marks wrote:
>> Hi all,
>>
>> Please review this change to jdeprscan.
>>
>> I've rearranged and cleaned up the output of jdeprscan so that it's a bit more
>> readable (though only a bit) and to remove some checks, eliminating redundant
>> output. For example, one case in the regression test output used to be
>>
>> class jdk/jdeprusage/UseClass$Construct uses type
>> jdk/deprcases/types/DeprecatedClass deprecated
>> class jdk/jdeprusage/UseClass$Construct uses method in type
>> jdk/deprcases/types/DeprecatedClass deprecated
>>
>> and now it is
>>
>> class jdk/jdeprusage/UseClass$Construct uses deprecated class
>> jdk/deprcases/types/DeprecatedClass
>>
>> I also changed things to continue processing arguments if an error has
>> occurred, and to support direct reading of .class files as well as loading
>> class names from the class path.
>>
>> Webrev:
>>
>> http://cr.openjdk.java.net/~smarks/reviews/8165646/webrev.0/
>>
>> Thanks,
>>
>> s'marks
>
More information about the compiler-dev
mailing list