Skip to content

Commit

Permalink
Proofread fixes for #3418
Browse files Browse the repository at this point in the history
Small fixes to Coding Style page.
  • Loading branch information
dlmurphy committed Jun 20, 2017
1 parent 071a6bd commit f7a9337
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/sphinx-guides/source/developers/coding-style.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ Use this ``logger`` field with varying levels such as ``fine`` or ``info`` like

logger.fine("will get thumbnail from dataset logo");

Generally speaking you should use ``fine`` for everything that you don't want to show up in Glassfish's ``server.log`` file by default. If you use a higher level such as ``info`` for common operations, you will probably hear complaints that your code is too "chatty" in the logs. These logging levels can be controlled a runtime both on your development machine and in production as explained in the :doc:`debugging` section.
Generally speaking you should use ``fine`` for everything that you don't want to show up in Glassfish's ``server.log`` file by default. If you use a higher level such as ``info`` for common operations, you will probably hear complaints that your code is too "chatty" in the logs. These logging levels can be controlled at runtime both on your development machine and in production as explained in the :doc:`debugging` section.

When adding logging, do not simply add ``System.out.println()`` lines because the logging level cannot be controlled.

Avoid Hard-Coding Strings
~~~~~~~~~~~~~~~~~~~~~~~~~

Special strings should be defined as public constants. For example, ``DatasetFieldConstant.java`` contains has a field for "title" and it's used in many places in the code (try "Find Usages" in Netbeans). This is better than writing the string "title" in all those places.
Special strings should be defined as public constants. For example, ``DatasetFieldConstant.java`` contains a field for "title" and it's used in many places in the code (try "Find Usages" in Netbeans). This is better than writing the string "title" in all those places.

Type Safety
~~~~~~~~~~~
Expand Down

0 comments on commit f7a9337

Please sign in to comment.