From 0d4d52a6efde4d2df87ffadbc5612e145fd1e3cb Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Sat, 13 Feb 2016 13:33:59 +0000
Subject: [PATCH] Clarify router family docs Add some coding style items

---
 .../pages/site/docs/how/network-database.html |  6 ++---
 .../get-involved/guides/dev-guidelines.html   | 24 +++++++++++++++++--
 2 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/i2p2www/pages/site/docs/how/network-database.html b/i2p2www/pages/site/docs/how/network-database.html
index 1df1113c6..99c3147b6 100644
--- a/i2p2www/pages/site/docs/how/network-database.html
+++ b/i2p2www/pages/site/docs/how/network-database.html
@@ -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 ':'
diff --git a/i2p2www/pages/site/get-involved/guides/dev-guidelines.html b/i2p2www/pages/site/get-involved/guides/dev-guidelines.html
index 20cef19d1..67314026a 100644
--- a/i2p2www/pages/site/get-involved/guides/dev-guidelines.html
+++ b/i2p2www/pages/site/get-involved/guides/dev-guidelines.html
@@ -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>
 
-- 
GitLab