SN/T 4899-2017 in English
ABOLISHEDJava code specifications of inspection and quarantine information systems
- Issued on:2017-08-29
- Implemented on:2018-04-01
- File Format:PDF
- Delivery:Via email within 1~3 business days
$253.00
Introduction
Standard Background and Technological Evolution
This standard, based on GB/T 1.1-2009, provides specific requirements for Java development of information systems in the inspection and quarantine industry. As the Java ecosystem evolves from JDK 7 to JDK 11, the specification strengthens the application constraints of modern features such as modularity and type inference.
Core specification requirements
| Dimensions | Traditional specifications | Requirements of this standard |
|---|---|---|
| File type | .java/.class | Added 12 extension name management such as .jsp/.xml/.properties |
| Annotation system | Basic JavaDoc | Mandatory inclusion of metadata such as version history, preconditions, and exception descriptions |
| Code structure | Free arrangement | Strictly sorted by static block → field → constructor → business method |
Key Technical Points
1. File Organization Specifications
Java files should be organized in the following hierarchy: package declaration → import statement → class comment → member variable → constructor → business method. Example:
package cn.finefuture.common; // Standard import groupingimport java.util.List; /** * @version 1.0 * @author 张三*/ public class InspectionService { private static final int MAX_COUNT = 100; public void validateCert(String certNo) {...} } 2. Naming and Format Control
- Package names must use reverse domain names (e.g., cn.finefuture.privilege)
- Class names use Pascal notation, and interfaces are prefixed with .
- Method parameters must be aligned within 80 characters.
3. Comment standards
Three types of comments are mandatory:
- File header comments: including copyright notices and version history
- Method JavaDoc: use @throws to indicate unchecked exceptions
- Code tags: //TODO is for implementation, //FIXME is for defects
/** * Certificate validity verification* @param certNo 18-digit unified encoding* @throws IllegalFormatException Thrown when the number format is incorrect*/
Implementation suggestions
- Use Checkstyle to configure the standard validation rule set
- Establish a code review checklist, focusing on verifying:
- Whether all public methods have contract annotations
- Whether switch statements include default handling
- Whether exception handling is logged
- Adopt a gradual transformation strategy for historical code

Loading PDF document...
Error loading PDF. Please make sure the file is valid and try again.
We also recommend
-

SN 0283-1994 in English
\"Method for Inspection of Dichlorodipyridinol Residues in Exported Poultry Meat\"
1994-02-18 -

SN/T 0244-1994 in English
\"General Rules for Inspection and Certification of Imported Mechanical and Electrical Instruments\"
1993-08-01 -

SN/T 4711-2016 in English
Guide fur standardization of inspection and quarantine informationization
2016-12-12 -

SN 184-1993 in English
\"Test Methods for Listeria Monocytogenes in Exported Foods\"
1993-10-08 -

SN/T 1123-2010 in English
Rules for sheet fumigation
2010-05-27 -

SN/T 5145.8-2019 in English
Rapid Identification of animal ingredient in export food and feed Part 8: Detection of Donkey Ingredient PCR-Lateral flow dipstick method
2019-10-25