Download All Versions of Alibaba’s Java Development Manual – New Guidelines Inside
This article introduces the highlights of the latest (Taishan) edition of Alibaba’s Java Development Manual, outlines new OOP, date‑time, collection, SQL, error‑code and security conventions, and provides a one‑click download link for the complete collection of all seven historic versions.
Taishan Edition – Java Development Manual (Version 7)
The Java Development Manual originated from Alibaba’s internal standards and has evolved over four years, releasing seven versions that are now widely adopted across the industry.
Below are the key updates in the latest edition and a link to download the full collection of all versions.
Update Highlights
Added 5 date‑time conventions
Added 2 table‑alias SQL conventions
Added unified error‑code conventions
OOP Conventions
Mandatory : Store any monetary amount as the smallest unit using an integer type.
Recommended : When a method exceeds 10 lines, place a blank line after the closing brace of return/throw statements for clearer logic.
Recommended : Remove unused fields, methods, parameters, and local variables.
Mandatory : Use the ternary operator condition ? expr1 : expr2 and be aware that type alignment may cause NPE due to auto‑unboxing.
Two scenarios trigger unboxing:
Either expression is a primitive type.
The expressions have different types, causing promotion to the larger type.
Date‑Time Conventions
Distinguish uppercase M (month) from lowercase m (minute), and uppercase H (24‑hour) from lowercase h (12‑hour).
Prohibit use of java.sql.Date, java.sql.Time, and java.sql.Timestamp anywhere in the code.
Never hard‑code a year as 365 days to avoid errors in leap years.
Prefer using enums for months; if using numbers, remember that Calendar months are 0‑based.
Collection Handling
Use isEmpty() to check for empty collections instead of size() == 0 (O(1) and more readable).
When converting streams to maps with Collectors.toMap(), always provide a BinaryOperator merge function to handle duplicate keys.
Be aware that a null value in toMap() will cause a NullPointerException.
if (value == null || remappingFunction == null) throw new NullPointerException();SQL Conventions
Mandatory : Prefix column names with table aliases (or table names) in multi‑table queries and updates.
Recommended : Use AS for table aliases and name them sequentially as t1, t2, t3 …
Other Conventions
Mandatory : Do not use Apache BeanUtils for property copying; prefer Spring BeanUtils or Cglib BeanCopier.
Security : Whitelist URLs for external redirects.
Library : Avoid unstable third‑party utilities; choose stable, well‑maintained libraries.
Design : Identify and isolate change points for scalability; code is not full documentation.
Unified Error‑Code Convention
Error codes are 5‑character strings composed of a source identifier (A/B/C) and a four‑digit number, providing fast traceability, easy memorization, and standardized communication.
All Historical Versions
Download links are provided for each historic version (from the original 1.0.0 release in 2016 up to the latest 2020 Taishan edition).
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Alibaba Cloud Developer
Alibaba's official tech channel, featuring all of its technology innovations.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
