code: @SuppressWarnings("unchecked")
      @Override
      public Object put(Object key, Object value) {
          if (MESSAGE_LOCALE.equals(key)) {
              if (value instanceof Locale) {
                  locale = (Locale) value;
                  data.put(MESSAGE_LOCALE, value);
              } else {
                  throw new IllegalArgumentException();
              }
              if (installKernelMap != null)
                  installKernelMap.put(key, value);
              return value;
          }
          if (installKernelMap == null) {
              if (RUNTIME_INSTALL_DIR.equals(key)) {
                  if (value instanceof File) {
                      return data.put(RUNTIME_INSTALL_DIR, value);
                  } else {
                      throw new IllegalArgumentException();
                  }
              } else if (INSTALL_MAP_JAR.equals(key)) {
                  if (value instanceof String) {
                      return data.put(INSTALL_MAP_JAR, value);
                  } else {
                      throw new IllegalArgumentException();
                  }
              } else if (INSTALL_MAP_JAR_FILE.equals(key)) {
                  if (value instanceof File) {
                      return data.put(INSTALL_MAP_JAR_FILE, value);
                  } else {
                      throw new IllegalArgumentException();
                  }
              } else if (OVERRIDE_JAR_BUNDLES.equals(key)) {
                  if (value instanceof List) {
                      return data.put(OVERRIDE_JAR_BUNDLES, value);
                  } else {
                      throw new IllegalArgumentException();
                  }
              } else {
                  data.put(INSTALL_KERNEL_INIT_CODE, ERROR);
                  data.put(INSTALL_KERNEL_INIT_ERROR_MESSAGE, getMessage("MAPBASED_ERROR_KERNEL_NOT_INIT"));
                  throw new RuntimeException(getMessage("MAPBASED_ERROR_KERNEL_NOT_INIT"));
              }
          } else {
              return installKernelMap.put(key, value);
          }
      }
docs: {@inheritDoc}
  
  @return the value, or null if an error occurs.