[11] RFR JDK-8196127: Dead code in VersionProps.java.template (original) (raw)

mandy chung mandy.chung at oracle.com
Fri Jan 26 03:41:58 UTC 2018


I like code deletion! Mandy

On 1/25/18 6:24 PM, David Holmes wrote:

Wow that was fast! :)

Looks good. Thanks, David On 26/01/2018 5:33 AM, mandy chung wrote: Trivial fix to remove unused isHeadless variable.

$ hg diff src/java.base/share/classes/java/lang/VersionProps.java.template diff --git a/src/java.base/share/classes/java/lang/VersionProps.java.template b/src/java.base/share/classes/java/lang/VersionProps.java.template --- a/src/java.base/share/classes/java/lang/VersionProps.java.template +++ b/src/java.base/share/classes/java/lang/VersionProps.java.template @@ -166,15 +166,8 @@ * Print version info. */ private static void print(boolean err, boolean newln) { -        boolean isHeadless = false; PrintStream ps = err ? System.err : System.out; -        /* Report that we're running headless if the property is true */ -        String headless = System.getProperty("java.awt.headless"); -        if ( (headless != null) && (headless.equalsIgnoreCase("true")) ) { -            isHeadless = true; -        } - /* First line: platform version. */ if (err) { ps.println(launchername + " version "" + javaversion + """ Mandy



More information about the core-libs-dev mailing list