File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/main/java/org/observabilitystack/geoip/web Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 22
33import java .beans .PropertyEditorSupport ;
44
5+ import org .slf4j .Logger ;
6+ import org .slf4j .LoggerFactory ;
7+
58import com .google .common .net .InetAddresses ;
69
710import static com .google .common .base .Preconditions .checkNotNull ;
811
912public class InetAdressPropertyEditor extends PropertyEditorSupport {
1013
14+ private final Logger logger = LoggerFactory .getLogger (getClass ());
15+
1116 @ Override
1217 public void setAsText (String text ) {
1318 checkNotNull (text , "Pre-condition violated: text must not be null." );
1419
1520 try {
1621 setValue (InetAddresses .forString (text ));
1722 } catch (IllegalArgumentException e ) {
18- throw new InvalidIpAddressException (e .getMessage ());
23+ logger .info ("Invalid IP address given: {}" , e .getMessage ());
24+ throw new InvalidIpAddressException ("Invalid IP address given" );
1925 }
2026 }
2127}
You can’t perform that action at this time.
0 commit comments