Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StaticCalendarDetector is constantly throwing ClassNotFoundExceptions #122

Closed
mebigfatguy opened this issue Sep 5, 2016 · 1 comment
Closed

Comments

@mebigfatguy
Copy link
Contributor

mebigfatguy commented Sep 5, 2016

any time it finds an array

patch

diff --git a/findbugs/src/java/edu/umd/cs/findbugs/detect/StaticCalendarDetector.java b/findbugs/src/java/edu/umd/cs/findbugs/detect/StaticCalendarDetector.java
index 6c04abe..e4441fb 100644
--- a/findbugs/src/java/edu/umd/cs/findbugs/detect/StaticCalendarDetector.java
+++ b/findbugs/src/java/edu/umd/cs/findbugs/detect/StaticCalendarDetector.java
@@ -142,18 +142,19 @@ public class StaticCalendarDetector extends OpcodeStackDetector {
                     sawDateClass = true;
                     break;
                 }
-                try {
-                    ClassDescriptor cDesc = DescriptorFactory.createClassDescriptor(className);
 
-                    if (subtypes2.isSubtype(cDesc, calendarType) || subtypes2.isSubtype(cDesc, dateFormatType)) {
-                        sawDateClass = true;
-                        break;
+                if (!className.startsWith("[")) {
+                    try {
+                        ClassDescriptor cDesc = DescriptorFactory.createClassDescriptor(className);
+
+                        if (subtypes2.isSubtype(cDesc, calendarType) || subtypes2.isSubtype(cDesc, dateFormatType)) {
+                            sawDateClass = true;
+                            break;
+                        }
+                    } catch (ClassNotFoundException e) {
+                        reporter.reportMissingClass(e);
                     }
-                } catch (ClassNotFoundException e) {
-                    reporter.reportMissingClass(e);
                 }
-
-
             }
         }
     }
jsotuyod added a commit to spotbugs/spotbugs that referenced this issue Dec 7, 2016
KengoTODA pushed a commit to spotbugs/spotbugs that referenced this issue Dec 7, 2016
@iloveeclipse
Copy link
Member

This project continues development in a new home: https://github.com/spotbugs/spotbugs/

Please do not open new issues here anymore!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants