SpotBugs Bug Detector Report

The following document contains the results of SpotBugs

SpotBugs Version is 4.8.5

Threshold is medium

Effort is default

Summary

Classes Bugs Errors Missing Classes
44 11 0 0

Files

Class Bugs
us.codecraft.webmagic.main.QuickStarter 1
us.codecraft.webmagic.model.samples.GithubRepo 1
us.codecraft.webmagic.model.samples.News163 1
us.codecraft.webmagic.model.samples.OschinaBlog 1
us.codecraft.webmagic.recover.MmapQueueScheduler 1
us.codecraft.webmagic.samples.KaichibaProcessor 1
us.codecraft.webmagic.samples.ZhihuPageProcessor 1
us.codecraft.webmagic.samples.pipeline.OneFilePipeline 1
us.codecraft.webmagic.samples.scheduler.DelayQueueScheduler$RequestWrapper 2
us.codecraft.webmagic.samples.scheduler.ZipCodePageProcessor 1

us.codecraft.webmagic.main.QuickStarter

Bug Category Details Line Priority
Found reliance on default encoding in us.codecraft.webmagic.main.QuickStarter.readKey(String): new java.util.Scanner(InputStream) I18N DM_DEFAULT_ENCODING 54 High

us.codecraft.webmagic.model.samples.GithubRepo

Bug Category Details Line Priority
us.codecraft.webmagic.model.samples.GithubRepo.getLanguage() may expose internal representation by returning GithubRepo.language MALICIOUS_CODE EI_EXPOSE_REP 68 Medium

us.codecraft.webmagic.model.samples.News163

Bug Category Details Line Priority
us.codecraft.webmagic.model.samples.News163.getOtherPages() may expose internal representation by returning News163.otherPage MALICIOUS_CODE EI_EXPOSE_REP 45 Medium

us.codecraft.webmagic.model.samples.OschinaBlog

Bug Category Details Line Priority
us.codecraft.webmagic.model.samples.OschinaBlog.getTags() may expose internal representation by returning OschinaBlog.tags MALICIOUS_CODE EI_EXPOSE_REP 49 Medium

us.codecraft.webmagic.recover.MmapQueueScheduler

Bug Category Details Line Priority
Write to static field us.codecraft.webmagic.recover.MmapQueueScheduler.mapper from instance method new us.codecraft.webmagic.recover.MmapQueueScheduler(DuplicateRemover, String) STYLE ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD 43 Medium

us.codecraft.webmagic.samples.KaichibaProcessor

Bug Category Details Line Priority
Boxing/unboxing to parse a primitive us.codecraft.webmagic.samples.KaichibaProcessor.process(Page) PERFORMANCE DM_BOXED_PRIMITIVE_FOR_PARSING 17 High

us.codecraft.webmagic.samples.ZhihuPageProcessor

Bug Category Details Line Priority
Boxing/unboxing to parse a primitive us.codecraft.webmagic.samples.ZhihuPageProcessor.process(Page) PERFORMANCE DM_BOXED_PRIMITIVE_FOR_PARSING 37 High

us.codecraft.webmagic.samples.pipeline.OneFilePipeline

Bug Category Details Line Priority
Unread field: us.codecraft.webmagic.samples.pipeline.OneFilePipeline.logger PERFORMANCE URF_UNREAD_FIELD 18 Medium

us.codecraft.webmagic.samples.scheduler.DelayQueueScheduler$RequestWrapper

Bug Category Details Line Priority
us.codecraft.webmagic.samples.scheduler.DelayQueueScheduler$RequestWrapper.compareTo(Delayed) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead PERFORMANCE DM_NUMBER_CTOR 52 Medium
us.codecraft.webmagic.samples.scheduler.DelayQueueScheduler$RequestWrapper defines compareTo(Object) and uses Object.equals() BAD_PRACTICE EQ_COMPARETO_USE_OBJECT_EQUALS 26 Medium

us.codecraft.webmagic.samples.scheduler.ZipCodePageProcessor

Bug Category Details Line Priority
Redundant nullcheck of us.codecraft.webmagic.selector.Selectable.toString(), which is known to be non-null in us.codecraft.webmagic.samples.scheduler.ZipCodePageProcessor.process(Page) STYLE RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE 29 Medium