Examples of PropertyEditorException


Examples of org.apache.geronimo.common.propertyeditor.PropertyEditorException

   
    public void setAsText(String text) throws IllegalArgumentException {
        StringTokenizer tokenizer = new StringTokenizer(text, ",");

        if ( !tokenizer.hasMoreElements() ) {
            throw new PropertyEditorException("<InetAddress>,<port>");
        }
        InetAddressEditor addressEditor = new InetAddressEditor();
        addressEditor.setAsText((String) tokenizer.nextElement());
        InetAddress address = (InetAddress) addressEditor.getValue();
       
        if ( !tokenizer.hasMoreElements() ) {
            throw new PropertyEditorException("<InetAddress>,<port>");
        }
        int port = Integer.parseInt((String) tokenizer.nextElement());
        info = new ClusterInfo(address, port);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.