FindBugs Bug Detector Report
The following document contains the results of FindBugs Report
FindBugs Version is 2.0.1
Threshold is medium
Effort is min
Summary
Classes | Bugs | Errors | Missing Classes |
---|
40 | 41 | 0 | 0 |
net.sf.webphotos.BancoImagem
Bug | Category | Details | Line | Priority |
---|
net.sf.webphotos.BancoImagem.getPassword() may expose internal representation by returning BancoImagem.senha | MALICIOUS_CODE | EI_EXPOSE_REP | 243 | Medium |
net.sf.webphotos.BancoImagem.getPasswordFTP() may expose internal representation by returning BancoImagem.senhaFTP | MALICIOUS_CODE | EI_EXPOSE_REP | 261 | Medium |
exceptional return value of java.io.File.mkdirs() ignored in net.sf.webphotos.BancoImagem.getLocalPath(int) | BAD_PRACTICE | RV_RETURN_VALUE_IGNORED_BAD_PRACTICE | 99 | Medium |
Write to static field net.sf.webphotos.BancoImagem.driver from instance method net.sf.webphotos.BancoImagem.configure(String, String) | STYLE | ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD | 124 | High |
Write to static field net.sf.webphotos.BancoImagem.url from instance method net.sf.webphotos.BancoImagem.configure(String, String) | STYLE | ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD | 123 | High |
Write to static field net.sf.webphotos.BancoImagem.senhaFTP from instance method net.sf.webphotos.BancoImagem.setPasswordFTP(char[]) | STYLE | ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD | 279 | High |
Write to static field net.sf.webphotos.BancoImagem.usuarioFTP from instance method net.sf.webphotos.BancoImagem.setUserFTP(String) | STYLE | ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD | 270 | High |
net.sf.webphotos.PhotoDTO
Bug | Category | Details | Line | Priority |
---|
Can't close st since it is always null in net.sf.webphotos.PhotoDTO.atualizaFoto() | CORRECTNESS | NP_CLOSING_NULL | 410 | High |
Unread field: net.sf.webphotos.PhotoDTO.tamanhoBytes | PERFORMANCE | URF_UNREAD_FIELD | 56 | Medium |
net.sf.webphotos.PhotoDTO$1
net.sf.webphotos.gui.util.FtpClient
Bug | Category | Details | Line | Priority |
---|
new net.sf.webphotos.gui.util.FtpClient() invokes System.exit(...), which shuts down the entire virtual machine | BAD_PRACTICE | DM_EXIT | 98 | Medium |
exceptional return value of java.io.File.mkdir() ignored in net.sf.webphotos.gui.util.FtpClient.run() | BAD_PRACTICE | RV_RETURN_VALUE_IGNORED_BAD_PRACTICE | 412 | Medium |
net.sf.webphotos.gui.util.Login
Bug | Category | Details | Line | Priority |
---|
net.sf.webphotos.gui.util.Login.getPassword() may expose internal representation by returning Login.senha | MALICIOUS_CODE | EI_EXPOSE_REP | 175 | Medium |
Write to static field net.sf.webphotos.gui.util.Login.telaLogin from instance method net.sf.webphotos.gui.util.Login.startLogin() | STYLE | ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD | 75 | Medium |
net.sf.webphotos.gui.util.TableSorter
Bug | Category | Details | Line | Priority |
---|
net.sf.webphotos.gui.util.TableSorter$MouseHandler stored into non-transient field TableSorter.mouseListener | BAD_PRACTICE | SE_BAD_FIELD_STORE | 130 | Medium |
net.sf.webphotos.gui.util.TableSorter$TableModelHandler stored into non-transient field TableSorter.tableModelListener | BAD_PRACTICE | SE_BAD_FIELD_STORE | 131 | Medium |
net.sf.webphotos.gui.util.TableSorter$Arrow
Bug | Category | Details | Line | Priority |
---|
integral division result cast to double or float in net.sf.webphotos.gui.util.TableSorter$Arrow.paintIcon(Component, Graphics, int, int) | STYLE | ICAST_IDIV_CAST_TO_DOUBLE | 520 | Medium |
net.sf.webphotos.gui.util.TableSorter$Row
Bug | Category | Details | Line | Priority |
---|
net.sf.webphotos.gui.util.TableSorter$Row defines compareTo(TableSorter$Row) and uses Object.equals() | BAD_PRACTICE | EQ_COMPARETO_USE_OBJECT_EQUALS | 397-421 | Medium |
net.sf.webphotos.locator.BasicEJBLocator
Bug | Category | Details | Line | Priority |
---|
net.sf.webphotos.locator.BasicEJBLocator.EJB_CONTEXT_FACTORY isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 41 | High |
net.sf.webphotos.locator.BasicEJBLocator.EJB_SERVER isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 45 | High |
net.sf.webphotos.locator.BasicEJBLocator.EJB_URL_PREFIXES isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 37 | High |
net.sf.webphotos.sync.FTP.SyncObject
Bug | Category | Details | Line | Priority |
---|
net.sf.webphotos.sync.FTP.SyncObject.getSenha() may expose internal representation by returning SyncObject.senha | MALICIOUS_CODE | EI_EXPOSE_REP | 528 | Medium |
net.sf.webphotos.sync.FTP.SyncObject.setSenha(char[]) may expose internal representation by storing an externally mutable object into SyncObject.senha | MALICIOUS_CODE | EI_EXPOSE_REP2 | 538 | Medium |
Load of known null value in net.sf.webphotos.sync.FTP.SyncObject.connect() | STYLE | NP_LOAD_OF_KNOWN_NULL_VALUE | 199 | Medium |
Null passed for nonnull parameter of java.util.Hashtable.put(Object, Object) in net.sf.webphotos.sync.FTP.SyncObject.connect() | CORRECTNESS | NP_NONNULL_PARAM_VIOLATION | 199 | High |
net.sf.webphotos.util.Util
Bug | Category | Details | Line | Priority |
---|
Incorrect lazy initialization and update of static field net.sf.webphotos.util.Util.albunsRoot in net.sf.webphotos.util.Util.getAlbunsRoot() | MT_CORRECTNESS | LI_LAZY_INIT_UPDATE_STATIC | 128-129 | Medium |
net.sf.webphotos.util.Util.err isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 68 | High |
net.sf.webphotos.util.Util.out isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 67 | High |
net.sf.webphotos.util.Util.<static initializer>() may fail to clean up java.io.OutputStream | EXPERIMENTAL | OBL_UNSATISFIED_OBLIGATION | 90 | Medium |
net.sf.webphotos.util.legacy.Arquivo
Bug | Category | Details | Line | Priority |
---|
Switch statement found in new net.sf.webphotos.util.legacy.Arquivo(String, int, int, int, String, long) where default case is missing | STYLE | SF_SWITCH_NO_DEFAULT | 96-104 | Medium |
net.sf.webphotos.util.legacy.CacheFTP
Bug | Category | Details | Line | Priority |
---|
Found reliance on default encoding in net.sf.webphotos.util.legacy.CacheFTP.loadFile(): new java.io.FileReader(File) | I18N | DM_DEFAULT_ENCODING | 158 | High |
Found reliance on default encoding in net.sf.webphotos.util.legacy.CacheFTP.saveFile(): new java.io.FileWriter(File) | I18N | DM_DEFAULT_ENCODING | 194 | High |
Found reliance on default encoding in net.sf.webphotos.util.legacy.CacheFTP.saveFile(): new java.io.FileWriter(File, boolean) | I18N | DM_DEFAULT_ENCODING | 212 | High |
net.sf.webphotos.util.legacy.CacheFTP.toString() concatenates strings using + in a loop | PERFORMANCE | SBSC_USE_STRINGBUFFER_CONCATENATION | 254 | Medium |
net.sf.webphotos.util.legacy.ComandoFTP
net.sf.webphotos.util.legacy.Photo
Bug | Category | Details | Line | Priority |
---|
Exception is caught when Exception is not thrown in net.sf.webphotos.util.legacy.Photo.resize(String, String, int) | STYLE | REC_CATCH_EXCEPTION | 89 | Medium |