[ ESO ]

ALMA Software Engineering


ALMA SW Engineering

System Snapshot

Reference

Links

 

Coding Standard Rules

  • CODSTA.ACDO-1 Avoid using "new" keyword when creating String objects to hold string literals
  • CODSTA.ASI-3 Make methods "static" if they do not use any non-static class fields
  • CODSTA.AUVT-3 Declare 'List' and 'Set' variables with the type of their interface
  • CODSTA.CLONE-2 Declare 'clone () throws CloneNotSupportedException' for Cloneable class
  • CODSTA.CLS-4 Place constants on the left side of comparisons
  • CODSTA.CRS-4 Place constants on the right side of comparisons
  • CODSTA.DCI-5 Define constants in an "interface" Static Analysis Rule Descriptions
  • CODSTA.DCTOR-3 Define a default constructor whenever possible
  • CODSTA.DUN-5 Avoid using the negation operator '!' more than 3 times in a single method
  • CODSTA.IMPT-4 Disallows the use of wild cards ('*') in "import" statements
  • CODSTA.IMPT2-4 Use wild card symbols when importing classes
  • CODSTA.ISACF-5 Avoid using an "interface" to define constants
  • CODSTA.LONG-2 Use 'L’ instead of 'l’ to express "long" integer constants
  • CODSTA.MVOS-3 Avoid declaring multiple variables in one statement
  • CODSTA.NCAC-2 Avoid calling an "abstract" method from a constructor in an "abstract" class
  • CODSTA.NCE-4 Avoid using 'Exception’, 'RuntimeException’, or 'Throwable’ in "catch" statement
  • CODSTA.NEA-1 Avoid nested assignments
  • CODSTA.NTX-3 Avoid using "throws" Exception; Always use a subclass of 'Exception'
  • CODSTA.OGM-3 Organize methods by name
  • CODSTA.OTOSM-3 Always override 'toString ()'
  • CODSTA.OVERLOAD-4 Avoid multiple overloaded methods with the same number of parameters Static Analysis Rule Descriptions
  • CODSTA.OVERRIDE-4 Always override 'Object.hashCode ()' when you override 'Object.equals ()'
  • CODSTA.PML-4 Place the 'main ()’ method last
  • CODSTA.SMC-3 Avoid "switch" statements with many "case" statements
  • CODSTA.UCC-2 Declare only "private" constructors in utility classes
  • CODSTA.UCDC-2 Provide a "private" default constructor for utility classes
  • CODSTA.USN-2 Avoid using literal constants
  • CODSTA.VDT-1 Avoid declaring multiple variables of different types in one statement

Design by Contract Rules

  • DBC.PKGC-4 Provide '@invariant' contract for all package-private classes
  • DBC.PKGMPOST-4 Provide '@post' contract for all package-private methods
  • DBC.PKGMPRE-4 Provide '@pre' contract for all package-private methods
  • DBC.PRIC-5 Provide '@invariant' contract for all "private" classes
  • DBC.PRIMPOST-5 Provide '@post' contract for all "private" methods
  • DBC.PRIMPRE-5 Provide '@pre' contract for all "private" methods
  • DBC.PROC-3 Provide '@invariant' contract for all "protected" classes
  • DBC.PROMPOST-3 Provide '@post' contract for all "protected" methods
  • DBC.PROMPRE-3 Provide '@pre' contract for all "protected" methods
  • DBC.PUBC-2 Provide '@invariant' contract for all "public" classes
  • DBC.PUBMPOST-2 Provide '@post' contract for all "public" methods
  • DBC.PUBMPRE-2 Provide '@pre' contract for all "public" methods
  • DBC.SYNTAX-1 Use correct syntax in the contracts

