Clarify router family docs

Add some coding style items
This commit is contained in:
zzz
2016-02-13 13:33:59 +00:00
parent f091c500d3
commit 0d4d52a6ef
2 changed files with 24 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
{% extends "global/layout.html" %}
{% block title %}{% trans %}The Network Database{% endtrans %}{% endblock %}
{% block lastupdated %}{% trans %}January 2016{% endtrans %}{% endblock %}
{% block lastupdated %}{% trans %}February 2016{% endtrans %}{% endblock %}
{% block accuratefor %}0.9.24{% endblock %}
{% block content %}
<h2>{% trans %}Overview{% endtrans %}</h2>
@@ -118,8 +118,6 @@ statistics to improve anonymity, and we plan to remove more in future releases.
<h3>{% trans %}Family Options{% endtrans %}</h3>
<p><b>Note:</b> Preliminary, subject to change.</p>
<p>{% trans -%}
As of release 0.9.24, routers may declare that they are part of a "family", operated by the same entity.
Multiple routers in the same family will not be used in a single tunnel.
@@ -134,7 +132,7 @@ The family options are:
({% trans %}The family name{% endtrans %})
</li>
<li><b>family.key</b>
The type code of the family's
The signature type code of the family's
<a href="{{ site_url('docs/spec/common-structures') }}#type_SigningPublicKey">Signing Public Key</a>
(in ASCII digits)
concatenated with ':'

View File

@@ -1,6 +1,6 @@
{% extends "global/layout.html" %}
{% block title %}{{ _('Developer Guidelines and Coding Style') }}{% endblock %}
{% block lastupdated %}{% trans %}January 2016{% endtrans %}{% endblock %}
{% block lastupdated %}{% trans %}February 2016{% endtrans %}{% endblock %}
{% block content %}
<p>{% trans newdevs=site_url('get-involved/guides/new-developers') -%}
Read the <a href="{{ newdevs }}">new developers guide</a> first.
@@ -170,14 +170,34 @@ Don't use URL. Use URI.
Don't catch Exception. Catch RuntimeException and checked exceptions individually.
{%- endtrans %}</li>
<li>{% trans -%}
Don't use String.getBytes(). Use DataHelper.getUTF8() or DataHelper.getASCII().
Don't use String.getBytes() without a UTF-8 charset argument. You may also use DataHelper.getUTF8() or DataHelper.getASCII().
{%- endtrans %}</li>
<li>{% trans -%}
Always specify a UTF-8 charset when reading or writing files. The DataHelper utilities may be helpful.
{%- endtrans %}</li>
<li>{% trans -%}
Always specify a locale (for example Locale.US) when using String.toLowerCase() or String.toUpperCase().
Do not use String.equalsIgnoreCase(), as a locale cannot be specified.
{%- endtrans %}</li>
<li>{% trans -%}
Don't use String.split(). Use DataHelper.split().
{%- endtrans %}</li>
<li>{% trans -%}
Ensure that InputStreams and OutputStreams are closed in finally blocks.
{%- endtrans %}</li>
<li>{% trans -%}
Use {} for all for and while blocks, even if only one line.
If you use {} for either the if, else, or if-else block, use it for all blocks.
Put "} else {" on a single line.
{%- endtrans %}</li>
<li>{% trans -%}
Specify fields as final wherever possible.
{%- endtrans %}</li>
<li>{% trans -%}
Don't store I2PAppContext, RouterContext, Log, or any other references to router or context items in static fields.
{%- endtrans %}</li>
<li>{% trans -%}
Don't start threads in constructors. Use I2PAppThread instead of Thread.
{%- endtrans %}</li>
</ul>