RFR: 8255416: Investigate err_msg to detect unnecessary uses

Anton Kozlov akozlov at openjdk.java.net
Wed Oct 28 16:53:00 UTC 2020


Hi,

When a single string without formatting arguments is provided to `err_msg`, it's redundancy, as the same message could be used without any err_msg. This is a follow-up to the discussion https://github.com/openjdk/jdk/pull/812#discussion_r511784050

Please review a change that makes `err_msg` with a single string to fail compilation. 

Detected uses of err_msg with a single string were eliminated as well.

-------------

Commit messages:
 - Fix unnecessary err_msg uses
 - Prevent err_msg without format arguments

Changes: https://git.openjdk.java.net/jdk/pull/905/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=905&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8255416
  Stats: 34 lines in 9 files changed: 18 ins; 0 del; 16 mod
  Patch: https://git.openjdk.java.net/jdk/pull/905.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/905/head:pull/905

PR: https://git.openjdk.java.net/jdk/pull/905


More information about the shenandoah-dev mailing list