EJB Rules

  • EJB.AMSC-2 Avoid accessing or modifying security configuration objects
  • EJB.CDP-1 Declare bean classes "public"
  • EJB.CNDA-1 Do not declare bean classes as "abstract"
  • EJB.CNDF-1 Do not declare bean classes as "final"
  • EJB.CRTE-1 Declare 'ejbCreate ()' methods "public", but neither "static" nor "final"
  • EJB.FNDM-1 Declare finder methods "public" and neither "final" nor "static"
  • EJB.IECM-1 Implement one or more 'ejbCreate ()' methods in bean classes
  • EJB.IEPM-1 Implement one or more 'ejbPostCreate ()' methods in EntityBean classes
  • EJB.LNL-2 Avoid loading native libraries in a Bean class
  • EJB.MDBC-1 Implement the 'ejbCreate()' method for all message-driven bean classes
  • EJB.MEC-1 Define a matching 'ejbPostCreate' method for each 'ejbCreate' method in entity bean classes
  • EJB.MNDF-1 Do not define 'finalize ()' method in bean classes
  • EJB.MRE-1 Throw 'java.rmi.RemoteException' in the methods of the session beans’ remote interface and remote home interface
  • EJB.NAC-1 Do not have arguments in MessageDrivenBeans' 'ejbCreate()' method
  • EJB.NFDC-1 Declare a "public" constructor that takes no parameters
  • EJB.NFS-2 Declare all "static" fields in the EJB component "final"
  • EJB.PCRTE-1 Declare 'ejbPostCreate ()' "public" and neither "static" nor "final"
  • EJB.RILH-1 Do not throw 'java.rmi.RemoteException' in a bean's local interface and local home interface
  • EJB.RT-1 Make finder methods' return type the primary key or a collection of primary keys
  • EJB.RTC-1 Make the return type "void" for SessionBeans' 'ejbCreate ()' methods
  • EJB.RTP-1 Make the return type "void" for the 'ejbPostCreate ()' method
  • EJB.RUH-2 Reuse EJB homes
  • EJB.TCE-1 Throw 'javax.ejb.CreateException' in create methods of remote home or local home interfaces
  • EJB.TFE-1 Throw 'javax.ejb.FinderException' in finder methods of remote home or local home interfaces
  • EJB.THISARG-1 Avoid passing the "this" reference as an argument
  • EJB.THISRET-1 Avoid returning "this"
  • EJB.THREAD-2 Avoid starting, stopping, or managing threads in any way

Formatting Rules

  • FORMAT.CBRACE-3 Place closing "}" braces on their own line
  • FORMAT.CMS-3 Have at least one space after type casting
  • FORMAT.DUT-3 Use spaces instead of 'Tabs'
  • FORMAT.FCB-4 Avoid placing '{' braces on their own line
  • FORMAT.IAD-3 Declare arrays with the '[ ]' brackets after the array type and before the variable name(s)
  • FORMAT.IND-2 Use a multiple of four spaces for indentation
  • FORMAT.JSPH-2 Provide a header comment for each JSP file
  • FORMAT.LL-2 Break lines at 80 characters
  • FORMAT.LVTC-4 Provide an endline comment for each local variable declaration
  • FORMAT.MCH-2 Provide a file header comment for each source file
  • FORMAT.MCM-4 Provide an endline comment for each control structure
  • FORMAT.MSP-3 Place a single space between a method name and the opening '(' parenthesis
  • FORMAT.NSAB-3 Avoid placing statements after '{' opening braces on the same line
  • FORMAT.OSPL-1 Write one statement per line
  • FORMAT.SAC-3 Place a single space character after every comma
  • FORMAT.SAOP-3 Place a single space on each side of an assignment operator
  • FORMAT.SAS-3 Place a single space character after every semicolon
  • FORMAT.SAUOP-3 Avoid placing space between a prefixed unary operator and its operand
  • FORMAT.SBOP-3 Place a single space on each side of a bitwise operator
  • FORMAT.SBUOP-3 Avoid placing space between a unary operator and its operand
  • FORMAT.SC-3 Place a single space between a conditional statement and the opening "(" parenthesis
  • FORMAT.SCOP-3 Place a single space before and after the "?" conditional operator
  • FORMAT.SLOP-3 Place a single space on each side of a logical operator
  • FORMAT.SROP-3 Place a single space on each side of a relational operator
  • FORMAT.UP-3 Avoid using unnecessary parentheses in "return" statements

