What’s New in Alibaba’s Java Manual? 3 Key Coding Standards Revealed

The April 22 release of Alibaba’s Java Development Manual “Taishan” edition introduces five mandatory date‑time rules, two table‑alias SQL conventions, and a unified error‑code standard, all aimed at improving code consistency and reliability across backend projects.

Programmer DD
Programmer DD
Programmer DD
What’s New in Alibaba’s Java Manual? 3 Key Coding Standards Revealed

The "Java Development Manual" is a collective effort of Alibaba's technical team, refined through extensive real‑world practice and open‑sourced for community collaboration.

On April 22, the "Taishan" edition was launched, highlighting three major additions: five new date‑time conventions, two table‑alias SQL conventions, and a unified error‑code convention.

Date‑Time Conventions

Seven new rules were added, the first five are mandatory:

Use lowercase y for the year in date patterns; yyyy represents the calendar year, while uppercase YYYY denotes the week‑year.

Distinguish uppercase M (month) from lowercase m (minute); uppercase H (24‑hour) from lowercase h (12‑hour).

Obtain the current milliseconds with System.currentTimeMillis() instead of new Date().getTime().

Avoid using java.sql.Date, java.sql.Time, or java.sql.Timestamp anywhere in the code.

Do not hard‑code a year as 365 days; account for leap years.

The remaining two are recommended:

Avoid February 29 in non‑leap‑year schedules; use a cron expression like 0 0 0 28 2 ? for yearly tasks.

Use enum values for months; remember that Calendar months are zero‑based (January = 0).

Table‑Alias SQL Conventions

Mandatory: When a query or modification involves multiple tables, prefix column names with the table alias or name to avoid ambiguous column errors.

Recommended: Add AS before aliases and name them sequentially as t1, t2, … for clarity.

Unified Error‑Code Convention

A new section defines standardized error codes for each system, improving API readability and enabling real‑time monitoring of exception occurrences.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

JavaBackend DevelopmentError Codesdate-time conventionsSQL alias
Programmer DD
Written by

Programmer DD

A tinkering programmer and author of "Spring Cloud Microservices in Action"

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.