test_class.declarator: logger = LoggerFactory.getLogger(EnvironmentUtilTest.class)
test_class.modifier: private static final
test_class.original_string: private static final Logger logger = LoggerFactory.getLogger(EnvironmentUtilTest.class);
test_class.type: Logger
test_class.var_name: logger
test_class.file: ch-commons-util/src/test/java/com/cloudhopper/commons/util/EnvironmentUtilTest.java
test_class.identifier: EnvironmentUtilTest
test_case.body: @Test
      public void splitHostFQDN() throws Exception {
          String[] result = EnvironmentUtil.splitHostFQDN("joelauer-02");
          Assert.assertEquals("joelauer-02", result[0]);
          Assert.assertEquals(null, result[1]);
  
          result = EnvironmentUtil.splitHostFQDN("joelauer-02.");
          Assert.assertEquals("joelauer-02", result[0]);
          Assert.assertEquals(null, result[1]);
  
          result = EnvironmentUtil.splitHostFQDN("joelauer-02.c");
          Assert.assertEquals("joelauer-02", result[0]);
          Assert.assertEquals("c", result[1]);
  
          result = EnvironmentUtil.splitHostFQDN(null);
          Assert.assertEquals(null, result[0]);
          Assert.assertEquals(null, result[1]);
  
          result = EnvironmentUtil.splitHostFQDN("");
          Assert.assertEquals(null, result[0]);
          Assert.assertEquals(null, result[1]);
  
          result = EnvironmentUtil.splitHostFQDN(".");
          Assert.assertEquals("", result[0]);
          Assert.assertEquals(null, result[1]);
      }
test_case.class_method_signature: EnvironmentUtilTest.splitHostFQDN()
test_case.full_signature: @Test public void splitHostFQDN()
test_case.identifier: splitHostFQDN
test_case.invocations: splitHostFQDN assertEquals assertEquals splitHostFQDN assertEquals assertEquals splitHostFQDN assertEquals assertEquals splitHostFQDN assertEquals assertEquals splitHostFQDN assertEquals assertEquals splitHostFQDN assertEquals assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void splitHostFQDN()
focal_class.declarator: HOST_NAME = "HOST_NAME"
focal_class.modifier: public static final
focal_class.original_string: public static final String HOST_NAME = "HOST_NAME";
focal_class.type: String
focal_class.var_name: HOST_NAME
focal_class.declarator: HOST_DOMAIN = "HOST_DOMAIN"
focal_class.modifier: public static final
focal_class.original_string: public static final String HOST_DOMAIN = "HOST_DOMAIN";
focal_class.type: String
focal_class.var_name: HOST_DOMAIN
focal_class.declarator: HOST_FQDN = "HOST_FQDN"
focal_class.modifier: public static final
focal_class.original_string: public static final String HOST_FQDN = "HOST_FQDN";
focal_class.type: String
focal_class.var_name: HOST_FQDN
focal_class.file: ch-commons-util/src/main/java/com/cloudhopper/commons/util/EnvironmentUtil.java
focal_class.identifier: EnvironmentUtil
focal_class.class_method_signature: EnvironmentUtil.createCommonSystemProperties()
focal_class.full_signature: public static Properties createCommonSystemProperties()
focal_class.identifier: createCommonSystemProperties
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: Properties
focal_class.signature: Properties createCommonSystemProperties()
focal_class.class_method_signature: EnvironmentUtil.getHostFQDN()
focal_class.full_signature: public static String getHostFQDN()
focal_class.identifier: getHostFQDN
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getHostFQDN()
focal_class.class_method_signature: EnvironmentUtil.splitHostFQDN(String fqdn)
focal_class.full_signature: public static String[] splitHostFQDN(String fqdn)
focal_class.identifier: splitHostFQDN
focal_class.modifiers: public static
focal_class.parameters: (String fqdn)
focal_class.return: String[]
focal_class.signature: String[] splitHostFQDN(String fqdn)
focal_method.body: public static String[] splitHostFQDN(String fqdn) {
          String[] result = new String[2];
  
          if (StringUtil.isEmpty(fqdn)) {
              return result;
          }
  
          // try to determine the domain name
          int pos = fqdn.indexOf('.');
          if (pos >= 0) {
              result[0] = fqdn.substring(0, pos);
              if (pos+1 < fqdn.length()) {
                  result[1] = fqdn.substring(pos+1);
              }
          } else {
              // entire string is the host name
              result[0] = fqdn;
          }
  
          return result;
      }
focal_method.class_method_signature: EnvironmentUtil.splitHostFQDN(String fqdn)
focal_method.full_signature: public static String[] splitHostFQDN(String fqdn)
focal_method.identifier: splitHostFQDN
focal_method.invocations: isEmpty indexOf substring length substring
focal_method.modifiers: public static
focal_method.parameters: (String fqdn)
focal_method.return: String[]
focal_method.signature: String[] splitHostFQDN(String fqdn)