Garbage Collection Rules

  • GC.AUTP-2 Avoid unnecessary temporaries when converting primitive types to String
  • GC.DUD-3 Avoid using 'Date[]’; use 'long[]’ instead
  • GC.FCF-1 Always call 'super.finalize ()' from 'finalize ()'
  • GC.FM-1 Avoid using 'finalize ()' methods to unregister listeners
  • GC.GCB-5 Reuse calls to 'getClipBounds ()'
  • GC.IFF-2 Call 'super.finalize ()' in the "finally" block of 'finalize ()' methods
  • GC.NCF-1 Avoid calling 'finalize ()' explicitly
  • GC.OSTM-2 Avoid potential memory leaks in ObjectStreams by calling 'reset()'
  • GC.STV-3 Avoid "static" collections; they can grow without bounds

Global Static Analysis Rules

  • GLOBAL.DPAC-1 Declare package-private classes as inaccessible as possible
  • GLOBAL.DPAF-1 Declare package-private fields as inaccessible as possible
  • GLOBAL.DPAM-1 Declare package-private methods as inaccessible as possible
  • GLOBAL.DPPC-4 Declare "public"/"protected" classes as inaccessible as possible
  • GLOBAL.DPPF-4 Declare "public"/"protected" fields as inaccessible as possible
  • GLOBAL.DPPM-4 Declare public/protected methods as inaccessible as possible
  • GLOBAL.SPAC-2 Declare a package-private class "final" if a class has not been subclassed
  • GLOBAL.SPAM-2 Declare a package-private method "final" if a method has not been overridden
  • GLOBAL.SPPC-5 Declare a "public/protected" class "final" if a class has not been subclassed
  • GLOBAL.SPPM-5 Declare a "public/protected" method "final" if a method has not been overridden
  • GLOBAL.UPAC-1 Avoid globally unused package-private classes
  • GLOBAL.UPAF-1 Avoid globally unused package-private fields
  • GLOBAL.UPAM-1 Avoid globally unused package-private methods
  • GLOBAL.UPPC-4 Avoid globally unused "public"/"protected" classes
  • GLOBAL.UPPF-4 Avoid globally unused "public/protected" fields
  • GLOBAL.UPPM-4 Avoid globally unused "public"/"protected" methods

Initialization Rules

  • INIT.CSI-2 Explicitly initialize all fields in a constructor
  • INIT.LV-3 Initialize all local variables explicitly at the declaration statement
  • INIT.NFS-2 Avoid using non-final "static" fields during the initialization
  • INIT.SF-2 Explicitly initialize all "static" fields

Internationalization Rules

  • INTER.CLO-4 Avoid using single characters with logic operators in an internationalized environment
  • INTER.COS-4 Avoid String concatenation in an Internationalized environment
  • INTER.DTS-4 Avoid calling 'toString ()' on Date variables in an Internationalized environment
  • INTER.ITT-2 Isolate translatable text in resource bundles
  • INTER.NCL-4 Put single character literals in constants
  • INTER.NTS-4 Avoid calling 'toString ()' on numeric variables in an Internationalized environment
  • INTER.SCT-4 Avoid calling 'String.compareTo ()' in an Internationalized environment
  • INTER.SE-4 Avoid calling 'String.equals ()' in an Internationalized environment
  • INTER.ST-4 Avoid using 'StringTokenizer' in an Internationalized environment
  • INTER.TTS-4 Avoid calling 'Time.toString ()' in an Internationalized environment

