konachan700 / JNekoImageDB

Tool for tagging and storage images, with save images in the AES256-encryped files.
11 stars 3 forks source link

There are some findbugs warnings #5

Closed javadev closed 8 years ago

javadev commented 8 years ago

Summary

Classes Bugs Errors Missing Classes 113 22 0 0 Files

Class Bugs jnekoimagesdb.core.img.XImgCrypto 2 jnekoimagesdb.core.img.XImgFS$FileListGenerator 3 jnekoimagesdb.core.img.XImgPreviewGen$PreviewElement 1 jnekoimagesdb.domain.DSImage 2 jnekoimagesdb.domain.DSTag 1 jnekoimagesdb.domain.HibernateUtil 2 jnekoimagesdb.domain.SettingsUtil 4 jnekoimagesdb.ui.controls.PagedFileList 1 jnekoimagesdb.ui.controls.PagedFileList$FileListGenerator 2 jnekoimagesdb.ui.controls.elements.EFileListItem 2 jnekoimagesdb.ui.controls.elements.ETagListItem 1 jnekoimagesdb.ui.controls.elements.EThreadStatItem 1 jnekoimagesdb.core.img.XImgCrypto

Bug Category Details Line Priority jnekoimagesdb.core.img.XImgCrypto.init(String) may fail to clean up java.io.OutputStream on checked exception EXPERIMENTAL OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE 160 Medium Write to static field jnekoimagesdb.core.img.XImgCrypto.isAES256Enable from instance method jnekoimagesdb.core.img.XImgCrypto.init(String) STYLE ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD 149 Medium jnekoimagesdb.core.img.XImgFS$FileListGenerator

Bug Category Details Line Priority Possible null pointer dereference in jnekoimagesdb.core.img.XImgFS$FileListGenerator.run() due to return value of called method STYLE NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE 76 Medium Switch statement found in jnekoimagesdb.core.img.XImgFS$FileListGenerator.run() where default case is missing STYLE SF_SWITCH_NO_DEFAULT 51-92 Medium Unconditional wait in jnekoimagesdb.core.img.XImgFS$FileListGenerator.run() MT_CORRECTNESS UW_UNCOND_WAIT 38 Medium jnekoimagesdb.core.img.XImgPreviewGen$PreviewElement

Bug Category Details Line Priority Possible null pointer dereference in jnekoimagesdb.core.img.XImgPreviewGen$PreviewElement.getFileName() due to return value of called method STYLE NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE 107 Medium jnekoimagesdb.domain.DSImage

Bug Category Details Line Priority new jnekoimagesdb.domain.DSImage(byte[]) may expose internal representation by storing an externally mutable object into DSImage.MD5 MALICIOUS_CODE EI_EXPOSE_REP2 39 Medium new jnekoimagesdb.domain.DSImage(byte[], long) may expose internal representation by storing an externally mutable object into DSImage.MD5 MALICIOUS_CODE EI_EXPOSE_REP2 43 Medium jnekoimagesdb.domain.DSTag

Bug Category Details Line Priority jnekoimagesdb.domain.DSTag.equals(Object) checks for operand being a String BAD_PRACTICE EQ_CHECK_FOR_OPERAND_NOT_COMPATIBLE_WITH_THIS 72 High jnekoimagesdb.domain.HibernateUtil

Bug Category Details Line Priority Incorrect lazy initialization and update of static field jnekoimagesdb.domain.HibernateUtil.util in jnekoimagesdb.domain.HibernateUtil.hibernateInit(String, String, String) MT_CORRECTNESS LI_LAZY_INIT_UPDATE_STATIC 70-71 Medium jnekoimagesdb.domain.HibernateUtil.currSession should be package protected MALICIOUS_CODE MS_PKGPROTECT 27 Medium jnekoimagesdb.domain.SettingsUtil

Bug Category Details Line Priority Found reliance on default encoding in jnekoimagesdb.domain.SettingsUtil._getString(String): String.getBytes() I18N DM_DEFAULT_ENCODING 112 High Found reliance on default encoding in jnekoimagesdb.domain.SettingsUtil._setString(String, String): String.getBytes() I18N DM_DEFAULT_ENCODING 91 High Found reliance on default encoding in jnekoimagesdb.domain.SettingsUtil.getLong(String, long): String.getBytes() I18N DM_DEFAULT_ENCODING 39 High Found reliance on default encoding in jnekoimagesdb.domain.SettingsUtil.setLong(String, long): String.getBytes() I18N DM_DEFAULT_ENCODING 52 High jnekoimagesdb.ui.controls.PagedFileList

Bug Category Details Line Priority Increment of volatile field jnekoimagesdb.ui.controls.PagedFileList.busyCounter in jnekoimagesdb.ui.controls.PagedFileList.regenerateItemList() MT_CORRECTNESS VO_VOLATILE_INCREMENT 478 Medium jnekoimagesdb.ui.controls.PagedFileList$FileListGenerator

Bug Category Details Line Priority jnekoimagesdb.ui.controls.PagedFileList$FileListGenerator.run() forces garbage collection; extremely dubious except in benchmarking code PERFORMANCE DM_GC 192 High Possible null pointer dereference in jnekoimagesdb.ui.controls.PagedFileList$FileListGenerator.run() due to return value of called method STYLE NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE 152 Medium jnekoimagesdb.ui.controls.elements.EFileListItem

Bug Category Details Line Priority jnekoimagesdb.ui.controls.elements.EFileListItem.equals(Object) checks for operand being a java.nio.file.Path BAD_PRACTICE EQ_CHECK_FOR_OPERAND_NOT_COMPATIBLE_WITH_THIS 151 Medium jnekoimagesdb.ui.controls.elements.EFileListItem.equals(Object) is unusual STYLE EQ_UNUSUAL 150-158 Medium jnekoimagesdb.ui.controls.elements.ETagListItem

Bug Category Details Line Priority Unread field: jnekoimagesdb.ui.controls.elements.ETagListItem.isAREMode PERFORMANCE URF_UNREAD_FIELD 39 Medium jnekoimagesdb.ui.controls.elements.EThreadStatItem

Bug Category Details Line Priority Unread public/protected field: jnekoimagesdb.ui.controls.elements.EThreadStatItem.ID STYLE URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD 15 Medium

javadev commented 8 years ago

JNekoImageDB – FindBugs Bug Detector Report.pdf

konachan700 commented 8 years ago

Местами поправил, местами нет. С кривым переопределением equals() разберусь чуть позже отдельно.

javadev commented 8 years ago

Класс! Обновил список ошибок.

konachan700 commented 8 years ago

Исправил почти все.

javadev commented 8 years ago

Да, здорово, большая часть ошибок - исправлена. Ура! :+1: