code: private synchronized Date dateTimeHelper() {
          // if we already have current values, then we can stop (note this
          // always means that we're caching)
          if (currentTime != null)
              return null;
  
          // get the current moment
          Date time = new Date();
  
          // if we're not caching then we just return the current moment
          if (! useCachedEnvValues) {
              return time;
          } else {
              // we're caching, so resolve all three values, making sure
              // to use clean copies of the date object since it may be
              // modified when creating the attributes
              currentTime = new TimeAttribute(time);
              currentDate = new DateAttribute(time);
              currentDateTime = new DateTimeAttribute(time);
              return null;
          }
          
      }
docs: Private helper that figures out if we need to resolve new values,
  and returns either the current moment (if we're not caching) or
  -1 (if we are caching)