@Override
          protected void runExpensiveCommand() throws Exception {
            final long startTime = new Date().getTime();

            // Read the actual version info
            lines.addAll(
                StreamUtils.readLinesFromReader(
                    new InputStreamReader(checkUrl.openStream(), UTF_8)));

            // Make this dialog visible for at least 400 msec so that users have a chance to read
            // the "Checking for updates..." text.
            final long duration = new Date().getTime() - startTime;
            if (duration < 400) {
              Thread.sleep(400 - duration);
            }
          }
Checks for available product updates and displays the results in a user interface.

@param parent a {@link Window} to be used as a parent for modal dialogs. Can be {@code null}.
@param productName the name of the product to check for updates. Should not include a leading
    "zynamics ".
@param currentVersion the version string of the product that denotes the current version (i.e.
    "4.0.0").
@param currentChannel the release channel to check for updates. This can be used to distinguish
    beta versions ("testing") from release versions ("stable").
java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/license/UpdateCheckHelper.java