Javadoc Comment Rules

  • JAVADOC.BT-4 Avoid using nonexistent '@' tags in Javadoc comments
  • JAVADOC.MAJDT-3 Use the '@author' Javadoc tag in "class" and "interface" Javadoc comments
  • JAVADOC.MRDC-1 Use the '@return' Javadoc tag in "public" method Javadoc comments
  • JAVADOC.MRDC2-2 Use the '@return' Javadoc tag in "protected" method Javadoc comments
  • JAVADOC.MRDC3-3 Use the '@return' Javadoc tag in "private" methods
  • JAVADOC.MRDC4-5 Use the '@return' Javadoc tag in "private" methods
  • JAVADOC.MVJDT-3 Use the '@version' tag in "class" Javadoc comments
  • JAVADOC.PARAM-1 Use the '@param' Javadoc tag for each parameter of "public" methods
  • JAVADOC.PARAM2-2 Use the '@param' Javadoc tag for each parameter of "protected" methods
  • JAVADOC.PARAM3-3 Use the '@param' Javadoc tag for each parameter of package-private methods
  • JAVADOC.PARAM4-5 Use the '@param' Javadoc tag for each parameter of "private" methods
  • JAVADOC.PJDCC-1 Provide Javadoc comments for "public" classes
  • JAVADOC.PJDCC2-2 Provide Javadoc comments for "protected" classes
  • JAVADOC.PJDCC3-3 Provide Javadoc comments for package-private classes and interfaces
  • JAVADOC.PJDCC4-5 Provide Javadoc comments for "private" classes and interfaces
  • JAVADOC.PJDCF-1 Provide Javadoc comments for "public" fields
  • JAVADOC.PJDCF2-2 Provide Javadoc comments for "protected" fields
  • JAVADOC.PJDCF3-3 Provide Javadoc comments for package-private fields
  • JAVADOC.PJDCF4-5 Provide Javadoc comments for "private" fields
  • JAVADOC.PJDCM-1 Provide Javadoc comments for "public" methods
  • JAVADOC.PJDCM2-2 Provide Javadoc comments for "protected" methods
  • JAVADOC.PJDCM3-3 Provide Javadoc comments for package-private methods
  • JAVADOC.PJDCM4-5 Provide Javadoc comments for "private" methods
  • JAVADOC.SMJT-1 Use the '@concurrency' Javadoc tag on "synchronized" "public" methods and blocks
  • JAVADOC.SMJT2-2 Use the '@concurrency' Javadoc tag on "synchronized" "protected" methods and blocks
  • JAVADOC.SMJT3-4 Use the '@concurrency' Javadoc tag for "synchronized" package-private methods and '{ }' blocks
  • JAVADOC.THROW-1 Use the '@throws' or '@exception’ Javadoc tag in "public" methods
  • JAVADOC.THROW2-2 Use the '@throws' or '@exception’ Javadoc tag in "protected" methods
  • JAVADOC.THROW3-3 Use the '@throws' or '@exception’ Javadoc tag in package-private methods
  • JAVADOC.THROW4-5 Use the '@throws' or '@exception’ Javadoc tag in "private" methods
  • JAVADOC.TSMJT-3 Provide Javadoc comment for 'toString ()' method
  • JAVADOC.VMCR-3 Avoid using the '@return' Javadoc tag on "void" methods

JUnit Rules

  • JUNIT.OSIC-2 Avoid using the constructor to set up test cases
  • JUNIT.OSUM-3 Always override the 'setUp ()' method
  • JUNIT.OTDM-3 Always override the 'tearDown ()' method

Class Metrics

  • METRICS.CCNL-2 Number of comment lines in a "class" or "interface"
  • METRICS.CIHL-2 "class" or "interface" inheritance level
  • METRICS.CNLM-2 Number of comment lines in a method
  • METRICS.CSNL-2 Number of statement lines in a "class" or "interface"
  • METRICS.CTNL-2 Number of lines in "class" or "interface"
  • METRICS.NOF-2 Number of fields
  • METRICS.NOM-2 Number of methods
  • METRICS.NPKGF-2 Number of package-private fields
  • METRICS.NPKGM-2 Number of package-private methods
  • METRICS.NPRIF-2 Number of "private" fields
  • METRICS.NPRIM-2 Number of "private" methods
  • METRICS.NPROF-2 Number of "protected" fields
  • METRICS.NPROM-2 Number of "protected" methods
  • METRICS.NPUBF-2 Number of "public" fields
  • METRICS.NPUBM-2 Number of "public" methods
  • METRICS.PJDC-2 Percentage of Javadoc comments(%)
  • METRICS.SNLM-2 Number of statement lines in a method
  • METRICS.STMT-2 Number of statements in a method
  • METRICS.TCC-2 Cyclomatic Complexity
  • METRICS.TNLM-2 Number of lines in a method
  • METRICS.TNMC-2 Number of method calls
  • METRICS.TNOP-2 Number of parameters
  • METRICS.TRET-2 Number of "return" statements

