PMD Results
The following document contains the results of PMD 7.0.0.
Violations By Priority
Priority 3
us/codecraft/webmagic/MultiPageModel.java
Rule |
Violation |
Line |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getPageKey': the method is declared in an interface type |
21 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getPage': the method is declared in an interface type |
28 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getOtherPages': the method is declared in an interface type |
36 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'combine': the method is declared in an interface type |
44 |
us/codecraft/webmagic/handler/RequestMatcher.java
Rule |
Violation |
Line |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'match': the method is declared in an interface type |
19 |
UnnecessaryModifier |
Unnecessary modifier 'public' on enum 'MatchOther': the enum is declared in an interface type |
21 |
us/codecraft/webmagic/handler/SubPageProcessor.java
Rule |
Violation |
Line |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'processPage': the method is declared in an interface type |
17 |
us/codecraft/webmagic/handler/SubPipeline.java
Rule |
Violation |
Line |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'processResult': the method is declared in an interface type |
19 |
us/codecraft/webmagic/model/AfterExtractor.java
Rule |
Violation |
Line |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'afterProcess': the method is declared in an interface type |
13 |
us/codecraft/webmagic/model/HasKey.java
Rule |
Violation |
Line |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'key': the method is declared in an interface type |
19 |
us/codecraft/webmagic/model/OOSpider.java
us/codecraft/webmagic/model/PageMapper.java
us/codecraft/webmagic/model/annotation/ComboExtract.java
Rule |
Violation |
Line |
UnnecessaryModifier |
Unnecessary modifier 'public' on enum 'Op': the enum is declared in an annotation type |
24 |
UnnecessaryModifier |
Unnecessary modifier 'static' on enum 'Op': nested enums are implicitly static |
24 |
UnnecessaryModifier |
Unnecessary modifier 'public' on enum 'Source': the enum is declared in an annotation type |
55 |
UnnecessaryModifier |
Unnecessary modifier 'static' on enum 'Source': nested enums are implicitly static |
55 |
us/codecraft/webmagic/model/annotation/ExtractBy.java
Rule |
Violation |
Line |
UnnecessaryModifier |
Unnecessary modifier 'public' on enum 'Type': the enum is declared in an annotation type |
27 |
UnnecessaryModifier |
Unnecessary modifier 'static' on enum 'Type': nested enums are implicitly static |
27 |
UnnecessaryModifier |
Unnecessary modifier 'public' on enum 'Source': the enum is declared in an annotation type |
47 |
UnnecessaryModifier |
Unnecessary modifier 'static' on enum 'Source': nested enums are implicitly static |
47 |
us/codecraft/webmagic/model/sources/Source.java
Rule |
Violation |
Line |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getText': the method is declared in an interface type |
9 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getTextList': the method is declared in an interface type |
10 |
UnnecessaryModifier |
Unnecessary modifier 'public' on class 'RawHtml': the class is declared in an interface type |
12 |
UnnecessaryModifier |
Unnecessary modifier 'public' on class 'SelectedHtml': the class is declared in an interface type |
22 |
UnnecessaryModifier |
Unnecessary modifier 'public' on class 'Url': the class is declared in an interface type |
38 |
UnnecessaryModifier |
Unnecessary modifier 'public' on class 'RawText': the class is declared in an interface type |
48 |
UnnecessaryModifier |
Unnecessary modifier 'public' on class 'DefaultSource': the class is declared in an interface type |
58 |
us/codecraft/webmagic/monitor/SpiderStatusMXBean.java
Rule |
Violation |
Line |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getName': the method is declared in an interface type |
12 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getStatus': the method is declared in an interface type |
14 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getThread': the method is declared in an interface type |
16 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getTotalPageCount': the method is declared in an interface type |
18 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getLeftPageCount': the method is declared in an interface type |
20 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getSuccessPageCount': the method is declared in an interface type |
22 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getErrorPageCount': the method is declared in an interface type |
24 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getErrorPages': the method is declared in an interface type |
26 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'start': the method is declared in an interface type |
28 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'stop': the method is declared in an interface type |
30 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getStartTime': the method is declared in an interface type |
32 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getPagePerSecond': the method is declared in an interface type |
34 |
us/codecraft/webmagic/pipeline/PageModelPipeline.java
Rule |
Violation |
Line |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'process': the method is declared in an interface type |
13 |
Priority 4
us/codecraft/webmagic/downloader/PhantomJSDownloader.java
Rule |
Violation |
Line |
UnnecessaryFullyQualifiedName |
Unnecessary qualifier 'PhantomJSDownloader': 'crawlJsPath' is already in scope because it is declared in an enclosing type |
81 |
us/codecraft/webmagic/example/OschinaBlog.java
Rule |
Violation |
Line |
UnnecessaryImport |
Unused import 'us.codecraft.webmagic.model.annotation.Formatter' |
6 |
us/codecraft/webmagic/model/PageModelExtractor.java
Rule |
Violation |
Line |
UnnecessaryImport |
Unused import 'us.codecraft.webmagic.model.sources.Source.*' |
14 |
us/codecraft/webmagic/scheduler/RedisScheduler.java
Files
us/codecraft/webmagic/MultiPageModel.java
Rule |
Violation |
Priority |
Line |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getPageKey': the method is declared in an interface type |
3 |
21 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getPage': the method is declared in an interface type |
3 |
28 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getOtherPages': the method is declared in an interface type |
3 |
36 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'combine': the method is declared in an interface type |
3 |
44 |
us/codecraft/webmagic/downloader/PhantomJSDownloader.java
Rule |
Violation |
Priority |
Line |
UnnecessaryFullyQualifiedName |
Unnecessary qualifier 'PhantomJSDownloader': 'crawlJsPath' is already in scope because it is declared in an enclosing type |
4 |
81 |
us/codecraft/webmagic/example/OschinaBlog.java
Rule |
Violation |
Priority |
Line |
UnnecessaryImport |
Unused import 'us.codecraft.webmagic.model.annotation.Formatter' |
4 |
6 |
us/codecraft/webmagic/handler/RequestMatcher.java
Rule |
Violation |
Priority |
Line |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'match': the method is declared in an interface type |
3 |
19 |
UnnecessaryModifier |
Unnecessary modifier 'public' on enum 'MatchOther': the enum is declared in an interface type |
3 |
21 |
us/codecraft/webmagic/handler/SubPageProcessor.java
Rule |
Violation |
Priority |
Line |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'processPage': the method is declared in an interface type |
3 |
17 |
us/codecraft/webmagic/handler/SubPipeline.java
Rule |
Violation |
Priority |
Line |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'processResult': the method is declared in an interface type |
3 |
19 |
us/codecraft/webmagic/model/AfterExtractor.java
Rule |
Violation |
Priority |
Line |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'afterProcess': the method is declared in an interface type |
3 |
13 |
us/codecraft/webmagic/model/HasKey.java
Rule |
Violation |
Priority |
Line |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'key': the method is declared in an interface type |
3 |
19 |
us/codecraft/webmagic/model/OOSpider.java
Rule |
Violation |
Priority |
Line |
UnusedPrivateField |
Avoid unused private fields such as 'pageModelPipeline'. |
3 |
47 |
us/codecraft/webmagic/model/PageMapper.java
us/codecraft/webmagic/model/PageModelExtractor.java
Rule |
Violation |
Priority |
Line |
UnnecessaryImport |
Unused import 'us.codecraft.webmagic.model.sources.Source.*' |
4 |
14 |
us/codecraft/webmagic/model/annotation/ComboExtract.java
Rule |
Violation |
Priority |
Line |
UnnecessaryModifier |
Unnecessary modifier 'public' on enum 'Op': the enum is declared in an annotation type |
3 |
24 |
UnnecessaryModifier |
Unnecessary modifier 'static' on enum 'Op': nested enums are implicitly static |
3 |
24 |
UnnecessaryModifier |
Unnecessary modifier 'public' on enum 'Source': the enum is declared in an annotation type |
3 |
55 |
UnnecessaryModifier |
Unnecessary modifier 'static' on enum 'Source': nested enums are implicitly static |
3 |
55 |
us/codecraft/webmagic/model/annotation/ExtractBy.java
Rule |
Violation |
Priority |
Line |
UnnecessaryModifier |
Unnecessary modifier 'public' on enum 'Type': the enum is declared in an annotation type |
3 |
27 |
UnnecessaryModifier |
Unnecessary modifier 'static' on enum 'Type': nested enums are implicitly static |
3 |
27 |
UnnecessaryModifier |
Unnecessary modifier 'public' on enum 'Source': the enum is declared in an annotation type |
3 |
47 |
UnnecessaryModifier |
Unnecessary modifier 'static' on enum 'Source': nested enums are implicitly static |
3 |
47 |
us/codecraft/webmagic/model/sources/Source.java
Rule |
Violation |
Priority |
Line |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getText': the method is declared in an interface type |
3 |
9 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getTextList': the method is declared in an interface type |
3 |
10 |
UnnecessaryModifier |
Unnecessary modifier 'public' on class 'RawHtml': the class is declared in an interface type |
3 |
12 |
UnnecessaryModifier |
Unnecessary modifier 'public' on class 'SelectedHtml': the class is declared in an interface type |
3 |
22 |
UnnecessaryModifier |
Unnecessary modifier 'public' on class 'Url': the class is declared in an interface type |
3 |
38 |
UnnecessaryModifier |
Unnecessary modifier 'public' on class 'RawText': the class is declared in an interface type |
3 |
48 |
UnnecessaryModifier |
Unnecessary modifier 'public' on class 'DefaultSource': the class is declared in an interface type |
3 |
58 |
us/codecraft/webmagic/monitor/SpiderStatusMXBean.java
Rule |
Violation |
Priority |
Line |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getName': the method is declared in an interface type |
3 |
12 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getStatus': the method is declared in an interface type |
3 |
14 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getThread': the method is declared in an interface type |
3 |
16 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getTotalPageCount': the method is declared in an interface type |
3 |
18 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getLeftPageCount': the method is declared in an interface type |
3 |
20 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getSuccessPageCount': the method is declared in an interface type |
3 |
22 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getErrorPageCount': the method is declared in an interface type |
3 |
24 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getErrorPages': the method is declared in an interface type |
3 |
26 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'start': the method is declared in an interface type |
3 |
28 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'stop': the method is declared in an interface type |
3 |
30 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getStartTime': the method is declared in an interface type |
3 |
32 |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'getPagePerSecond': the method is declared in an interface type |
3 |
34 |
us/codecraft/webmagic/pipeline/PageModelPipeline.java
Rule |
Violation |
Priority |
Line |
UnnecessaryModifier |
Unnecessary modifier 'public' on method 'process': the method is declared in an interface type |
3 |
13 |
us/codecraft/webmagic/scheduler/RedisScheduler.java