No, this is not code-compliant and creates a safety hazard.
Code Violations (IRC/IPC/UPC):
- No Dielectric Union: Connecting dissimilar metals (steel tank nipples to brass adapters) without a dielectric union violates IPC 605.17 / UPC 605.16.1. This accelerates galvanic corrosion at the tank threads, risking leaks and tank failure.
- PEX Too Close to Vent: Atmospheric vents radiate significant heat. IRC M1305.1.2 / IFGC 304.3 and PEX manufacturer specs (e.g., Uponor, Viega) require minimum 6"–18" clearance from the vent connector. Direct connection melts/degrades PEX.
- No Flex Connector/Expansion Loop: Rigid PEX crimped directly to the tank transmits thermal expansion stress and vibration to the tank threads. Codes require a listed flexible connector (corrugated SS or copper flex) or 18" of copper pipe (IPC 501.4 / UPC 604.1).
Required Fix:
- Install dielectric unions on tank nipples (hot & cold).
- Run minimum 18" of Type L copper (or listed 18" SS flex connector) up from the dielectric union.
- Transition to PEX at least 6"–18" away from the vent pipe (check specific PEX mfr. instructions).
- Install thermal expansion tank on cold side if not present (closed system).
Bottom line: Plumber cut corners. This voids the heater warranty and fails inspection. Requires re-pipe at tank connection.