Package edu.umd.cs.findbugs.classfile

Examples of edu.umd.cs.findbugs.classfile.MissingClassException


            // Allow loading javax.annotation's from our own classpath - in case we analyze projects
            // using 3rd party nullness annotations (which do not have jsr305 classes on classpath)
            if(resourceName.startsWith("javax/annotation/")){
                codeBaseEntry = new VirtualCodeBaseEntry(descriptor);
            } else {
                throw new MissingClassException(descriptor, e);
            }
        }

        byte[] data;
        if (codeBaseEntry instanceof ZipInputStreamCodeBaseEntry) {
            data = ((ZipInputStreamCodeBaseEntry) codeBaseEntry).getBytes();
        } else {
            try {
                // Create a ByteArrayOutputStream to capture the class data
                int length = codeBaseEntry.getNumBytes();
                InputStream in = codeBaseEntry.openResource();
                if (length >= 0) {
                    data = IO.readAll(in, length);
                } else {
                    data = IO.readAll(in);
                }

            } catch (IOException e) {
                throw new MissingClassException(descriptor, e);
            }
        }
        return new ClassData(descriptor, codeBaseEntry, data);
    }
View Full Code Here

TOP

Related Classes of edu.umd.cs.findbugs.classfile.MissingClassException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.