forked from I2P_Developers/i2p.www
Clarify router family docs
Add some coding style items
This commit is contained in:
@@ -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 ':'
|
||||
|
@@ -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>
|
||||
|
||||
|
Reference in New Issue
Block a user