A common operation in my current project is converting a string version of an IP address to an integer representation and is easily handled by one static method. I usually try to keep this as close as possible to the code that uses it as much as possible, but it is also needed in completely different parts of the application.
Since the classes in very different packages seemed to relate to each other for this one utility, I created the package utiland moved the static methods (one for int to String, one for String to int) to the class Ipin that package.
I understand that this is probably a sign that I should rethink the organization of the project, but is there anything harmful to add a package to store the general functions of the project? Is there a standard way to handle this situation in Java?
source
share