Miscellaneous Rules

  • MISC.AFP-5 Avoid making assignments to method parameters
  • MISC.ARN-3 Return zero-length arrays instead of "null"
  • MISC.ASFI-2 Redeclare a class with only "abstract" methods and "static final" fields as an "interface"
  • MISC.AUO-1 Avoid using an object to access "static" fields or methods
  • MISC.AURM-4 Avoid using java.lang.reflect package
  • MISC.BLKDOWHL-3 Provide a '{}' block for "do-while" statements
  • MISC.BLKELSE-3 Provide a '{}' block for "else" statements
  • MISC.BLKFOR-3 Provide a '{}' block for "for" statements
  • MISC.BLKIF-3 Provide a '{}' block for "if" statements
  • MISC.BLKWHL-3 Provide a '{}' block for "while" statements
  • MISC.CLNC-1 Avoid using constructors in the 'clone ()' method
  • MISC.CLONE-1 Call 'super.clone ()' in all 'clone ()' methods
  • MISC.CTOR-4 Avoid calling non-"final", non-"static" and non-"private" methods from constructors
  • MISC.DPRAPI-1 Avoid using deprecated APIs
  • MISC.DUID-1 Create a 'serialVersionUID' for all 'Serializable' classes
  • MISC.FF-1 Declare "private" constant fields "final"
  • MISC.FLV-4 Declare constant local variables "final"
  • MISC.HMF-1 Avoid giving method local variables the same name as class fields
  • MISC.MSF-4 Avoid too many "static" fields
  • MISC.PCIF-1 Declare "for" loops with a condition and an increment statement
  • MISC.PCTOR-2 Avoid non-public classes with "public" constructors
  • MISC.PFL-5 Use "for" loops instead of "while" loops
  • MISC.PSFA-2 Avoid using "public static final" array fields
  • MISC.SIO-5 Avoid using 'System.out.println()', 'System.out.print()', 'System.err.println()' or 'System.err.print()'
  • MISC.UBD-3 Avoid "float" and "double" if exact answers are required
  • MISC.UST-2 Use 'StringTokenizer' instead of 'indexOf ()' or 'substring ()' for String parsing

Naming Convention Rules

  • NAMING.CVN-5 Use conventional variable names
  • NAMING.GETA-1 Prepend 'get' to the names of getter methods
  • NAMING.GETB-3 Prepend 'is, can, has, have' to the names of "boolean" getter methods
  • NAMING.IFV-2 Use all uppercase letters for the names of fields in an "interface"
  • NAMING.IRB-1 Use 'is...' only for naming methods that return a "boolean"
  • NAMING.NCL-2 Enforce name format of classes
  • NAMING.NE-2 Enforce name format of exceptions
  • NAMING.NIF-2 Enforce name format of non-"static" fields
  • NAMING.NITF-2 Enforce name format of interfaces
  • NAMING.NLV-2 Enforce name format of local variables
  • NAMING.NM-2 Enforce name format of non-"static" methods
  • NAMING.NMP-2 Enforce name format of method parameters
  • NAMING.NSF-2 Enforce name format of non-"final" "static" fields
  • NAMING.NSMEnforce name format of "static" methods
  • NAMING.PKG-3 Use lowercase letters for "package" names
  • NAMING.SETA-2 Prepend 'set' to the names of setter methods
  • NAMING.USF-2 Avoid lowercase letters in "final" "static" field names

Object Oriented Programming Rules

  • OOP.AHF-1 Avoid hiding inherited instance fields
  • OOP.AHSM-2 Avoid hiding inherited "static" member methods
  • OOP.APPF-2 Avoid "public" or package-private instance fields
  • OOP.APROF-2 Avoid "protected" instance fields
  • OOP.IIN-5 Implement interfaces non-trivially or "abstract"
  • OOP.LEVEL-2 Avoid more than two levels of nested inner classes
  • OOP.LPF-4 List all "public" and package-private methods/fields first
  • OOP.OPM-2 Avoid overriding a "private" method

