Codota Logo
IncorrectInternalClassUse
Code IndexAdd Codota to your IDE (free)

How to use
IncorrectInternalClassUse
in
com.mebigfatguy.fbcontrib.detect

Best Java code snippets using com.mebigfatguy.fbcontrib.detect.IncorrectInternalClassUse (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: mebigfatguy/fb-contrib

/**
 * implements the visitor to look for classes that reference com.sun.xxx, or org.apache.xerces.xxx classes by looking for class Const in the constant pool
 *
 * @param context
 *            the context object of the currently parsed class
 */
@Override
public void visitClassContext(ClassContext context) {
  JavaClass cls = context.getJavaClass();
  if (!isInternal(cls.getClassName())) {
    ConstantPool pool = cls.getConstantPool();
    int numItems = pool.getLength();
    for (int i = 0; i < numItems; i++) {
      Constant c = pool.getConstant(i);
      if (c instanceof ConstantClass) {
        String clsName = ((ConstantClass) c).getBytes(pool);
        if (isInternal(clsName)) {
          bugReporter.reportBug(
              new BugInstance(this, BugType.IICU_INCORRECT_INTERNAL_CLASS_USE.name(), NORMAL_PRIORITY).addClass(cls).addString(clsName));
        }
      }
    }
  }
}
origin: com.mebigfatguy.fb-contrib/fb-contrib

/**
 * implements the visitor to look for classes that reference com.sun.xxx, or org.apache.xerces.xxx classes by looking for class constants in the constant
 * pool
 *
 * @param context
 *            the context object of the currently parsed class
 */
@Override
public void visitClassContext(ClassContext context) {
  JavaClass cls = context.getJavaClass();
  if (!isInternal(cls.getClassName())) {
    ConstantPool pool = cls.getConstantPool();
    int numItems = pool.getLength();
    for (int i = 0; i < numItems; i++) {
      Constant c = pool.getConstant(i);
      if (c instanceof ConstantClass) {
        String clsName = ((ConstantClass) c).getBytes(pool);
        if (isInternal(clsName)) {
          bugReporter.reportBug(
              new BugInstance(this, BugType.IICU_INCORRECT_INTERNAL_CLASS_USE.name(), NORMAL_PRIORITY).addClass(cls).addString(clsName));
        }
      }
    }
  }
}
com.mebigfatguy.fbcontrib.detectIncorrectInternalClassUse

Javadoc

looks for classes that use objects from com.sun.xxx packages. As these are internal to sun and subject to change, this should not be done.

Most used methods

  • isInternal
    determines if the class in question is an internal class by looking at package prefixes

Popular in Java

  • Making http requests using okhttp
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getApplicationContext (Context)
  • putExtra (Intent)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Path (java.nio.file)
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now