Show TOC Start of Content Area

Background documentation Enterprise Portal Performance Ruleset for JLin

The rules in this document for the static code analysis plug-in JLin Autocheck are available on the SAP SDN. They can be installed in the SAP NetWeaver Developer Studio by extracting the ZIP file EP_JLin_Rules.zip to the root folder of the JDT installation directory, for example,

C:\Program Files\SAP\JDT

After restarting the SAP NetWeaver Developer Studio, the JLin settings will show a new set of rules calles eptf tests. Activate all tests in this rule set by selecting the check-mark. Now you can run a static code analysis by invoking the menu entry as follows:

Run   Run As  JLin.

The EP Taskforce rule set

Rule

Short Description

Usage of Threads

Indicates creation of new threads. This is forbidden for portal application.

File access

Indicates file I/O. This is a bad practice and has critical performance impact when performed on every request.

Iteration over Map entries

Marks inefficient idioms for map iteration.

String concatenation

Alerts bad usage of the + operator for strings.

Prepared Statements

Indicates non-prepared SQL statements in a loop.

Release of resources

Looks for coding where limited resources are not released appropriately.

Unnecessary creation of String objects

Looks for coding where strings are explicitly instantiated using new String("…")

Unnecessary sub strings

Looks for the usage of method substring for the extraction of individual characters.

NullPointer Check

Indicates where NullPointerExceptions are caught to avoid null-checking.

Usage of obsolete collections

Marks places where obsolete collection classes Vector, Hashtable, Enumeration are used.

Loop condition

Looks for repeated evaluation of constant expressions in loop conditions.

For example, i < size().

 

 

 

End of Content Area