Optimization Rules

  • OPT.AAS-3 Use abbreviated assignment operators
  • OPT.CEL-3 Avoid calling methods in loop condition statements
  • OPT.CIO-1 Close input or output resources in "finally" blocks
  • OPT.CS-1 Close streams in "finally" blocks
  • OPT.DIC-3 Define initial capacities for 'ArrayList’, 'HashMap’, 'HashSet’, ’Hashtable’, ’Vector’, and 'WeakHashMap’
  • OPT.IF-4 Use conditional operator for "if (cond) return; else return;" statements
  • OPT.IFAS-4 Use the conditional assignment operator instead of 'if (cond) a = b; else a = c;' statements
  • OPT.INSOF-5 Use "instanceof" only on interfaces
  • OPT.IRB-2 Use 'System.arraycopy ()’ instead of using a loop to copy arrays
  • OPT.LOOP-3 Avoid instantiating variables in a loop body
  • OPT.MAF-4 Make accessor methods for instance fields "final"
  • OPT.PCTS-3 Use 'charAt ()' instead of 'startsWith ()' for one character comparisons
  • OPT.SB-3 Specify an initial 'StringBuffer' capacity
  • OPT.SDIV-4 Use the right shift operator for division by powers of 2
  • OPT.SMUL-4 Use the left shift operator for multiplication by powers of 2
  • OPT.STR-3 Use single quotes instead of double quotes for single character string concatenation
  • OPT.SYN-3 Avoid calling a "synchronized" method in a loop
  • OPT.TRY-3 Place "try/catch/finally" blocks outside of loops
  • OPT.UEQ-3 Avoid comparing boolean variables with "true"
  • OPT.UISO-1 Avoid unnecessary "instanceof" evaluations
  • OPT.UNC-1 Avoid unnecessary casting
  • OPT.USB-2 Use 'StringBuffer’ instead of 'String’ for non-constant string
  • OPT.USC-2 Use ’String’ instead of ’StringBuffer’ for constant strings
  • OPT.USV-3 Use 'stack’ variables whenever possible

Possible Bugs Rules

  • PB.ADE-1 Avoid dangling "else" statements
  • PB.AECB-1 Avoid "catch" blocks with empty bodies
  • PB.ASI-2 Avoid assignment within an "if" condition
  • PB.CLP-2 Avoid casting primitive data types to lower precision
  • PB.DCF-2 Avoid comparing floating point types
  • PB.DCP-3 Avoid using "+" on Strings to concatenate instead of add numbers
  • PB.DNCSS-1 Do not call 'setSize ()' in 'ComponentListener.componentResized ()'
  • PB.EQL-3 Use 'getClass ()' in the 'equals ()' method implementation
  • PB.EQL2-3 Use 'instanceof' within an 'equals ()' method implementation
  • PB.FEB-1 Avoid "for" statements with empty bodies
  • PB.FLVA-2 Do not assign loop control variables in the body of a "for" loop
  • PB.IEB-1 Avoid "if" statements with empty bodies
  • PB.IESM-3 Avoid calling 'String.equals ("literal")' or 'String.equalsIgnoreCase ("literal")'
  • PB.IMO-2 Make sure the intended method is overridden
  • PB.MAIN-1 Use the method name 'main ()' only for the entry point method
  • PB.MASP-2 Assign "protected" accessibility to 'readResolve ()' and 'writeReplace ()' methods in serializable classes
  • PB.MPC-2 Avoid using method parameter names that conflict with class member names
  • PB.NAMING-1 Avoid giving non-constructor methods the same name as the class
  • PB.NDC-1 Avoid defining direct or indirect subclasses of 'Error' and 'Throwable'
  • PB.NXRE-3 Avoid defining direct or indirect subclasses of 'RuntimeException'
  • PB.OROM-2 Implement the 'readObject ()' for all 'Serializable' classes
  • PB.PDS-2 Provide "default:" for each "switch" statement
  • PB.SBC-1 Avoid a "switch" statement with a bad "case"
  • PB.TLS-1 Avoid using text labels in "switch" statements
  • PB.UEI-3 Use 'equals ()’ when comparing Objects
  • PB.UEI2-3 Use 'equals ()’ when comparing Strings

