question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for more java.net.* classes

See original GitHub issue

I’d primarily be interested in support java.net.InetAddress and java.net.InetSocketAddress.

Field type Factory
InetAddress InetAddress::getByName
InetAddress[] InetAddress::getAllByName
InetSocketAddress InetSocketAddress::new (may need to split on last : of string, or accept a map of hostname and port for construction)

Just for completion’s sake, it may be nice to also support NetworkInterface as that can convert via a string (NetworkInterface::getByName) or an int (NetworkInterface::getByIndex), though I’m not sure how useful it would be in comparison.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
derekmorrcommented, Nov 7, 2017

There are some ways around this:

I definitely think it’s useful to have pureconfig support for InetAddress. I’m fine using the standard library’s InetAddress helper functions as they’re pure as long as you give the right input.

0reactions
LeifWcommented, Aug 18, 2020

Would InetSocketAddress.createUnresolved be an option for this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Package java.net - Oracle Help Center
Package java.net ; InetAddress. This class represents an Internet Protocol (IP) address. ; InetSocketAddress. This class implements an IP Socket Address (IP ...
Read more >
Examples on Various Classes of java.net Package - eduCBA
Java.net is a package that provides a set of classes as well as interfaces for networking in Java. Some of the classes are...
Read more >
java.net.Socket Class in Java - GeeksforGeeks
The java.net.Socket class allows us to create socket objects that help us in implementing all fundamental socket operations.
Read more >
java.net - Android Developers
About IPv6. Sockets; Interfaces; High level API; Protocol Handlers; Additional Specification; Interfaces; Classes; Enums; Exceptions. Added in API level 1 ...
Read more >
Commons VFS and Java.net.URL - Adding support for “ram ...
public class RamHandler extends URLStreamHandler { @Override protected URLConnection openConnection(final URL u) throws IOException { //May instead use VFS ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found