[
http://issues.apache.org/jira/browse/JAMES-488?page=comments#action_12378711 ]
Noel J. Bergman commented on JAMES-488:
---------------------------------------
What I mean is that we had existing methods on the DNServer class that were
static. You not only made the changes to make a DNServer instance available to
service components, but you also removed static from the existing static
methods. That was not necesary. Leave the static on them. It is perfectly
legal to do the following:
public class t
{
public static void f_static() { System.out.println("static"); }
public void f() { System.out.println("non-static"); }
static public void main(String[] args)
{
f_static();
new t().f_static();
new t().f();
}
}
As you can see, you can take an instance of the class and call the static
method against the instance, rather than against the class. Unless/until we
need to make these instance methods, I'd just as soon leave them as they were.
Principle of minimal change (plus a bit of code optimization).
> Remove static access of DNSServer
> ---------------------------------
>
> Key: JAMES-488
> URL: http://issues.apache.org/jira/browse/JAMES-488
> Project: James
> Type: Improvement
> Components: DNSServer
> Reporter: Norman Maurer
> Assignee: Norman Maurer
> Attachments: DNSServer-non-static-usage2.patch,
> DNSServer-not-static-usage.patch
>
> We should remove all static access to DNSServer and move the methods to the
> DNSServer interface. After that we should be able to acces this via the
> interface Serviceable.
> This will it make easier to write junit tests etc.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]