private void checkClassName(String name) {
    boolean bogus = false;

    if (name.startsWith("java/")) {
      bogus = true;
    } else if (name.startsWith("javax/")) {
      int slashAt = name.indexOf('/', 6);
      if (slashAt == -1) {
        // Top-level javax classes are verboten.
        bogus = true;
      } else {
        String pkg = name.substring(6, slashAt);
        bogus = (Arrays.binarySearch(JAVAX_CORE, pkg) >= 0);
      }
    }

    if (!bogus) {
      return;
    }

    /*
     * The user is probably trying to include an entire desktop
     * core library in a misguided attempt to get their application
     * working. Try to help them understand what's happening.
     */

    context.err.println("\ntrouble processing \"" + name + "\":\n\n" + IN_RE_CORE_CLASSES);
    errors.incrementAndGet();
    throw new StopProcessing();
  }
Check the class name to make sure it's not a "core library" class. If there is a problem, this
updates the error count and throws an exception to stop processing.

@param name {@code non-null;} the fully-qualified internal-form class name
android/android_framework/dex-maker/src/main/java/com/android/dx/command/dexer/Main.java