Project Metrics

  • PMETRICS.NB-2 Number of bytes
  • PMETRICS.NC-2 Number of classes
  • PMETRICS.NJF-2 Number of Java source files
  • PMETRICS.NL-2 Number of lines
  • PMETRICS.NOF-2 Number of fields
  • PMETRICS.NOM-2 Number of methods
  • PMETRICS.NPAC-2 Number of packages
  • PMETRICS.NPKGC-2 Number of package-private classes
  • PMETRICS.NPRIC-2 Number of "private" classes
  • PMETRICS.NPROC-2 Number of "protected" classes
  • PMETRICS.NPUBC-2 Number of "public" classes

Portability Rules

  • PORT.ENV-1 Avoid using 'System.getenv ()'
  • PORT.EXEC-3 Avoid using 'Runtime.exec ()'
  • PORT.LNSP-1 Avoid hard coding '\n', or '\r' as a line separator
  • PORT.NATV-3 Avoid using user-defined "native" methods
  • PORT.PEER-1 Avoid using "java.awt.peer.*" interfaces directly

Security Rules

  • SECURITY.CLONE-3 Make your 'clone ()' method "final" for security
  • SECURITY.CMP-2 Avoid comparing Class objects by name
  • SECURITY.INNER-1 Make all inner classes "private"
  • SECURITY.PKG-5 Do not depend on "package" scope
  • SECURITY.SER-3 Make your classes Unserializable
  • SECURITY.SER2-3 Avoid making your interfaces Serializable

Servlet Rules

  • SERVLET.BINS-3 Avoid using java.beans.Beans.instantiate ()
  • SERVLET.CDBC-1 Close JDBC connections in the finally block
  • SERVLET.DSLV-2 Reuse data sources for JDBC connections
  • SERVLET.HVR-2 Release HttpSession variables when done
  • SERVLET.MDC-1 Declare a "public" constructor that takes no parameters
  • SERVLET.RRWD-2 Close JDBC resources when done
  • SERVLET.SOP-2 Minimize use of System.out.println or System.err.println
  • SERVLET.STM-2 Avoid using 'SingleThreadModel' in Servlet classes
  • SERVLET.SYN-2 Minimize synchronization in Servlets

Threads and Synchronization Rules

  • TRS.ANF-3 Do not use 'notify ()'; use 'notifyAll ()' instead
  • TRS.AUTG-3 Avoid using variables of type 'java.lang.ThreadGroup'
  • TRS.AUTY-3 Avoid using 'Thread.yield'
  • TRS.CSFS-3 Avoid causing deadlock by calling a "synchronized" method from a "synchronized" method
  • TRS.MRUN-2 Give subclasses of Thread a 'run ()' method
  • TRS.NSM-5 Avoid using the "synchronized" modifier in the method declaration
  • TRS.NSYN-1 Unsynchronized methods should not call 'wait ()', or 'notify ()'
  • TRS.RUN-5 Use the "synchronized" modifier on methods that implement 'Runnable.run ()'
  • TRS.THRD-1 Avoid calling 'Thread.resume ()', 'Thread.stop ()', 'Thread.suspend ()', or 'Runtime.runFinalizersOnExit ()''
  • TRS.UWIL-2 Call 'wait ()' only inside a "while" loop
  • TRS.UWNA-2 Use ’wait ()’ and ’notifyAll ()’ instead of polling loops

Unused Code Rules

  • UC.AAI-2 Avoid unnecessary modifiers in an "interface"
  • UC.AUV-2 Avoid unused local variables
  • UC.DIL-3 Do not explicitly "import" the java.lang.* "package"
  • UC.PF-2 Avoid unused "private" fields
  • UC.PM-2 Avoid unused "private" methods
  • UC.UP-2 Avoid unused parameters

 [ESO IT Project Web Site]  [IT Project]  [ESO]  [Index]  [Search]  [Help]  [News]