Examples of MissingClassException


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

        try {
            // See if the type of value compared to null is an obligation type.
            return database.getFactory().getObligationByType((ObjectType) type);
        } catch (ClassNotFoundException e) {
            errorLogger.reportMissingClass(e);
            throw new MissingClassException(e);
        }

    }
View Full Code Here

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

    }

    @Override
    public void logError(String message, Throwable e) {
        if (e instanceof MissingClassException) {
            MissingClassException e2 = (MissingClassException) e;
            reportMissingClass(e2.getClassNotFoundException());
            return;
        }
        if (e instanceof MethodUnprofitableException) {
            // TODO: log this
            return;
View Full Code Here

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

        return Collections.unmodifiableCollection(bugSet);
    }

    public void addError(String message, Throwable exception) {
        if (exception instanceof MissingClassException) {
            MissingClassException e = (MissingClassException) exception;
            addMissingClass(AbstractBugReporter.getMissingClassName(e.getClassNotFoundException()));
            return;
        }
        if (exception instanceof ClassNotFoundException) {
            ClassNotFoundException e = (ClassNotFoundException) exception;
            addMissingClass(AbstractBugReporter.getMissingClassName(e));
            return;
        }
        if (exception instanceof edu.umd.cs.findbugs.classfile.MissingClassException) {
            edu.umd.cs.findbugs.classfile.MissingClassException e = (edu.umd.cs.findbugs.classfile.MissingClassException) exception;
            addMissingClass(AbstractBugReporter.getMissingClassName(e.toClassNotFoundException()));
            return;
        }
        errorList.add(new AnalysisError(message, exception));
    }
View Full Code Here

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
Copyright © 2018 www.massapi.com. 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.