[jitsi-dev] [patch] Parallel DNS configuration form



Ingo is also going to implement a patch that allows users to disable DNS
fallback entirely if they choose to.

Attached is the promised advanced configuration form. There are some points left open where I'd like to have your comments:
- All the DNS properties are now loaded/saved through the ConfigService and are no longer System properties
- The util bundle now exports the dns package to so I can get access to the property fields. I find this suboptimal as it provides access to the ParallelResolver in general which is not the intention
- To get access to the default DNS port in the SimpleResolver class, I crated a method that export this field to avoid the export of dnsjava from util
- Properties in general: what is the intention of defaults.properties? I find it confusing to have some config defaults in this file and but most of the default hardcoded

Let me know what needs to be changed.


parallel_dns_config.patch (38 KB)


Hi Ingo,

I've just committed and acked your patch on our team and contribution
page. Thanks for your work.

I just made some minor changes in your patch:
- there was an exception:
     [java] java.lang.ClassCastException: java.lang.Long cannot be
cast to java.lang.Integer
     [java] at java.lang.Integer.compareTo(Integer.java:37)
     [java] at
     [java] at
     [java] at
     [java] at
     [java] at
     [java] at
     [java] at javax.swing.JSpinner.fireStateChanged(JSpinner.java:434)
     [java] at
     [java] at
     [java] at
     [java] at javax.swing.JSpinner.setValue(JSpinner.java:329)
     [java] at
     [java] at

As the value was a delay and is supposed to be a not so long I made it int.

- In the config panel there was a java 1.6 only class
javax.swing.GroupLayout I removed it and made the form look like the
other advance config forms, check it out :slight_smile:

- Little modifications on the code style there were a lot of packages
in the code like javax.swing.JLabel (not in the imports), maybe its
your ide that insert them but we prefer to simplify the code for easy
reading and avoid this. Also there were some code over the 80 column.
Most of these was only in the class DnsConfigPanel and also the
implements/extends and throw clauses in the class and method

- Some string improvementс.

- And I move setting the resolver to the lookup into the synchronized
block (as it was) to avoid using the resolver during resetting it,
this happens mostly when network has change its connected state.