04 July 2011

Awkward Javadoc comments

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

1. Catastrophic :
weblogic.cluster.singleton

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 :
javax.xml.validation.Validator 

setErrorHandler:

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' :


DRACONIAN_ERROR_HANDLER

public static final org.xml.sax.ErrorHandler DRACONIAN_ERROR_HANDLER

// ErrorHandler that always treat the error as fatal.


http://javasourcecode.org/html/open-source/jdk/jdk-6u23/com/sun/xml/internal/ws/util/xml/XmlUtil.java.html#line.300

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

 static char* do_you_want_to_debug(const char* message);

http://hg.openjdk.java.net/jdk8u/jdk8u-dev/hotspot/file/d3cc20285653/src/share/vm/runtime/os.hpp#l502

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.
  

https://bugs.openjdk.java.net/browse/JDK-8215217
http://hg.openjdk.java.net/jdk/jdk/rev/2cc1ae79b303





My Blog List

Blog Archive

Disclaimer

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