Project: <<unnamed project>>
FindBugs version: 1.3.2
Code analyzed:
40941 lines of code analyzed, in 784 classes, in 21 packages.
| Metric | Total | Density* |
|---|---|---|
| High Priority Warnings | 0.00 | |
| Medium Priority Warnings | 116 | 2.83 |
| Low Priority Warnings | 282 | 6.89 |
| Total Warnings | 398 | 9.72 |
(* Defects per Thousand lines of non-commenting source statements)
| Warning Type | Number |
|---|---|
| Bad practice Warnings | 114 |
| Correctness Warnings | 22 |
| Internationalization Warnings | 24 |
| Malicious code vulnerability Warnings | 1 |
| Multithreaded correctness Warnings | 2 |
| Performance Warnings | 105 |
| Security Warnings | 7 |
| Dodgy Warnings | 123 |
| Total | 398 |
Click on a warning row to see full context information.
| Code | Warning |
|---|---|
| BC | Equals method for ca.sqlpower.architect.ddl.DDLStatement$StatementType assumes the argument is of type DDLStatement$StatementType |
| Dm | ca.sqlpower.architect.swingui.ArchitectSwingSessionContextImpl$3.sessionClosing(SessionLifecycleEvent) invokes System.exit(...), which shuts down the entire virtual machine |
| Dm | ca.sqlpower.architect.swingui.ASUtils.getContext() invokes System.exit(...), which shuts down the entire virtual machine |
| Eq | ca.sqlpower.architect.ArchitectVersion defines compareTo(ArchitectVersion) and uses Object.equals() |
| ES | Comparison of String objects using == or != in ca.sqlpower.architect.diff.SQLObjectComparator.compare(SQLObject, SQLObject) |
| Nm | The method name ca.sqlpower.architect.CoreProject.LoadSQLObjectAttributes(SQLObject, Attributes) doesn't start with a lower case letter |
| Nm | The class name ca.sqlpower.architect.swingui.CompareDMFrame$sourceCopyAction doesn't start with an upper case letter |
| Nm | The class name ca.sqlpower.architect.swingui.CompareDMFrame$targetCopyAction doesn't start with an upper case letter |
| Nm | Confusing to have methods ca.sqlpower.architect.swingui.DefaultColumnPanel.setUp() and ca.sqlpower.architect.swingui.ProjectSettingsPanel.setup() |
| Nm | Confusing to have methods ca.sqlpower.architect.swingui.IndexColumnTable.cleanUp() and ca.sqlpower.architect.swingui.action.ExportDDLAction$ConflictResolverProcess.cleanup() |
| Nm | The class name ca.sqlpower.architect.swingui.olap.JoinEntryPanel$compareByColumnCount doesn't start with an upper case letter |
| Nm | The method name ca.sqlpower.architect.swingui.olap.OLAPPlayPenFactory$OLAPModelListener.PlayPenLifeEnding(PlayPenLifecycleEvent) doesn't start with a lower case letter |
| Nm | The method name ca.sqlpower.architect.swingui.olap.OLAPPlayPenFactory$PlayPenUndoAdapter.PlayPenComponentAdded(PlayPenContentEvent) doesn't start with a lower case letter |
| Nm | The method name ca.sqlpower.architect.swingui.olap.OLAPPlayPenFactory$PlayPenUndoAdapter.PlayPenComponentRemoved(PlayPenContentEvent) doesn't start with a lower case letter |
| Nm | The method name ca.sqlpower.architect.swingui.olap.OLAPPlayPenFactory$SelectionSynchronizer.PlayPenComponentAdded(PlayPenContentEvent) doesn't start with a lower case letter |
| Nm | The method name ca.sqlpower.architect.swingui.olap.OLAPPlayPenFactory$SelectionSynchronizer.PlayPenComponentRemoved(PlayPenContentEvent) doesn't start with a lower case letter |
| Nm | The method name ca.sqlpower.architect.swingui.olap.UsageComponent$OLAPPanesWatcher.PlayPenComponentAdded(PlayPenContentEvent) doesn't start with a lower case letter |
| Nm | The method name ca.sqlpower.architect.swingui.olap.UsageComponent$OLAPPanesWatcher.PlayPenComponentRemoved(PlayPenContentEvent) doesn't start with a lower case letter |
| Nm | The method name ca.sqlpower.architect.swingui.RelationalPlayPenFactory$SelectionSynchronizer.PlayPenComponentAdded(PlayPenContentEvent) doesn't start with a lower case letter |
| Nm | The method name ca.sqlpower.architect.swingui.RelationalPlayPenFactory$SelectionSynchronizer.PlayPenComponentRemoved(PlayPenContentEvent) doesn't start with a lower case letter |
| ODR | ca.sqlpower.architect.profile.RemoteDatabaseProfileCreator.doColumnProfile(ColumnProfileResult, MonitorableImpl) may fail to close database resource on exception |
| ODR | ca.sqlpower.architect.profile.RemoteDatabaseProfileCreator.doTableProfile(TableProfileResult) may fail to close database resource on exception |
| ODR | ca.sqlpower.architect.profile.RemoteDatabaseProfileCreator.execProfileFunctions(ColumnProfileResult, ProfileFunctionDescriptor, SQLColumn, Connection, Monitorable) may fail to close database resource on exception |
| ODR | ca.sqlpower.architect.swingui.SQLScriptDialog$ExecuteSQLScriptWorker.doStuff() may fail to close database resource on exception |
| OS | ca.sqlpower.architect.etl.kettle.KettleJob.outputToXML(List, JobMeta) may fail to close stream on exception |
| RV | ca.sqlpower.architect.antbuild.AddLicenseToDMGTask.execute() ignores exceptional return value of java.io.File.delete() |
| RV | ca.sqlpower.architect.ArchitectUtils.checkForValidPlDotIni(String, String) ignores exceptional return value of java.io.File.createNewFile() |
| RV | ca.sqlpower.architect.etl.kettle.KettleJob.outputToXML(List, JobMeta) ignores exceptional return value of java.io.File.createNewFile() |
| RV | ca.sqlpower.architect.etl.kettle.KettleJob.outputToXML(List, JobMeta) ignores exceptional return value of java.io.File.delete() |
| RV | ca.sqlpower.architect.swingui.ArchitectSwingSessionImpl.saveOrSaveAs(boolean, boolean) ignores exceptional return value of java.io.File.createNewFile() |
| Se | ca.sqlpower.architect.diff.SQLRelationshipComparator implements Comparator but not Serializable |
| Se | Class ca.sqlpower.architect.olap.undo.OLAPChildEdit defines non-transient non-serializable instance field event |
| Se | Class ca.sqlpower.architect.olap.undo.OLAPUndoManager defines non-transient non-serializable instance field eventHandler |
| Se | Class ca.sqlpower.architect.olap.undo.OLAPUndoManager defines non-transient non-serializable instance field rememberedPosition |
| Se | ca.sqlpower.architect.profile.LocalReservoirProfileCreator$TopNValuesComparator implements Comparator but not Serializable |
| Se | Class ca.sqlpower.architect.swingui.action.AutoLayoutAction defines non-transient non-serializable instance field layout |
| Se | Class ca.sqlpower.architect.swingui.action.CheckForUpdateAction defines non-transient non-serializable instance field propertyInputStream |
| Se | Class ca.sqlpower.architect.swingui.action.CheckForUpdateAction defines non-transient non-serializable instance field urlc |
| Se | Class ca.sqlpower.architect.swingui.action.CreateRelationshipAction defines non-transient non-serializable instance field fkTable |
| Se | Class ca.sqlpower.architect.swingui.action.CreateRelationshipAction defines non-transient non-serializable instance field pkTable |
| Se | Class ca.sqlpower.architect.swingui.action.CreateTableAction$TablePlacer$1 defines non-transient non-serializable instance field this$1 |
| Se | Class ca.sqlpower.architect.swingui.action.DeleteSelectedAction defines non-transient non-serializable instance field treeSelectionHandler |
| Se | Class ca.sqlpower.architect.swingui.action.ExportHTMLReportAction defines non-transient non-serializable instance field result |
| Se | Class ca.sqlpower.architect.swingui.action.ExportHTMLReportAction defines non-transient non-serializable instance field xmlOutputStream |
| Se | Class ca.sqlpower.architect.swingui.action.ProfileAction defines non-transient non-serializable instance field profileManager |
| Se | ca.sqlpower.architect.swingui.action.RedoAction$ManagerListener stored into non-transient field RedoAction.managerListener |
| Se | ca.sqlpower.architect.swingui.action.UndoAction$ManagerListener stored into non-transient field UndoAction.managerListener |
| Se | Class ca.sqlpower.architect.swingui.ArchitectFrame defines non-transient non-serializable instance field autoLayout |
| Se | ca.sqlpower.architect.layout.FruchtermanReingoldForceLayout stored into non-transient field ArchitectFrame.autoLayout |
| Se | Class ca.sqlpower.architect.swingui.BasicTablePaneUI defines non-transient non-serializable instance field tablePane |
| Se | Class ca.sqlpower.architect.swingui.CompareDMPanel defines non-transient non-serializable instance field playpenNameRefreshHandler |
| Se | Class ca.sqlpower.architect.swingui.CompareDMPanel defines non-transient non-serializable instance field source |
| Se | Class ca.sqlpower.architect.swingui.CompareDMPanel defines non-transient non-serializable instance field target |
| Se | ca.sqlpower.architect.swingui.CompareDMPanel$3 stored into non-transient field CompareDMPanel.playpenNameRefreshHandler |
| Se | Class ca.sqlpower.architect.swingui.CompareDMPanel$SourceOrTargetStuff$1 defines non-transient non-serializable instance field this$1 |
| Se | Class ca.sqlpower.architect.swingui.CompareDMPanel$SourceOrTargetStuff$2 defines non-transient non-serializable instance field this$1 |
| Se | Class ca.sqlpower.architect.swingui.IndexEditPanel defines non-transient non-serializable instance field columnsTable |
| Se | Class ca.sqlpower.architect.swingui.olap.action.CreateCubeAction defines non-transient non-serializable instance field schema |
| Se | Class ca.sqlpower.architect.swingui.olap.action.CreateDimensionAction defines non-transient non-serializable instance field schema |
| Se | Class ca.sqlpower.architect.swingui.olap.action.CreateVirtualCubeAction defines non-transient non-serializable instance field schema |
| Se | Class ca.sqlpower.architect.swingui.olap.action.EditCubeAction defines non-transient non-serializable instance field cube |
| Se | Class ca.sqlpower.architect.swingui.olap.action.EditDimensionAction defines non-transient non-serializable instance field dimension |
| Se | Class ca.sqlpower.architect.swingui.olap.action.EditHierarchyAction defines non-transient non-serializable instance field hierarchy |
| Se | Class ca.sqlpower.architect.swingui.olap.action.EditLevelAction defines non-transient non-serializable instance field level |
| Se | Class ca.sqlpower.architect.swingui.olap.action.EditMeasureAction defines non-transient non-serializable instance field measure |
| Se | Class ca.sqlpower.architect.swingui.olap.action.EditSchemaAction defines non-transient non-serializable instance field schema |
| Se | Class ca.sqlpower.architect.swingui.olap.action.EditVirtualCubeAction defines non-transient non-serializable instance field vCube |
| Se | Class ca.sqlpower.architect.swingui.olap.action.ExportSchemaAction defines non-transient non-serializable instance field schema |
| Se | Class ca.sqlpower.architect.swingui.olap.action.OLAPDeleteSelectedAction defines non-transient non-serializable instance field editSession |
| Se | Class ca.sqlpower.architect.swingui.olap.action.OLAPEditAction defines non-transient non-serializable instance field olapSession |
| Se | Class ca.sqlpower.architect.swingui.olap.BasicVirtualCubePaneUI defines non-transient non-serializable instance field cubeUsageWatcher |
| Se | ca.sqlpower.architect.swingui.olap.JoinEntryPanel$compareByColumnCount implements Comparator but not Serializable |
| Se | Class ca.sqlpower.architect.swingui.olap.OLAPTree defines non-transient non-serializable instance field menuFactory |
| Se | Class ca.sqlpower.architect.swingui.olap.OLAPTree defines non-transient non-serializable instance field schema |
| Se | Class ca.sqlpower.architect.swingui.PlayPen defines non-transient non-serializable instance field contentPane |
| Se | Class ca.sqlpower.architect.swingui.PlayPen defines non-transient non-serializable instance field dgl |
| Se | Class ca.sqlpower.architect.swingui.PlayPen defines non-transient non-serializable instance field fontRenderContext |
| Se | Class ca.sqlpower.architect.swingui.PlayPen defines non-transient non-serializable instance field popupFactory |
| Se | Class ca.sqlpower.architect.swingui.PlayPen defines non-transient non-serializable instance field ppMouseListener |
| Se | Class ca.sqlpower.architect.swingui.PlayPen defines non-transient non-serializable instance field bringToFrontAction |
| Se | Class ca.sqlpower.architect.swingui.PlayPen defines non-transient non-serializable instance field sendToBackAction |
| Se | Class ca.sqlpower.architect.swingui.PlayPen defines non-transient non-serializable instance field zoomInAction |
| Se | Class ca.sqlpower.architect.swingui.PlayPen defines non-transient non-serializable instance field zoomOutAction |
| Se | Class ca.sqlpower.architect.swingui.PreferencesPanel defines non-transient non-serializable instance field context |
| Se | Class ca.sqlpower.architect.swingui.PreferencesPanel defines non-transient non-serializable instance field us |
| Se | Class ca.sqlpower.architect.swingui.PrintPanel defines non-transient non-serializable instance field job |
| Se | Class ca.sqlpower.architect.swingui.PrintPanel defines non-transient non-serializable instance field pageFormat |
| Se | Class ca.sqlpower.architect.swingui.ProfileManagerView defines non-transient non-serializable instance field pageListener |
| Se | Class ca.sqlpower.architect.swingui.ProfileManagerView defines non-transient non-serializable instance field pm |
| Se | ca.sqlpower.architect.swingui.ProfileManagerView$TableProfileDateComparator implements Comparator but not Serializable |
| Se | ca.sqlpower.architect.swingui.ProfileManagerView$TableProfileNameComparator implements Comparator but not Serializable |
| Se | Class ca.sqlpower.architect.swingui.ProfilePanel defines non-transient non-serializable instance field displayPanel |
| Se | ca.sqlpower.architect.swingui.ProfilePanel$1 stored into non-transient field ProfilePanel.listener |
| Se | Class ca.sqlpower.architect.swingui.ProfileRowComponent defines non-transient non-serializable instance field pm |
| Se | Class ca.sqlpower.architect.swingui.ProfileRowComponent defines non-transient non-serializable instance field profileResultListener |
| Se | Class ca.sqlpower.architect.swingui.ProfileRowComponent defines non-transient non-serializable instance field result |
| Se | ca.sqlpower.architect.swingui.ProfileRowComponent$1 stored into non-transient field ProfileRowComponent.profileResultListener |
| Se | Class ca.sqlpower.architect.swingui.table.FreqValueCountTableModel defines non-transient non-serializable instance field profile |
| Se | Class ca.sqlpower.architect.swingui.table.ProfileTableModel defines non-transient non-serializable instance field profileManager |
| Se | ca.sqlpower.architect.swingui.table.ValueTableCellRenderer$1 is serializable and an inner class |
| Se | Class ca.sqlpower.architect.swingui.TableEditPanel defines non-transient non-serializable instance field tp |
| SnVI | ca.sqlpower.architect.DateFormatAllowsNull is Serializable; consider declaring a serialVersionUID |
| SnVI | ca.sqlpower.architect.ddl.CaseInsensitiveHashMap is Serializable; consider declaring a serialVersionUID |
| SnVI | ca.sqlpower.architect.diff.SQLIndexComparator is Serializable; consider declaring a serialVersionUID |
| SnVI | ca.sqlpower.architect.diff.SQLObjectComparator is Serializable; consider declaring a serialVersionUID |
| SnVI | ca.sqlpower.architect.profile.event.ProfileChangeEvent is Serializable; consider declaring a serialVersionUID |
| SnVI | ca.sqlpower.architect.swingui.dbtree.DBTreeModel is Serializable; consider declaring a serialVersionUID |
| SnVI | ca.sqlpower.architect.swingui.event.SelectionEvent is Serializable; consider declaring a serialVersionUID |
| SnVI | ca.sqlpower.architect.swingui.olap.BasicCubePaneUI is Serializable; consider declaring a serialVersionUID |
| SnVI | ca.sqlpower.architect.swingui.olap.BasicDimensionPaneUI is Serializable; consider declaring a serialVersionUID |
| SnVI | ca.sqlpower.architect.swingui.olap.BasicVirtualCubePaneUI is Serializable; consider declaring a serialVersionUID |
| SnVI | ca.sqlpower.architect.swingui.olap.DnDOLAPTransferable is Serializable; consider declaring a serialVersionUID |
| UI | Usage of GetResource in ca.sqlpower.architect.swingui.action.AutoLayoutAction.actionPerformed(ActionEvent) may be unsafe if class is extended |
| UI | Usage of GetResource in ca.sqlpower.architect.swingui.olap.action.CreateEnergonCubeAction.actionPerformed(ActionEvent) may be unsafe if class is extended |
| Code | Warning |
|---|---|
| MF | Method new ca.sqlpower.architect.ddl.GenericTypeDescriptor(String, int, long, String, String, int, boolean, boolean) defines a variable that obscures field GenericTypeDescriptor.hasScale |
| MF | Field HelpAction.session masks field in superclass ca.sqlpower.architect.swingui.action.AbstractArchitectAction |
| MF | Method ca.sqlpower.architect.swingui.ContainerPane.getSelectedItems() defines a variable that obscures field ContainerPane.selectedItems |
| MF | Method ca.sqlpower.architect.swingui.IndexEditPanel.getIndexName() defines a variable that obscures field IndexEditPanel.name |
| MF | Method ca.sqlpower.architect.swingui.TablePane.addTransferable(Point, Transferable, DataFlavor, boolean) defines a variable that obscures field TablePane.insertionPoint |
| NP | Possible null pointer dereference of mappingRules in ca.sqlpower.architect.ddl.TypeMap.getRules(SQLColumn) |
| NP | Possible null pointer dereference of fact in new ca.sqlpower.architect.swingui.olap.LevelEditPanel(MondrianModel$Level) |
| RCN | Nullcheck of FruchtermanReingoldForceLayout.nodes at line 147 of value previously dereferenced in ca.sqlpower.architect.layout.FruchtermanReingoldForceLayout.nextFrame() |
| RCN | Nullcheck of index at line 68 of value previously dereferenced in new ca.sqlpower.architect.swingui.action.EditSpecificIndexAction(ArchitectSwingSession, SQLIndex) |
| RCN | Nullcheck of settings at line 216 of value previously dereferenced in ca.sqlpower.architect.swingui.KettleJobPanel.buildUI() |
| RCN | Nullcheck of fcg at line 426 of value previously dereferenced in ca.sqlpower.architect.swingui.PrintPanel$PrintPreviewPanel.paintComponent(Graphics) |
| RCN | Nullcheck of ProfileRowComponent$RowComponentLayout.icon at line 212 of value previously dereferenced in ca.sqlpower.architect.swingui.ProfileRowComponent$RowComponentLayout.layoutContainer(Container) |
| RCN | Nullcheck of ProfileRowComponent$RowComponentLayout.reload at line 259 of value previously dereferenced in ca.sqlpower.architect.swingui.ProfileRowComponent$RowComponentLayout.layoutContainer(Container) |
| RCN | Nullcheck of con at line 443 of value previously dereferenced in ca.sqlpower.architect.swingui.SQLScriptDialog$ExecuteSQLScriptWorker.doStuff() |
| RCN | Nullcheck of playPen at line 43 of value previously dereferenced in new ca.sqlpower.architect.undo.ArchitectUndoManager(PlayPen) |
| SIO | Method ca.sqlpower.architect.swingui.action.AutoLayoutAction.actionPerformed(ActionEvent) does an unnecessary type check using instanceof operator when it can be determined statically |
| SIO | Method ca.sqlpower.architect.swingui.PlayPen$PPMouseListener.mouseClicked(MouseEvent) does an unnecessary type check using instanceof operator when it can be determined statically |
| SIO | Method ca.sqlpower.architect.swingui.PlayPen$PPMouseListener.mousePressed(MouseEvent) does an unnecessary type check using instanceof operator when it can be determined statically |
| SIO | Method ca.sqlpower.architect.swingui.ProfileGraphPanel.displayProfile(ColumnProfileResult) does an unnecessary type check using instanceof operator when it can be determined statically |
| UwF | Unwritten field: ca.sqlpower.architect.swingui.action.ExportDDLAction$ConflictResolverProcess.error |
| UwF | Unwritten field: ca.sqlpower.architect.swingui.CompareDMPanel$SourceOrTargetStuff.newConnectionDialog |
| UwF | Unwritten field: ca.sqlpower.architect.swingui.CompareDMSettings$SourceOrTargetSettings.connectURL |
| Code | Warning |
|---|---|
| Dm | Use of non-localized String.toUpperCase() or String.toLowerCase |
| Dm | Use of non-localized String.toUpperCase() or String.toLowerCase |
| Dm | Use of non-localized String.toUpperCase() or String.toLowerCase |
| Dm | Use of non-localized String.toUpperCase() or String.toLowerCase |
| Dm | Use of non-localized String.toUpperCase() or String.toLowerCase |
| Dm | Use of non-localized String.toUpperCase() or String.toLowerCase |
| Dm | Use of non-localized String.toUpperCase() or String.toLowerCase |
| Dm | Use of non-localized String.toUpperCase() or String.toLowerCase |
| Dm | Use of non-localized String.toUpperCase() or String.toLowerCase |
| Dm | Use of non-localized String.toUpperCase() or String.toLowerCase |
| Dm | Use of non-localized String.toUpperCase() or String.toLowerCase |
| Dm | Use of non-localized String.toUpperCase() or String.toLowerCase |
| Dm | Use of non-localized String.toUpperCase() or String.toLowerCase |
| Dm | Use of non-localized String.toUpperCase() or String.toLowerCase |
| Dm | Use of non-localized String.toUpperCase() or String.toLowerCase |
| Dm | Use of non-localized String.toUpperCase() or String.toLowerCase |
| Dm | Use of non-localized String.toUpperCase() or String.toLowerCase |
| Dm | Use of non-localized String.toUpperCase() or String.toLowerCase |
| Dm | Use of non-localized String.toUpperCase() or String.toLowerCase |
| Dm | Use of non-localized String.toUpperCase() or String.toLowerCase |
| Dm | Use of non-localized String.toUpperCase() or String.toLowerCase |
| Dm | Use of non-localized String.toUpperCase() or String.toLowerCase |
| Dm | Use of non-localized String.toUpperCase() or String.toLowerCase |
| Dm | Use of non-localized String.toUpperCase() or String.toLowerCase |
| Code | Warning |
|---|---|
| EI | ca.sqlpower.architect.ArchitectVersion.getParts() may expose internal representation by returning ArchitectVersion.parts |
| Code | Warning |
|---|---|
| IS | Inconsistent synchronization of ca.sqlpower.architect.swingui.PlayPen.tableNames; locked 66% of time |
| LI | Incorrect lazy initialization and update of static field ca.sqlpower.architect.swingui.ASUtils.context in ca.sqlpower.architect.swingui.ASUtils.getContext() |
| Code | Warning |
|---|---|
| Bx | Method ca.sqlpower.architect.AbstractUserSetting.setInt(String, int) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead |
| Bx | Method ca.sqlpower.architect.ddl.ConflictResolver.getJobSize() invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead |
| Bx | Primitive value is boxed then unboxed to perform primative coercion in ca.sqlpower.architect.etl.kettle.KettleJob.createMergeJoins(int, TransMeta, List) |
| Bx | Method ca.sqlpower.architect.etl.kettle.KettleJob.createMergeJoins(int, TransMeta, List) invokes inefficient Double.valueOf(double) constructor; use KettleJob.java:[line 623] instead |
| Bx | Method ca.sqlpower.architect.etl.kettle.KettleJob.doExport(List, SQLDatabase) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead |
| Bx | Method ca.sqlpower.architect.profile.LocalReservoirProfileCreator.profileColumnsFromSample(TableProfileResult, Object[][], MonitorableImpl) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead |
| Bx | Primitive boxed just to call toString in ca.sqlpower.architect.swingui.ArchitectPropertiesDataSourceTypeOptionPanel.applyChanges() |
| Bx | Method ca.sqlpower.architect.swingui.ColumnEditPanel.updateModel() invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead |
| Bx | Method ca.sqlpower.architect.swingui.PlayPen$AddObjectsTask.doStuff() invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead |
| Bx | Method new ca.sqlpower.architect.swingui.SQLScriptDialog$ExecuteSQLScriptWorker(SQLScriptDialog, ArchitectSwingSession) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead |
| Bx | Method ca.sqlpower.architect.swingui.SwingUIProject.saveSQLObject(PrintWriter, SQLObject) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead |
| Bx | Method ca.sqlpower.architect.swingui.TablePane.insertObjects(List, int, boolean) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead |
| Bx | Method ca.sqlpower.architect.swingui.TablePane.setInsertionPoint(int) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead |
| Dm | ca.sqlpower.architect.CoreProject$ProfileResultTopNValueFactory.createObject(Attributes) invokes inefficient new String(String) constructor |
| Dm | ca.sqlpower.architect.CoreProject$ProfileResultValueFactory.createObject(Attributes) invokes inefficient new String(String) constructor |
| Dm | ca.sqlpower.architect.swingui.ArchitectPropertiesDataSourceTypeOptionPanel.applyChanges() invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead |
| Dm | ca.sqlpower.architect.swingui.IndexColumnTable$Row.toString() invokes inefficient new String(String) constructor |
| Dm | ca.sqlpower.architect.swingui.IndexEditPanel.generateName(int) invokes inefficient new String(String) constructor |
| Dm | Method new ca.sqlpower.architect.swingui.PrintPanel(ArchitectSwingSession) invokes toString() method on a String |
| SIC | Should ca.sqlpower.architect.CoreProject$DDLGeneratorFactory be a _static_ inner class? |
| SIC | Should ca.sqlpower.architect.CoreProject$FileFactory be a _static_ inner class? |
| SIC | Should ca.sqlpower.architect.CoreProject$ProfileResultTopNValueFactory be a _static_ inner class? |
| SIC | Should ca.sqlpower.architect.CoreProject$ProfileResultValueFactory be a _static_ inner class? |
| SIC | Should ca.sqlpower.architect.CoreProject$SQLExceptionFactory be a _static_ inner class? |
| SIC | Should ca.sqlpower.architect.ddl.TypeMap$MappingRule be a _static_ inner class? |
| SIC | Should ca.sqlpower.architect.DepthFirstSearch$VertexInfo be a _static_ inner class? |
| SIC | Should ca.sqlpower.architect.olap.SchemaWatcher$CubeDimensionKey be a _static_ inner class? |
| SIC | The class ca.sqlpower.architect.olap.undo.OLAPUndoManager$1 could be refactored into a named _static_ inner class |
| SIC | Should ca.sqlpower.architect.profile.LocalReservoirProfileCreator$TopNValuesComparator be a _static_ inner class? |
| SIC | The class ca.sqlpower.architect.profile.output.ProfilePDFFormat$1 could be refactored into a named _static_ inner class |
| SIC | Should ca.sqlpower.architect.profile.output.ProfilePDFFormat$ProfileTableStructure be a _static_ inner class? |
| SIC | Should ca.sqlpower.architect.profile.RemoteDatabaseProfileCreator$AverageSQLFunction be a _static_ inner class? |
| SIC | Should ca.sqlpower.architect.profile.RemoteDatabaseProfileCreator$CaseWhenNullSQLFunction be a _static_ inner class? |
| SIC | Should ca.sqlpower.architect.profile.RemoteDatabaseProfileCreator$StringLengthSQLFunction be a _static_ inner class? |
| SIC | The class ca.sqlpower.architect.swingui.action.AboutAction$1 could be refactored into a named _static_ inner class |
| SIC | The class ca.sqlpower.architect.swingui.action.EditColumnAction$2 could be refactored into a named _static_ inner class |
| SIC | The class ca.sqlpower.architect.swingui.action.EditTableAction$1 could be refactored into a named _static_ inner class |
| SIC | The class ca.sqlpower.architect.swingui.action.EditTableAction$2 could be refactored into a named _static_ inner class |
| SIC | The class ca.sqlpower.architect.swingui.action.ExportDDLAction$2 could be refactored into a named _static_ inner class |
| SIC | Should ca.sqlpower.architect.swingui.action.ExportDDLAction$ConflictFinderProcess be a _static_ inner class? |
| SIC | Should ca.sqlpower.architect.swingui.action.ExportDDLAction$ConflictResolverProcess be a _static_ inner class? |
| SIC | The class ca.sqlpower.architect.swingui.action.KettleJobAction$2 could be refactored into a named _static_ inner class |
| SIC | The class ca.sqlpower.architect.swingui.action.PasteSelectedAction$2 could be refactored into a named _static_ inner class |
| SIC | The class ca.sqlpower.architect.swingui.action.ProgressAction$1 could be refactored into a named _static_ inner class |
| SIC | The class ca.sqlpower.architect.swingui.action.RefreshAction$1 could be refactored into a named _static_ inner class |
| SIC | The class ca.sqlpower.architect.swingui.action.RefreshAction$2 could be refactored into a named _static_ inner class |
| SIC | Should ca.sqlpower.architect.swingui.action.SaveProfileAction$ProfileResultsTree be a _static_ inner class? |
| SIC | The class ca.sqlpower.architect.swingui.action.VisualMappingReportAction$1 could be refactored into a named _static_ inner class |
| SIC | The class ca.sqlpower.architect.swingui.action.VisualMappingReportAction$3 could be refactored into a named _static_ inner class |
| SIC | Should ca.sqlpower.architect.swingui.ArchitectPropertiesDataSourceTypeOptionPanel$ProfileFunctionTableModel be a _static_ inner class? |
| SIC | The class ca.sqlpower.architect.swingui.ArchitectSwingSessionContextImpl$1 could be refactored into a named _static_ inner class |
| SIC | Should ca.sqlpower.architect.swingui.ArchitectSwingSessionContextImpl$DummyTransferable be a _static_ inner class? |
| SIC | Should ca.sqlpower.architect.swingui.ColumnEditPanel$DocumentCheckboxEnabler be a _static_ inner class? |
| SIC | Should ca.sqlpower.architect.swingui.CompareDMFrame$CloseAction be a _static_ inner class? |
| SIC | Should ca.sqlpower.architect.swingui.CompareDMFrame$sourceCopyAction be a _static_ inner class? |
| SIC | Should ca.sqlpower.architect.swingui.CompareDMFrame$targetCopyAction be a _static_ inner class? |
| SIC | The class ca.sqlpower.architect.swingui.DBTree$PokeDBWorker could be refactored into a _static_ inner class |
| SIC | Should ca.sqlpower.architect.swingui.FormLayout$LeftRightHeight be a _static_ inner class? |
| SIC | The class ca.sqlpower.architect.swingui.IndexColumnTable$1 could be refactored into a named _static_ inner class |
| SIC | Should ca.sqlpower.architect.swingui.IndexColumnTable$ComboBoxEditor be a _static_ inner class? |
| SIC | Should ca.sqlpower.architect.swingui.IndexColumnTable$ComboBoxRenderer be a _static_ inner class? |
| SIC | Should ca.sqlpower.architect.swingui.IndexColumnTable$Row be a _static_ inner class? |
| SIC | The class ca.sqlpower.architect.swingui.olap.action.CreateDimensionUsageAction$1 could be refactored into a named _static_ inner class |
| SIC | The class ca.sqlpower.architect.swingui.olap.action.CreateDimensionUsageAction$2 could be refactored into a named _static_ inner class |
| SIC | The class ca.sqlpower.architect.swingui.olap.action.CreateMeasureAction$1 could be refactored into a named _static_ inner class |
| SIC | The class ca.sqlpower.architect.swingui.olap.action.ImportSchemaAction$1 could be refactored into a named _static_ inner class |
| SIC | The class ca.sqlpower.architect.swingui.olap.action.OLAPEditAction$1 could be refactored into a named _static_ inner class |
| SIC | Should ca.sqlpower.architect.swingui.olap.DimensionPane$HierarchySection be a _static_ inner class? |
| SIC | The class ca.sqlpower.architect.swingui.olap.JoinEntryPanel$1 could be refactored into a named _static_ inner class |
| SIC | Should ca.sqlpower.architect.swingui.olap.JoinEntryPanel$compareByColumnCount be a _static_ inner class? |
| SIC | Should ca.sqlpower.architect.swingui.olap.LevelEditPanel$PropertiesTableNameValidator be a _static_ inner class? |
| SIC | Should ca.sqlpower.architect.swingui.PlayPen$DnDLabel be a _static_ inner class? |
| SIC | Should ca.sqlpower.architect.swingui.PlayPen$PlayPenDropListener be a _static_ inner class? |
| SIC | Should ca.sqlpower.architect.swingui.ProfileManagerView$TableProfileDateComparator be a _static_ inner class? |
| SIC | Should ca.sqlpower.architect.swingui.ProfileManagerView$TableProfileNameComparator be a _static_ inner class? |
| SIC | The class ca.sqlpower.architect.swingui.ProfilePanel$2 could be refactored into a named _static_ inner class |
| SIC | The class ca.sqlpower.architect.swingui.ProfileResultsViewer$2 could be refactored into a named _static_ inner class |
| SIC | Should ca.sqlpower.architect.swingui.ProfileResultsViewer$ProfilePanelMouseListener be a _static_ inner class? |
| SIC | The class ca.sqlpower.architect.swingui.ProfileRowComponent$4 could be refactored into a named _static_ inner class |
| SIC | The class ca.sqlpower.architect.swingui.ProfileRowComponent$5 could be refactored into a named _static_ inner class |
| SIC | The class ca.sqlpower.architect.swingui.SearchReplace$2 could be refactored into a named _static_ inner class |
| SIC | The class ca.sqlpower.architect.swingui.SearchReplace$3 could be refactored into a named _static_ inner class |
| SIC | The class ca.sqlpower.architect.swingui.SearchReplace$4 could be refactored into a named _static_ inner class |
| SIC | The class ca.sqlpower.architect.swingui.SearchReplace$5 could be refactored into a named _static_ inner class |
| SIC | Should ca.sqlpower.architect.swingui.SearchReplace$SearchResultsTableModel be a _static_ inner class? |
| SIC | Should ca.sqlpower.architect.swingui.SQLScriptDialog$CopyAction be a _static_ inner class? |
| SIC | The class ca.sqlpower.architect.swingui.table.SQLObjectTableCellRenderer$1 could be refactored into a named _static_ inner class |
| SIC | The class ca.sqlpower.architect.swingui.WelcomeScreen$1 could be refactored into a named _static_ inner class |
| SS | Unread field: ca.sqlpower.architect.ddl.SQLServerDDLGenerator.REGEX_CRLF; should this field be static? |
| SS | Unread field: ca.sqlpower.architect.swingui.olap.LevelEditPanel$PropertiesEditPanel.defaultPropName; should this field be static? |
| UPM | Private method ca.sqlpower.architect.swingui.IndexColumnTable.isRowEnabled(int) is never called |
| UPM | Private method ca.sqlpower.architect.swingui.IndexColumnTable.isRowInCurrentSelection(int) is never called |
| UPM | Private method ca.sqlpower.architect.swingui.table.ProfileTableModel.shouldNotBeFilteredOut(ColumnProfileResult) is never called |
| UrF | Unread field: ca.sqlpower.architect.olap.OLAPSession.schemaWatcher |
| UrF | Unread field: ca.sqlpower.architect.swingui.action.ExportDDLAction$ConflictFinderProcess.ddlg |
| UrF | Unread field: ca.sqlpower.architect.swingui.action.ExportDDLAction$ConflictFinderProcess.statements |
| UrF | Unread field: ca.sqlpower.architect.swingui.DBTree$PokeDBWorker.mostRecentlyVisited |
| UrF | Unread field: ca.sqlpower.architect.swingui.IndexColumnTable.parent |
| UrF | Unread field: ca.sqlpower.architect.swingui.olap.LevelEditPanel$PropertiesEditPanel$PropertiesTable$1.val$this$1 |
| UrF | Unread field: ca.sqlpower.architect.swingui.TablePane.usingLogicalNames |
| UrF | Unread field: ca.sqlpower.architect.swingui.WelcomeScreen.imageLabel |
| WMI | Method ca.sqlpower.architect.etl.kettle.KettleJob.doExport(List, SQLDatabase) makes inefficient use of keySet iterator instead of entrySet iterator |
| WMI | Method ca.sqlpower.architect.etl.kettle.KettleJob.doExport(List, SQLDatabase) makes inefficient use of keySet iterator instead of entrySet iterator |
| WMI | Method ca.sqlpower.architect.etl.kettle.KettleJob.outputToXML(List, JobMeta) makes inefficient use of keySet iterator instead of entrySet iterator |
| WMI | Method ca.sqlpower.architect.swingui.SwingUIProject.saveSQLObject(PrintWriter, SQLObject) makes inefficient use of keySet iterator instead of entrySet iterator |
| Code | Warning |
|---|---|
| SQL | Method ca.sqlpower.architect.ddl.ConflictResolver.dropConflict(ConflictResolver$Conflict, Statement, Set) passes a nonconstant String to an execute method on an SQL statement |
| SQL | Method ca.sqlpower.architect.olap.OLAPUtil.tableForRelationOrJoin(SQLDatabase, MondrianModel$RelationOrJoin) passes a nonconstant String to an execute method on an SQL statement |
| SQL | Method ca.sqlpower.architect.profile.RemoteDatabaseProfileCreator.execProfileFunctions(ColumnProfileResult, ProfileFunctionDescriptor, SQLColumn, Connection, Monitorable) passes a nonconstant String to an execute method on an SQL statement |
| SQL | Method ca.sqlpower.architect.profile.RemoteDatabaseProfileCreator.execProfileFunctions(ColumnProfileResult, ProfileFunctionDescriptor, SQLColumn, Connection, Monitorable) passes a nonconstant String to an execute method on an SQL statement |
| SQL | Method ca.sqlpower.architect.profile.RemoteDatabaseProfileCreator.doTableProfile(TableProfileResult) passes a nonconstant String to an execute method on an SQL statement |
| SQL | Method ca.sqlpower.architect.swingui.DataMoverPanel.moveSingleTable(SQLTable) passes a nonconstant String to an execute method on an SQL statement |
| SQL | Method ca.sqlpower.architect.swingui.SQLScriptDialog$ExecuteSQLScriptWorker.doStuff() passes a nonconstant String to an execute method on an SQL statement |
| Code | Warning |
|---|---|
| BC | Unchecked/unconfirmed cast from ca.sqlpower.architect.olap.OLAPObject to ca.sqlpower.architect.olap.MondrianModel$Cube in ca.sqlpower.architect.olap.OLAPUtil.isNameUnique(OLAPObject, Class, String) |
| BC | Unchecked/unconfirmed cast from ca.sqlpower.architect.olap.OLAPObject to ca.sqlpower.architect.olap.MondrianModel$Dimension in ca.sqlpower.architect.olap.OLAPUtil.isNameUnique(OLAPObject, Class, String) |
| BC | Unchecked/unconfirmed cast from ca.sqlpower.architect.olap.OLAPObject to ca.sqlpower.architect.olap.MondrianModel$Hierarchy in ca.sqlpower.architect.olap.OLAPUtil.isNameUnique(OLAPObject, Class, String) |
| BC | Unchecked/unconfirmed cast from ca.sqlpower.architect.olap.OLAPObject to ca.sqlpower.architect.olap.MondrianModel$VirtualCube in ca.sqlpower.architect.olap.OLAPUtil.isNameUnique(OLAPObject, Class, String) |
| BC | instanceof will always return true in ca.sqlpower.architect.swingui.action.AutoLayoutAction.actionPerformed(ActionEvent), since all ca.sqlpower.architect.swingui.ContainerPane are instances of ca.sqlpower.architect.layout.LayoutNode |
| BC | Unchecked/unconfirmed cast from ca.sqlpower.architect.swingui.PlayPenComponent to ca.sqlpower.architect.swingui.Relationship in ca.sqlpower.architect.swingui.BasicRelationshipUI.installUI(PlayPenComponent) |
| BC | Unchecked/unconfirmed cast from ca.sqlpower.architect.swingui.PlayPenComponent to ca.sqlpower.architect.swingui.Relationship in ca.sqlpower.architect.swingui.BasicRelationshipUI.uninstallUI(PlayPenComponent) |
| BC | Unchecked/unconfirmed cast from ca.sqlpower.architect.swingui.PlayPenComponent to ca.sqlpower.architect.swingui.TablePane in ca.sqlpower.architect.swingui.BasicTablePaneUI.getPreferredSize(PlayPenComponent) |
| BC | Unchecked/unconfirmed cast from ca.sqlpower.architect.swingui.PlayPenComponent to ca.sqlpower.architect.swingui.TablePane in ca.sqlpower.architect.swingui.BasicTablePaneUI.installUI(PlayPenComponent) |
| BC | Unchecked/unconfirmed cast from ca.sqlpower.architect.swingui.PlayPenComponent to ca.sqlpower.architect.swingui.TablePane in ca.sqlpower.architect.swingui.BasicTablePaneUI.paint(Graphics, PlayPenComponent) |
| BC | Unchecked/unconfirmed cast from java.awt.Graphics to java.awt.Graphics2D in ca.sqlpower.architect.swingui.BasicTablePaneUI.paint(Graphics, PlayPenComponent) |
| BC | Unchecked/unconfirmed cast from ca.sqlpower.architect.swingui.PlayPenComponent to ca.sqlpower.architect.swingui.TablePane in ca.sqlpower.architect.swingui.BasicTablePaneUI.uninstallUI(PlayPenComponent) |
| BC | Unchecked/unconfirmed cast from ca.sqlpower.architect.swingui.PlayPenComponent to ca.sqlpower.architect.swingui.olap.VirtualCubePane in ca.sqlpower.architect.swingui.olap.BasicVirtualCubePaneUI.installUI(PlayPenComponent) |
| BC | Unchecked/unconfirmed cast from ca.sqlpower.architect.swingui.PlayPenComponent to ca.sqlpower.architect.swingui.olap.VirtualCubePane in ca.sqlpower.architect.swingui.olap.BasicVirtualCubePaneUI.uninstallUI(PlayPenComponent) |
| BC | Unchecked/unconfirmed cast from ca.sqlpower.architect.swingui.PlayPenComponent to ca.sqlpower.architect.swingui.olap.OLAPPane in ca.sqlpower.architect.swingui.olap.OLAPPaneUI.installUI(PlayPenComponent) |
| BC | Unchecked/unconfirmed cast from ca.sqlpower.architect.swingui.PlayPenComponent to ca.sqlpower.architect.swingui.olap.UsageComponent in ca.sqlpower.architect.swingui.olap.UsageComponentUI.installUI(PlayPenComponent) |
| BC | Unchecked/unconfirmed cast from ca.sqlpower.architect.swingui.PlayPenComponent to ca.sqlpower.architect.swingui.olap.UsageComponent in ca.sqlpower.architect.swingui.olap.UsageComponentUI.uninstallUI(PlayPenComponent) |
| BC | Unchecked/unconfirmed cast from java.awt.Graphics to java.awt.Graphics2D in ca.sqlpower.architect.swingui.PlayPen.paintComponent(Graphics) |
| BC | instanceof will always return true in ca.sqlpower.architect.swingui.PlayPen.getSelectedItems(), since all ca.sqlpower.architect.swingui.PlayPenComponent are instances of ca.sqlpower.architect.swingui.Selectable |
| BC | instanceof will always return true in ca.sqlpower.architect.swingui.PlayPen.selectAll(), since all ca.sqlpower.architect.swingui.PlayPenComponent are instances of ca.sqlpower.architect.swingui.Selectable |
| BC | instanceof will always return true in ca.sqlpower.architect.swingui.PlayPen.selectNone(), since all ca.sqlpower.architect.swingui.PlayPenComponent are instances of ca.sqlpower.architect.swingui.Selectable |
| BC | Unchecked/unconfirmed cast from java.awt.Graphics to java.awt.Graphics2D in ca.sqlpower.architect.swingui.PrintPanel.print(Graphics, PageFormat, int) |
| BC | Unchecked/unconfirmed cast from java.awt.Graphics to java.awt.Graphics2D in ca.sqlpower.architect.swingui.PrintPanel$PrintPreviewPanel.paintComponent(Graphics) |
| BC | Unchecked/unconfirmed cast from java.awt.Container to javax.swing.JComponent in ca.sqlpower.architect.swingui.ProfileRowComponent$RowComponentLayout.layoutContainer(Container) |
| BC | Unchecked/unconfirmed cast from java.awt.Container to javax.swing.JComponent in ca.sqlpower.architect.swingui.ProfileRowComponent$RowComponentLayout.preferredLayoutSize(Container) |
| DB | Method ca.sqlpower.architect.swingui.table.ProfileTableModel.getColumnClass(int) uses the same code for two switch clauses |
| DB | Method ca.sqlpower.architect.swingui.table.ProfileTableModel.getColumnClass(int) uses the same code for two switch clauses |
| DB | Method ca.sqlpower.architect.swingui.table.ProfileTableModel.getColumnClass(int) uses the same code for two switch clauses |
| DLS | Dead store of null to sourceColumnList in ca.sqlpower.architect.diff.CompareSQL.generateColumnDiffs(SQLTable, SQLTable) |
| DLS | Dead store of null to targetColumnList in ca.sqlpower.architect.diff.CompareSQL.generateColumnDiffs(SQLTable, SQLTable) |
| DLS | Dead store of null to inputFile in ca.sqlpower.architect.etl.PLUtils.plDotIniHasChanged(String) |
| DLS | Dead store to areaFudgeFactor in ca.sqlpower.architect.layout.AbstractLayout.getNewArea(List) |
| DLS | Dead store to sample in ca.sqlpower.architect.profile.LocalReservoirProfileCreator.doProfileImpl(TableProfileResult) |
| DLS | Dead store to i in ca.sqlpower.architect.profile.TableProfileResult.formatCreateTime() |
| DLS | Dead store to ep in ca.sqlpower.architect.swingui.BasicRelationshipUI.checkClosestPointOnTable(Dimension, Point, Point, int, int, int, int, int, boolean) |
| DLS | Dead store of null to name in ca.sqlpower.architect.swingui.IndexEditPanel.getIndexName() |
| DLS | Dead store to t in new ca.sqlpower.architect.swingui.olap.HierarchyEditPanel(MondrianModel$Hierarchy) |
| DLS | Dead store of null to pm in ca.sqlpower.architect.swingui.SwingUIProject.save(ProgressMonitor) |
| DLS | Dead store to transferStyle in ca.sqlpower.architect.swingui.TablePane.drop(DropTargetDropEvent) |
| DLS | Dead store to transferStyle in ca.sqlpower.architect.swingui.TablePane.drop(DropTargetDropEvent) |
| DMI | Hard coded reference to an absolute pathname in new ca.sqlpower.architect.antbuild.AddLicenseToDMGTask() |
| DMI | Hard coded reference to an absolute pathname in new ca.sqlpower.architect.antbuild.AddLicenseToDMGTask() |
| FE | Test for floating point equality in ca.sqlpower.architect.swingui.PlayPen.setZoom(double) |
| ICAST | int division result cast to double or float in ca.sqlpower.architect.layout.FruchtermanReingoldForceLayout.nextFrame() |
| NP | Load of known null value in ca.sqlpower.architect.profile.RemoteDatabaseProfileCreator.doColumnProfile(ColumnProfileResult, MonitorableImpl) |
| NP | Load of known null value in ca.sqlpower.architect.profile.RemoteDatabaseProfileCreator.execProfileFunctions(ColumnProfileResult, ProfileFunctionDescriptor, SQLColumn, Connection, Monitorable) |
| PZLA | Should ca.sqlpower.architect.swingui.ArchitectSwingSessionContextImpl$DummyTransferable.getTransferDataFlavors() return a zero length array rather than null? |
| RCN | Redundant nullcheck of dist which is known to be null in ca.sqlpower.architect.layout.FruchtermanReingoldForceLayout.displacementBetween(LayoutNode, LayoutNode) |
| RCN | Redundant nullcheck of ?, which is known to be non-null in ca.sqlpower.architect.olap.OLAPUtil.nameFor(OLAPObject) |
| RCN | Redundant nullcheck of gddl, which is known to be non-null in ca.sqlpower.architect.profile.output.ProfileHTMLFormat.format(OutputStream, List) |
| RCN | Redundant nullcheck of result, which is known to be non-null in ca.sqlpower.architect.profile.output.ProfileHTMLFormat.format(OutputStream, List) |
| RCN | Redundant nullcheck of result, which is known to be non-null in ca.sqlpower.architect.profile.output.ProfileHTMLFormat.format(OutputStream, List) |
| RCN | Redundant nullcheck of result, which is known to be non-null in ca.sqlpower.architect.profile.output.ProfileHTMLFormat.format(OutputStream, List) |
| RCN | Redundant nullcheck of result, which is known to be non-null in ca.sqlpower.architect.profile.output.ProfileHTMLFormat.format(OutputStream, List) |
| RCN | Redundant nullcheck of leftItem, which is known to be non-null in ca.sqlpower.architect.swingui.olap.JoinEntryPanel.addSQLJoinsToModel(MondrianModel$Join) |
| RCN | Redundant nullcheck of loc, which is known to be non-null in ca.sqlpower.architect.swingui.TablePane.pasteData(Transferable) |
| REC | Exception is caught when Exception is not thrown in ca.sqlpower.architect.CoreProject$DDLGeneratorFactory.createObject(Attributes) |
| REC | Exception is caught when Exception is not thrown in ca.sqlpower.architect.ddl.DDLUtils.getDDLTypes(DataSourceCollection) |
| REC | Exception is caught when Exception is not thrown in new ca.sqlpower.architect.ddl.ObjectPropertyModificationDDLComponent(DDLWarning) |
| REC | Exception is caught when Exception is not thrown in ca.sqlpower.architect.ddl.ObjectPropertyModificationDDLComponent$1.run() |
| REC | Exception is caught when Exception is not thrown in ca.sqlpower.architect.olap.MondrianXMLReader$MondrianSAXHandler.startElement(String, String, String, Attributes) |
| REC | Exception is caught when Exception is not thrown in ca.sqlpower.architect.profile.RemoteDatabaseProfileCreator.doProfileImpl(TableProfileResult) |
| REC | Exception is caught when Exception is not thrown in ca.sqlpower.architect.swingui.action.AutoLayoutAction.actionPerformed(ActionEvent) |
| REC | Exception is caught when Exception is not thrown in ca.sqlpower.architect.swingui.action.DataMoverAction.actionPerformed(ActionEvent) |
| REC | Exception is caught when Exception is not thrown in ca.sqlpower.architect.swingui.action.ProfileAction.profileItemsFromDBTree() |
| REC | Exception is caught when Exception is not thrown in ca.sqlpower.architect.swingui.action.SaveProfileAction$1.run() |
| REC | Exception is caught when Exception is not thrown in ca.sqlpower.architect.swingui.ArchitectSwingSessionImpl$1SaverTask.run() |
| REC | Exception is caught when Exception is not thrown in ca.sqlpower.architect.swingui.CompareDMFormatter.format(List, List, SQLObject, SQLObject) |
| REC | Exception is caught when Exception is not thrown in ca.sqlpower.architect.swingui.DDLExportPanel.setUpCatalogAndSchemaFields() |
| REC | Exception is caught when Exception is not thrown in ca.sqlpower.architect.swingui.DDLGeneratorListCellRenderer.getListCellRendererComponent(JList, Object, int, boolean, boolean) |
| REC | Exception is caught when Exception is not thrown in ca.sqlpower.architect.swingui.olap.action.ImportSchemaAction.actionPerformed(ActionEvent) |
| REC | Exception is caught when Exception is not thrown in ca.sqlpower.architect.swingui.olap.OLAPPane.drop(DropTargetDropEvent) |
| REC | Exception is caught when Exception is not thrown in ca.sqlpower.architect.swingui.olap.OLAPPane.handleMouseEvent(MouseEvent) |
| REC | Exception is caught when Exception is not thrown in ca.sqlpower.architect.swingui.SQLScriptDialog$ExecuteSQLScriptWorker.doStuff() |
| REC | Exception is caught when Exception is not thrown in ca.sqlpower.architect.swingui.TablePane.drop(DropTargetDropEvent) |
| RI | Class ca.sqlpower.architect.swingui.action.CreateRelationshipAction implements same interface as superclass |
| RI | Class ca.sqlpower.architect.swingui.action.ZoomResetAction implements same interface as superclass |
| RI | Class ca.sqlpower.architect.swingui.BasicRelationshipUI implements same interface as superclass |
| RI | Class ca.sqlpower.architect.swingui.BasicTablePaneUI implements same interface as superclass |
| RI | Class ca.sqlpower.architect.swingui.olap.action.CreateUsageAction implements same interface as superclass |
| RI | Class ca.sqlpower.architect.swingui.TablePaneUI implements same interface as superclass |
| UCF | Useless control flow in ca.sqlpower.architect.swingui.olap.action.CreateDimensionAction.actionPerformed(ActionEvent) |
| UwF | AddLicenseToDMGTask.dmgFile not initialized in constructor |
| UwF | AddLicenseToDMGTask.resourceTemplateFile not initialized in constructor |
| UwF | ConflictResolver.conflicts not initialized in constructor |
| UwF | ArchitectGridLayout.nodes not initialized in constructor |
| UwF | BasicTreeAutoLayout.newLocations not initialized in constructor |
| UwF | BasicTreeAutoLayout.origLocations not initialized in constructor |
| UwF | FruchtermanReingoldForceLayout.edges not initialized in constructor |
| UwF | FruchtermanReingoldForceLayout.nodes not initialized in constructor |
| UwF | LineStraightenerLayout.edges not initialized in constructor |
| UwF | MondrianXMLReader$MondrianSAXHandler.locator not initialized in constructor |
| UwF | MondrianXMLReader$MondrianSAXHandler.text not initialized in constructor |
| UwF | OLAPUndoManager.rememberedPosition not initialized in constructor |
| UwF | AutoLayoutAction.layout not initialized in constructor |
| UwF | ExportDDLAction$ConflictResolverProcess.cr not initialized in constructor |
| UwF | ArchitectPropertiesDataSourceTypeOptionPanel.indexTableModel not initialized in constructor |
| UwF | ArchitectPropertiesDataSourceTypeOptionPanel.profileFunctionTableModel not initialized in constructor |
| UwF | BasicRelationshipUI.fm not initialized in constructor |
| UwF | BasicTablePaneUI.tablePane not initialized in constructor |
| UwF | CompareDMFrame$CloseAction.localDialog not initialized in constructor |
| UwF | CompareDMPanel$SourceOrTargetStuff$CatalogPopulator.db not initialized in constructor |
| UwF | CompareDMSettings.outputFormat not initialized in constructor |
| UwF | CompareDMSettings$SourceOrTargetSettings.datastoreType not initialized in constructor |
| UwF | LayoutAnimator.timer not initialized in constructor |
| UwF | UsageComponentUI.c not initialized in constructor |
| UwF | PreferencesEditor.tp not initialized in constructor |
| UwF | ProfileRowComponent$RowComponentLayout.connectionName not initialized in constructor |
| UwF | ProfileRowComponent$RowComponentLayout.icon not initialized in constructor |
| UwF | ProfileRowComponent$RowComponentLayout.progressBar not initialized in constructor |
| UwF | ProfileRowComponent$RowComponentLayout.reload not initialized in constructor |
| UwF | ProfileRowComponent$RowComponentLayout.tableInfo not initialized in constructor |
| UwF | ProfileRowComponent$RowComponentLayout.tableName not initialized in constructor |
| UwF | SearchReplace.allSearch not initialized in constructor |
| UwF | SearchReplace.caseInsensitive not initialized in constructor |
| UwF | SearchReplace.columnSearch not initialized in constructor |
| UwF | SearchReplace.exactMatch not initialized in constructor |
| UwF | SearchReplace.regexMatch not initialized in constructor |
| UwF | SearchReplace.relationshipSearch not initialized in constructor |
| UwF | SearchReplace.searchExpression not initialized in constructor |
| UwF | SearchReplace.substringMatch not initialized in constructor |
| UwF | SearchReplace.tableSearch not initialized in constructor |
| UwF | SwingUIProject.olapPaneSaveIdMap not initialized in constructor |
The equals(Object o) method shouldn't make any assumptions
about the type of o. It should simply return
false if o is not the same type as this.
This instanceof test will always return true. Although this is safe, make sure it isn't an indication of some misunderstanding or some other logic error.
This cast is unchecked, and not all instances of the type casted from can be cast to the type it is being cast to. Ensure that your program logic ensures that this cast will not fail.
A boxed primitive is allocated just to call toString(). It is more effective to just use the static form of toString which takes the primitive value. So,
| Replace... | With this... |
|---|---|
| new Integer(1).toString() | Integer.toString(1) |
| new Long(1).toString() | Long.toString(1) |
| new Float(1.0).toString() | Float.toString(1.0) |
| new Double(1.0).toString() | Double.toString(1.0) |
| new Byte(1).toString() | Byte.toString(1) |
| new Short(1).toString() | Short.toString(1) |
| new Boolean(true).toString() | Boolean.toString(true) |
Using new Double(double) is guaranteed to always result in a new object whereas
Double.valueOf(double) allows caching of values to be done by the compiler, class library, or JVM.
Using of cached values avoids object allocation and the code will be faster.
Unless the class must be compatible with JVMs predating Java 1.5,
use either autoboxing or the valueOf() method when creating instances of Double and Float.
Using new Integer(int) is guaranteed to always result in a new object whereas
Integer.valueOf(int) allows caching of values to be done by the compiler, class library, or JVM.
Using of cached values avoids object allocation and the code will be faster.
Values between -128 and 127 are guaranteed to have corresponding cached instances
and using valueOf is approximately 3.5 times faster than using constructor.
For values outside the constant range the performance of both styles is the same.
Unless the class must be compatible with JVMs predating Java 1.5,
use either autoboxing or the valueOf() method when creating instances of
Long, Integer, Short, Character, and Byte.
A primitive boxed value constructed and then immediately converted into a different primitive type
(e.g., new Double(d).intValue()). Just perform direct primitive coercion (e.g., (int) d).
This method uses the same code to implement two clauses of a switch statement. This could be a case of duplicate code, but it might also indicate a coding mistake.
The code stores null into a local variable, and stored value is not read. This store may have been introduced in assist the garbage collector, but as of Java SE 6.0, this is no longer needed or useful.
This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.
Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.
A String is being converted to upper or lowercase, using the platform's default encoding. This may result in improper conversions when used with international characters. Use the
| String.toUpperCase( Locale l ) |
| String.toLowerCase( Locale l ) |
versions instead.
Creating new instances of java.lang.Boolean wastes
memory, since Boolean objects are immutable and there are
only two useful values of this type. Use the Boolean.valueOf()
method (or Java 1.5 autoboxing) to create Boolean objects instead.
Using the java.lang.String(String) constructor wastes memory
because the object so constructed will be functionally indistinguishable
from the String passed as a parameter. Just use the
argument String directly.
Invoking System.exit shuts down the entire Java virtual machine. This should only been done when it is appropriate. Such calls make it hard or impossible for your code to be invoked by other code. Consider throwing a RuntimeException instead.
Calling String.toString() is just a redundant operation.
Just use the String.
This code constructs a File object using a hard coded to an absolute pathname
(e.g., new File("/home/dannyc/workspace/j2ee/src/share/com/sun/enterprise/deployment");
Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object. If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.
This class defines a compareTo(...) method but inherits its
equals() method from java.lang.Object.
Generally, the value of compareTo should return zero if and only if
equals returns true. If this is violated, weird and unpredictable
failures will occur in classes such as PriorityQueue.
In Java 5 the PriorityQueue.remove method uses the compareTo method,
while in Java 6 it uses the equals method.
From the JavaDoc for the compareTo method in the Comparable interface:
It is strongly recommended, but not strictly required that (x.compareTo(y)==0) == (x.equals(y)).
Generally speaking, any class that implements the Comparable interface and violates this condition
should clearly indicate this fact. The recommended language
is "Note: this class has a natural ordering that is inconsistent with equals."
This code compares java.lang.String objects for reference
equality using the == or != operators.
Unless both strings are either constants in a source file, or have been
interned using the String.intern() method, the same string
value may be represented by two different String objects. Consider
using the equals(Object) method instead.
This operation compares two floating point values for equality.
Because floating point calculations may involve rounding,
calculated float and double values may not be accurate.
For values that must be precise, such as monetary values,
consider using a fixed-precision type such as BigDecimal.
For values that need not be precise, consider comparing for equality
within some range, for example:
if ( Math.abs(x - y) < .0000001 ).
See the Java Language Specification, section 4.2.4.
This code casts the result of an integer division operation to double or float. Doing division on integers truncates the result to the integer value closest to zero. The fact that the result was cast to double suggests that this precision should have been retained. What was probably meant was to cast one or both of the operands to double before performing the division. Here is an example:
int x = 2; int y = 5; // Wrong: yields result 0.0 double value1 = x / y; // Right: yields result 0.4 double value2 = x / (double) y;
The fields of this class appear to be accessed inconsistently with respect to synchronization. This bug report indicates that the bug pattern detector judged that
A typical bug matching this bug pattern is forgetting to synchronize one of the methods in a class that is intended to be thread-safe.
You can select the nodes labeled "Unsynchronized access" to show the code locations where the detector believed that a field was accessed without synchronization.
Note that there are various sources of inaccuracy in this detector; for example, the detector cannot statically detect all situations in which a lock is held. Also, even when the detector is accurate in distinguishing locked vs. unlocked accesses, the code in question may still be correct.
This description refers to the "IS2" version of the pattern detector, which has more accurate ways of detecting locked vs. unlocked accesses than the older "IS" detector.
This method contains an unsynchronized lazy initialization of a static field. After the field is set, the object stored into that location is further accessed. The setting of the field is visible to other threads as soon as it is set. If the futher accesses in the method that set the field serve to initialize the object, then you have a very serious multithreading bug, unless something else prevents any other thread from accessing the stored object until it is fully initialized.
This class defines a field with the same name as a visible instance field in a superclass. This is confusing, and may indicate an error if methods update or access one of the fields when they wanted the other.
This method defines a local variable with the same name as a field in this class or a superclass. This may cause the method to read an uninitialized value from the field, leave the field uninitialized, or both.
Class names should be nouns, in mixed case with the first letter of each internal word capitalized. Try to keep your class names simple and descriptive. Use whole words-avoid acronyms and abbreviations (unless the abbreviation is much more widely used than the long form, such as URL or HTML).
The referenced methods have names that differ only by capitalization.
Methods should be verbs, in mixed case with the first letter lowercase, with the first letter of each internal word capitalized.
The variable referenced at this point is known to be null due to an earlier check against null. Although this is valid, it might be a mistake (perhaps you intended to refer to a different variable, or perhaps the earlier check to see if the variable is null should have been a check to see if it was nonnull.
There is a branch of statement that, if executed, guarantees that
a null value will be dereferenced, which
would generate a NullPointerException when the code is executed.
Of course, the problem might be that the branch or statement is infeasible and that
the null pointer exception can't ever be executed; deciding that is beyond the ability of FindBugs.
The method creates a database resource (such as a database connection or row set), does not assign it to any fields, pass it to other methods, or return it, and does not appear to close the object on all exception paths out of the method. Failure to close database resources on all paths out of a method may result in poor performance, and could cause the application to have problems communicating with the database.
The method creates an IO stream object, does not assign it to any
fields, pass it to other methods, or return it, and does not appear to close
it on all possible exception paths out of the method.
This may result in a file descriptor leak. It is generally a good
idea to use a finally block to ensure that streams are
closed.
It is often a better design to return a length zero array rather than a null reference to indicate that there are no results (i.e., an empty list of results). This way, no explicit check for null is needed by clients of the method.
On the other hand, using null to indicate
"there is no answer to this question", then it is probably appropriate.
For example, File.listFiles() returns an empty list
if given a directory containing no files, and returns null if the file
is not a directory.
A value is checked here to see whether it is null, but this value can't be null because it was previously dereferenced and if it were null a null pointer exception would have occurred at the earlier dereference. Essentially, this code and the previous dereference disagree as to whether this value is allowed to be null. Either the check is redundant or the previous dereference is erroneous.
This method contains a redundant check of a known non-null value against the constant null.
This method contains a redundant check of a known null value against the constant null.
This method uses a try-catch block that catches Exception objects, but Exception is not thrown within the try block, and RuntimeException is not explicitly caught. It is a common bug pattern to say try { ... } catch (Exception e) { something } as a shorthand for catching a number of types of exception each of whose catch blocks is identical, but this construct also accidentally catches RuntimeException as well, masking potential bugs.
This class declares that it implements an interface that is also implemented by a superclass. This is redundant, once a superclass implements an interface, all subclasses by default also implement this interface. It may point out that the inheritance hierarchy has changed since this class was created, and consideration should be taken into account for the ownership of the interface's implementation.
This method returns a value that is not checked. The return value should be checked
since it can indication an unusual or unexpected function execution. For
example, the File.delete() method returns false
if the file could not be successfully deleted (rather than
throwing an Exception).
If you don't check the result, you won't notice if the method invocation
signals unexpected behavior by returning an atypical return value.
This class implements the Comparator interface. You
should consider whether or not it should also implement the Serializable
interface. If a comparator is used to construct an ordered collection
such as a TreeMap, then the TreeMap
will be serializable only if the comparator is also serializable.
As most comparators have little or no state, making them serializable
is generally easy and good defensive programming.
A non-serializable value is stored into a non-transient field of a serializable class.
This Serializable class defines a non-primitive instance field which is neither transient,
Serializable, or java.lang.Object, and does not appear to implement
the Externalizable interface or the
readObject() and writeObject() methods.
Objects of this class will not be deserialized correctly if a non-Serializable
object is stored in this field.
This Serializable class is an inner class. Any attempt to serialize it will also serialize the associated outer instance. The outer instance is serializable, so this won't fail, but it might serialize a lot more data than intended. If possible, making the inner class a static inner class (also known as a nested class) should solve the problem.
This class is an inner class, but does not use its embedded reference to the object which created it. This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary. If possible, the class should be made into a static inner class. Since anonymous inner classes cannot be marked as static, doing this will requiring refactoring the inner class so that it is a named inner class.
This class is an inner class, but does not use its embedded reference to the object which created it except during construction of the inner object. This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary. If possible, the class should be made into a static inner class. Since the reference to the outer object is required during construction of the inner instance, the inner class will need to be refactored so as to pass a reference to the outer instance to the constructor for the inner class.
This class is an inner class, but does not use its embedded reference to the object which created it. This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary. If possible, the class should be made static.
Type check performed using the instanceof operator where it can be statically determined whether the object is of the type requested.
This class implements the Serializable interface, but does
not define a serialVersionUID field.
A change as simple as adding a reference to a .class object
will add synthetic fields to the class,
which will unfortunately change the implicit
serialVersionUID (e.g., adding a reference to String.class
will generate a static field class$java$lang$String).
Also, different source code to bytecode compilers may use different
naming conventions for synthetic variables generated for
references to class objects or inner classes.
To ensure interoperability of Serializable across versions,
consider adding an explicit serialVersionUID.
The method invokes the execute method on an SQL statement with a String that seems to be dynamically generated. Consider using a prepared statement instead. It is more efficient and less vulnerable to SQL injection attacks.
This class contains an instance final field that is initialized to a compile-time static value. Consider making the field static.
This method contains a useless control flow statement, where
control flow continues onto the same place regardless of whether or not
the branch is taken. For example,
this is caused by having an empty statement
block fot an if statement:
if (argv.length == 0) {
// TODO: handle this case
}
Calling this.getClass().getResource(...) could give
results other than expected if this class is extended by a class in
another package.
This private method is never called. Although it is possible that the method will be invoked through reflection, it is more likely that the method is never used, and should be removed.
This field is never read. Consider removing it from the class.
This field is never initialized within any constructor, and is therefore could be null after the object is constructed. This could be a either an error or a questionable design, since it means a null pointer exception will be generated if that field is dereferenced before being initialized.
This field is never written. All reads of it will return the default value. Check for errors (should it have been initialized?), or remove it if it is useless.
This method accesses the value of a Map entry, using a key that was retrieved from a keySet iterator. It is more efficient to use an iterator on the entrySet of the map, to avoid the Map.get(key) lookup.