04 July 2011

Awkward Javadoc comments

There are several funny Javadocs 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

No comments :

My Blog List

Blog Archive

There was an error in this gadget

Disclaimer

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