src/main/core-impl/java/com/mysql/cj/result/SqlTimestampValueFactory.java [143:174]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        if (its.getYear() == 0 && its.getMonth() == 0 && its.getDay() == 0) {
            throw new DataReadException(Messages.getString("ResultSet.InvalidZeroDate"));
        }

        this.defaultTimeZoneLock.lock();
        try {
            Calendar c;

            if (this.cal != null) {
                c = this.cal;
            } else {
                // c.f. Bug#11540 for details on locale
                c = Calendar.getInstance(this.pset.getBooleanProperty(PropertyKey.preserveInstants).getValue() ? this.connectionTimeZone : this.defaultTimeZone,
                        Locale.US);
                c.setLenient(false);
            }

            try {
                // this method is HUGEly faster than Java 8's Calendar.Builder()
                c.set(its.getYear(), its.getMonth() - 1, its.getDay(), its.getHours(), its.getMinutes(), its.getSeconds());
                Timestamp ts = new Timestamp(c.getTimeInMillis());
                ts.setNanos(its.getNanos());
                return ts;
            } catch (IllegalArgumentException e) {
                throw ExceptionFactory.createException(WrongArgumentException.class, e.getMessage(), e);
            }
        } finally {
            this.defaultTimeZoneLock.unlock();
        }
    }

    @Override
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/main/core-impl/java/com/mysql/cj/result/SqlTimestampValueFactory.java [176:207]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        if (its.getYear() == 0 && its.getMonth() == 0 && its.getDay() == 0) {
            throw new DataReadException(Messages.getString("ResultSet.InvalidZeroDate"));
        }

        this.defaultTimeZoneLock.lock();
        try {
            Calendar c;

            if (this.cal != null) {
                c = this.cal;
            } else {
                // c.f. Bug#11540 for details on locale
                c = Calendar.getInstance(this.pset.getBooleanProperty(PropertyKey.preserveInstants).getValue() ? this.connectionTimeZone : this.defaultTimeZone,
                        Locale.US);
                c.setLenient(false);
            }

            try {
                // this method is HUGEly faster than Java 8's Calendar.Builder()
                c.set(its.getYear(), its.getMonth() - 1, its.getDay(), its.getHours(), its.getMinutes(), its.getSeconds());
                Timestamp ts = new Timestamp(c.getTimeInMillis());
                ts.setNanos(its.getNanos());
                return ts;
            } catch (IllegalArgumentException e) {
                throw ExceptionFactory.createException(WrongArgumentException.class, e.getMessage(), e);
            }
        } finally {
            this.defaultTimeZoneLock.unlock();
        }
    }

    @Override
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



