Class CommonUtils

java.lang.Object
com.ultikits.ultitools.utils.CommonUtils

public class CommonUtils extends Object
Common utility class providing general-purpose helper methods. This class contains utility methods used throughout the UltiTools plugin.
Since:
6.0.0
Author:
wisdomme
  • Constructor Details

    • CommonUtils

      public CommonUtils()
  • Method Details

    • getUltiToolsUUID

      public static String getUltiToolsUUID() throws IOException
      get UltiTools UUID

      Reads the current UUID without writing to the credential store when one already exists -- only the first-ever call (or a rare concurrent race against another first-ever call) needs to write. WR-01 (08-REVIEW.md): the previous unconditional CredentialStore.update(java.util.function.UnaryOperator<java.util.Map<java.lang.String, java.lang.Object>>) call rewrote the live-credential file on every invocation, including the common already-exists case, which needlessly widened the write window on the single-owner store.

      Returns:
      UUID
      Throws:
      IOException - if an I/O error occurs