RFR: JDK-8215217: OpenJDK Source Has Too Many Swear Words

Stuart Marks stuart.marks at oracle.com
Wed Dec 12 00:38:32 UTC 2018

On 12/11/18 1:52 PM, mark.reinhold at oracle.com wrote:
> 2018/12/11 7:03:57 -0800, adam.farley at uk.ibm.com:
>> I've spotted 12 instances of swear words in OpenJDK source comments, and
>> it seems appropriate to remove them.
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8215217
> (webrev: http://cr.openjdk.java.net/~afarley/8215217/webrev/)
> I can certainly see removing the f-word, and other words of a sexual
> nature.  Those are clearly inappropriate.
> Removing lesser words, and continuing to police their use henceforth,
> strikes me as overkill.
> What do other Committers think?

I think it is faintly ridiculous to consider words like "crap" and "damn" as 
vulgarities to be removed from source code. None of my dictionaries describe 
"crap" or "damn" as vulgar, while they do describe other words as vulgar.

The "Where's that damn torpedo?" quote came from "Star Trek VI", which was rated 
PG. [1] In the MPAA rating system, PG is the second-least restrictive rating, 
above only the all-ages G rating. More-restrictive ratings include PG-13, R, and 
NC-17. [2] The word "damn" or a variant occurs about five times in that movie. [3]

The MPAA takes language and swearing very seriously, with fairly strict 
guidelines on the number of f-bombs and their context to determine a rating of 
PG-13 or R. [4] Film producers will edit very carefully in order to achieve a 
particular rating. [5]

Given that the producers of "The Martian" had to edit carefully in order to 
preserve its PG-13 rating, whereas "Star Trek VI" and its five "damns" sailed 
through with a PG rating, I think it's safe to say that the notoriously Puritan 
MPAA [6] doesn't concern itself with the word "damn." Neither should we.



Starting from your patch, I've removed changes relating to "crap" and "damn" and 
the changes to upstream jszip.js. This leaves the patches appended below. The 
SoftChannel.java change is most likely a typo that should be fixed. The 
BitArray.java change is part of Xalan. We don't actually keep our sources in 
sync with Xalan, but I note that upstream [7] has made the same change, so we 
might as well change it too.

Would you like me to sponsor this change for you?


[1] https://www.imdb.com/title/tt0102975/

[2] https://filmratings.com/Tips

[3] http://www.chakoteya.net/movies/movie6.html

[4] https://filmratings.com/Content/Downloads/rating_rules.pdf

[5] https://www.polygon.com/2015/10/22/9592366/The-martian-rating-fuck [warning, 

[6] No link, but a web search for "mpaa puritanism" will reveal an unbounded 
number of articles railing against the arbitrary moralizing imposed by the MPAA 
via its ratings system.



# HG changeset patch
# User afarley
# Date 1544574289 28800
#      Tue Dec 11 16:24:49 2018 -0800
# Node ID 0c40c78b6d139eb05b0718d0b524a465419ee9cb
# Parent  b75a44aad06cd93c823159265a1f200bf0ce390c
8215217: OpenJDK Source Has Too Many Swear Words

diff -r b75a44aad06c -r 0c40c78b6d13 
--- a/src/java.desktop/share/classes/com/sun/media/sound/SoftChannel.java	Tue 
Dec 11 13:10:14 2018 -0800
+++ b/src/java.desktop/share/classes/com/sun/media/sound/SoftChannel.java	Tue 
Dec 11 16:24:49 2018 -0800
@@ -1472,7 +1472,7 @@
                  for (int controller : co_midi_nrpn_nrpn.keySet())
                      nrpnChange(controller, 0);
-                rpnChange(0, 2 << 7);   // Bitch Bend sensitivity
+                rpnChange(0, 2 << 7);   // Pitch Bend sensitivity
                  rpnChange(1, 64 << 7);  // Channel fine tunning
                  rpnChange(2, 64 << 7);  // Channel Coarse Tuning
                  rpnChange(5, 64);       // Modulation Depth, +/- 50 cent
diff -r b75a44aad06c -r 0c40c78b6d13 
Tue Dec 11 13:10:14 2018 -0800
Tue Dec 11 16:24:49 2018 -0800
@@ -133,7 +133,7 @@
       * This method returns the Nth bit that is set in the bit array. The
       * current position is cached in the following 4 variables and will
       * help speed up a sequence of next() call in an index iterator. This
-     * method is a mess, but it is fast and it works, so don't fuck with it.
+     * method is a mess, but it is fast and it works, so don't change it.
      private int _pos = Integer.MAX_VALUE;
      private int _node = 0;

More information about the core-libs-dev mailing list