geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: incubator-geronimo/modules/common/src/java/org/apache/geronimo/common/propertyeditor InetAddressEditor.java
Date Fri, 09 Apr 2004 18:46:56 GMT
dain        2004/04/09 11:46:56

  Added:       modules/common/src/java/org/apache/geronimo/common/propertyeditor
                        InetAddressEditor.java
  Log:
  Property editor for InetAddress
  
  Revision  Changes    Path
  1.1                  incubator-geronimo/modules/common/src/java/org/apache/geronimo/common/propertyeditor/InetAddressEditor.java
  
  Index: InetAddressEditor.java
  ===================================================================
  /**
   *
   * Copyright 2004 The Apache Software Foundation
   *
   *  Licensed under the Apache License, Version 2.0 (the "License");
   *  you may not use this file except in compliance with the License.
   *  You may obtain a copy of the License at
   *
   *     http://www.apache.org/licenses/LICENSE-2.0
   *
   *  Unless required by applicable law or agreed to in writing, software
   *  distributed under the License is distributed on an "AS IS" BASIS,
   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *  See the License for the specific language governing permissions and
   *  limitations under the License.
   */
  package org.apache.geronimo.common.propertyeditor;
  
  import java.net.InetAddress;
  import java.net.UnknownHostException;
  
  /**
   *
   *
   * @version $Revision: 1.1 $ $Date: 2004/04/09 18:46:56 $
   */
  public class InetAddressEditor extends TextPropertyEditorSupport {
  
      public Object getValue() {
          try {
              return InetAddress.getByName(getAsText());
          } catch (UnknownHostException e) {
              throw new PropertyEditorException(e);
          }
      }
  }
  
  
  

Mime
View raw message