04 July 2011

Awkward Javadoc comments

There are several funny Javadoc/Source code explaining methods, properties and/or examples:

1. Catastrophic :

public interface ClusterLeaderListener 

void localServerLostClusterLeadership()

This method is called if the local server is already the cluster leader i.e. localServerIsClusterLeader() has already been called and subsequently the server loses the cluster leadership. This can only happen under catastrophic conditions. This condition is fatal. 

2. Draconian :


class DraconianErrorHandler implements ErrorHandler {
     public void fatalError( SAXParseException e ) throws SAXException {
         throw e;
     public void error( SAXParseException e ) throws SAXException {
         throw e;
     public void warning( SAXParseException e ) throws SAXException {
         // noop

3. Draconian' :


public static final org.xml.sax.ErrorHandler DRACONIAN_ERROR_HANDLER

// ErrorHandler that always treat the error as fatal.


update 2019-01
4.  do you want to debug ?

 static char* do_you_want_to_debug(const char* message);


5. OpenJDK source has too many swear words

-                rpnChange(0, 2 << 7);   // Bitch Bend sensitivity
+                rpnChange(0, 2 << 7);   // Pitch Bend sensitivity
-     * 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.


My Blog List

Blog Archive


The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.