Hi, Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan.
67 new defect(s) introduced to LibreOffice found with Coverity Scan. 20 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 20 of 67 defect(s) ** CID 1327216: FindBugs: Performance (FB.WMI_WRONG_MAP_ITERATOR) /qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java: 369 in complex.unoapi.CheckModuleAPI.getTranslatedNames(java.lang.String)() ________________________________________________________________________________________________________ *** CID 1327216: FindBugs: Performance (FB.WMI_WRONG_MAP_ITERATOR) /qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java: 369 in complex.unoapi.CheckModuleAPI.getTranslatedNames(java.lang.String)() 363 final Set<String> keys = aModuleHashMap.keySet(); 364 final Iterator<String> iterator = keys.iterator(); 365 while (iterator.hasNext()) 366 { 367 368 final String key = iterator.next(); >>> CID 1327216: FindBugs: Performance (FB.WMI_WRONG_MAP_ITERATOR) >>> complex.unoapi.CheckModuleAPI.getTranslatedNames(String) makes >>> inefficient use of keySet iterator instead of entrySet iterator. 369 final String value = aModuleHashMap.get(key); 370 371 module = module.replaceAll(key, value); 372 373 final int count = module.split(value).length; 374 if (count > 2) ** CID 1327215: FindBugs: Dodgy code (FB.UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD) /ridljar/com/sun/star/uno/Union.java: 32 in () ________________________________________________________________________________________________________ *** CID 1327215: FindBugs: Dodgy code (FB.UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD) /ridljar/com/sun/star/uno/Union.java: 32 in () 26 /** 27 * Get the value in the union. 28 * <p>The representation of the value is an any.</p> 29 * @return the any value. 30 */ 31 public final Object getValue() { >>> CID 1327215: FindBugs: Dodgy code >>> (FB.UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD) >>> Unwritten public or protected field: com.sun.star.uno.Union.m_value. 32 return m_value; 33 } 34 35 protected Object m_value; ** CID 1327212: (FB.UWF_UNWRITTEN_FIELD) /wizards/com/sun/star/wizards/ui/PeerConfig.java: 109 in () /wizards/com/sun/star/wizards/ui/PeerConfig.java: 109 in () /wizards/com/sun/star/wizards/ui/PeerConfig.java: 109 in () ________________________________________________________________________________________________________ *** CID 1327212: (FB.UWF_UNWRITTEN_FIELD) /wizards/com/sun/star/wizards/ui/PeerConfig.java: 109 in () 103 xVclWindowPeer.setProperty(aPeerTask.propnames[n], aPeerTask.propvalues[n]); 104 } 105 } 106 for (int i = 0; i < this.aControlTasks.size(); i++) 107 { 108 ControlTask aControlTask = aControlTasks.get(i); >>> CID 1327212: (FB.UWF_UNWRITTEN_FIELD) >>> Unwritten field: com.sun.star.wizards.ui.PeerConfig$ControlTask.oModel. 109 Helper.setUnoPropertyValue(aControlTask.oModel, aControlTask.propname, aControlTask.propvalue); 110 } 111 for (int i = 0; i < this.aImageUrlTasks.size(); i++) 112 { 113 ImageUrlTask aImageUrlTask = aImageUrlTasks.get(i); 114 String sImageUrl = PropertyNames.EMPTY_STRING; /wizards/com/sun/star/wizards/ui/PeerConfig.java: 109 in () 103 xVclWindowPeer.setProperty(aPeerTask.propnames[n], aPeerTask.propvalues[n]); 104 } 105 } 106 for (int i = 0; i < this.aControlTasks.size(); i++) 107 { 108 ControlTask aControlTask = aControlTasks.get(i); >>> CID 1327212: (FB.UWF_UNWRITTEN_FIELD) >>> Unwritten field: >>> com.sun.star.wizards.ui.PeerConfig$ControlTask.propname. 109 Helper.setUnoPropertyValue(aControlTask.oModel, aControlTask.propname, aControlTask.propvalue); 110 } 111 for (int i = 0; i < this.aImageUrlTasks.size(); i++) 112 { 113 ImageUrlTask aImageUrlTask = aImageUrlTasks.get(i); 114 String sImageUrl = PropertyNames.EMPTY_STRING; /wizards/com/sun/star/wizards/ui/PeerConfig.java: 109 in () 103 xVclWindowPeer.setProperty(aPeerTask.propnames[n], aPeerTask.propvalues[n]); 104 } 105 } 106 for (int i = 0; i < this.aControlTasks.size(); i++) 107 { 108 ControlTask aControlTask = aControlTasks.get(i); >>> CID 1327212: (FB.UWF_UNWRITTEN_FIELD) >>> Unwritten field: >>> com.sun.star.wizards.ui.PeerConfig$ControlTask.propvalue. 109 Helper.setUnoPropertyValue(aControlTask.oModel, aControlTask.propname, aControlTask.propvalue); 110 } 111 for (int i = 0; i < this.aImageUrlTasks.size(); i++) 112 { 113 ImageUrlTask aImageUrlTask = aImageUrlTasks.get(i); 114 String sImageUrl = PropertyNames.EMPTY_STRING; ** CID 1327211: FindBugs: Correctness (FB.UWF_UNWRITTEN_FIELD) /wizards/com/sun/star/wizards/report/ReportWizard.java: 53 in () ________________________________________________________________________________________________________ *** CID 1327211: FindBugs: Correctness (FB.UWF_UNWRITTEN_FIELD) /wizards/com/sun/star/wizards/report/ReportWizard.java: 53 in () 47 import com.sun.star.wizards.ui.UIConsts; 48 import com.sun.star.wizards.ui.UnoDialog; 49 50 import java.lang.reflect.Method; 51 import java.util.Map; 52 >>> CID 1327211: FindBugs: Correctness (FB.UWF_UNWRITTEN_FIELD) >>> Unwritten field: >>> com.sun.star.wizards.report.ReportWizard.CurGroupFieldSelection. 53 public class ReportWizard extends DatabaseObjectWizard implements XTextListener 54 { 55 56 private FieldSelection CurGroupFieldSelection; 57 private SortingComponent CurSortingComponent; 58 private TitlesComponent CurTitlesComponent; ** CID 1327210: (FB.UWF_UNWRITTEN_FIELD) /reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeReport.java: 87 in () /reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeReport.java: 92 in () ________________________________________________________________________________________________________ *** CID 1327210: (FB.UWF_UNWRITTEN_FIELD) /reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeReport.java: 87 in () 81 { 82 this.pageFooter = pageFooter; 83 } 84 85 public Node getColumnHeader() 86 { >>> CID 1327210: (FB.UWF_UNWRITTEN_FIELD) >>> Unwritten field: >>> org.libreoffice.report.pentaho.model.OfficeReport.columnHeader. 87 return columnHeader; 88 } 89 90 public Node getColumnFooter() 91 { 92 return columnFooter; /reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeReport.java: 92 in () 86 { 87 return columnHeader; 88 } 89 90 public Node getColumnFooter() 91 { >>> CID 1327210: (FB.UWF_UNWRITTEN_FIELD) >>> Unwritten field: >>> org.libreoffice.report.pentaho.model.OfficeReport.columnFooter. 92 return columnFooter; 93 } 94 95 public Node getReportHeader() 96 { 97 return reportHeader; ** CID 1327209: FindBugs: Correctness (FB.UWF_UNWRITTEN_FIELD) /qadevOOo/tests/java/mod/_toolkit/MutableTreeNode.java: 60 in () ________________________________________________________________________________________________________ *** CID 1327209: FindBugs: Correctness (FB.UWF_UNWRITTEN_FIELD) /qadevOOo/tests/java/mod/_toolkit/MutableTreeNode.java: 60 in () 54 * Disposes StarOffice Writer document. 55 */ 56 @Override 57 protected void cleanup(TestParameters tParam, PrintWriter log) { 58 log.println(" disposing xTextDoc "); 59 >>> CID 1327209: FindBugs: Correctness (FB.UWF_UNWRITTEN_FIELD) >>> Unwritten field: mod._toolkit.MutableTreeNode.xTextDoc. 60 util.DesktopTools.closeDoc(xTextDoc); 61 } 62 63 @Override 64 protected TestEnvironment createTestEnvironment(TestParameters Param, 65 PrintWriter log) throws Exception { ** CID 1327208: FindBugs: Correctness (FB.UWF_UNWRITTEN_FIELD) /qadevOOo/tests/java/mod/_fwk/ObjectMenuController.java: 48 in () ________________________________________________________________________________________________________ *** CID 1327208: FindBugs: Correctness (FB.UWF_UNWRITTEN_FIELD) /qadevOOo/tests/java/mod/_fwk/ObjectMenuController.java: 48 in () 42 */ 43 @Override 44 protected void cleanup(TestParameters tParam, PrintWriter log) { 45 log.println(" disposing xTextDoc "); 46 47 try { >>> CID 1327208: FindBugs: Correctness (FB.UWF_UNWRITTEN_FIELD) >>> Unwritten field: mod._fwk.ObjectMenuController.xTextDoc. 48 XCloseable closer = UnoRuntime.queryInterface( 49 XCloseable.class, xTextDoc); 50 closer.close(true); 51 } catch (com.sun.star.util.CloseVetoException e) { 52 log.println("couldn't close document"); 53 } catch (com.sun.star.lang.DisposedException e) { ** CID 1327207: FindBugs: Correctness (FB.UWF_UNWRITTEN_FIELD) /qadevOOo/runner/util/DBTools.java: 159 in () ________________________________________________________________________________________________________ *** CID 1327207: FindBugs: Correctness (FB.UWF_UNWRITTEN_FIELD) /qadevOOo/runner/util/DBTools.java: 159 in () 153 if (Name != null) props.setPropertyValue("Name", Name) ; 154 if (URL != null) props.setPropertyValue("URL", URL) ; 155 if (Info != null) props.setPropertyValue("Info", Info) ; 156 if (User != null) props.setPropertyValue("User", User) ; 157 if (Password != null) props.setPropertyValue("Password", Password) ; 158 if (IsPasswordRequired != null) props.setPropertyValue("IsPasswordRequired", IsPasswordRequired) ; >>> CID 1327207: FindBugs: Correctness (FB.UWF_UNWRITTEN_FIELD) >>> Unwritten field: util.DBTools$DataSourceInfo.SuppressVersionColumns. 159 if (SuppressVersionColumns != null) props.setPropertyValue("SuppressVersionColumns", SuppressVersionColumns) ; 160 if (IsReadOnly != null) props.setPropertyValue("IsReadOnly", IsReadOnly) ; 161 if (TableFilter != null) props.setPropertyValue("TableFilter", TableFilter) ; 162 if (TableTypeFilter != null) props.setPropertyValue("TableTypeFilter", TableTypeFilter) ; 163 164 return src ; ** CID 1327206: FindBugs: Correctness (FB.UWF_NULL_FIELD) /qadevOOo/tests/java/ifc/sheet/_XScenario.java: 30 in () ________________________________________________________________________________________________________ *** CID 1327206: FindBugs: Correctness (FB.UWF_NULL_FIELD) /qadevOOo/tests/java/ifc/sheet/_XScenario.java: 30 in () 24 25 /** 26 * 27 */ 28 public class _XScenario extends MultiMethodTest { 29 public XScenario oObj = null; >>> CID 1327206: FindBugs: Correctness (FB.UWF_NULL_FIELD) >>> Field only ever set to null: ifc.sheet._XScenario.address. 30 CellRangeAddress address = null; 31 String comment = null; 32 boolean skipTest = false; 33 34 @Override 35 public void before() { ** CID 1327205: FindBugs: Correctness (FB.UWF_NULL_FIELD) /qadevOOo/tests/java/ifc/drawing/_GraphicObjectShape.java: 84 in () ________________________________________________________________________________________________________ *** CID 1327205: FindBugs: Correctness (FB.UWF_NULL_FIELD) /qadevOOo/tests/java/ifc/drawing/_GraphicObjectShape.java: 84 in () 78 XBitmap aBitmap2=(XBitmap) tEnv.getObjRelation("Bitmap2"); 79 if (oldValue.equals(aBitmap1)) return aBitmap2; 80 else return aBitmap1; 81 } 82 } ; 83 >>> CID 1327205: FindBugs: Correctness (FB.UWF_NULL_FIELD) >>> Field only ever set to null: ifc.drawing._GraphicObjectShape.set. 84 public Any set = null; 85 86 /** 87 * Property tester which returns new <code>XIndexAccess</code> object. 88 */ 89 protected PropertyTester ImapTester = new PropertyTester() { ** CID 1327204: FindBugs: Correctness (FB.UWF_NULL_FIELD) /qadevOOo/runner/util/db/DataSourceDescriptor.java: 31 in () ________________________________________________________________________________________________________ *** CID 1327204: FindBugs: Correctness (FB.UWF_NULL_FIELD) /qadevOOo/runner/util/db/DataSourceDescriptor.java: 31 in () 25 */ 26 public class DataSourceDescriptor 27 { 28 /** 29 * Representation of <code>'Name'</code> property. 30 */ >>> CID 1327204: FindBugs: Correctness (FB.UWF_NULL_FIELD) >>> Field only ever set to null: util.db.DataSourceDescriptor.Name. 31 public String Name = null ; 32 /** 33 * Representation of <code>'URL'</code> property. 34 */ 35 public String URL = null ; 36 /** ** CID 1327203: FindBugs: Correctness (FB.UWF_NULL_FIELD) /qadevOOo/runner/util/XMLTools.java: 47 in () ________________________________________________________________________________________________________ *** CID 1327203: FindBugs: Correctness (FB.UWF_NULL_FIELD) /qadevOOo/runner/util/XMLTools.java: 47 in () 41 public String Name ; 42 public String Type ; 43 public String Value ; 44 } 45 private final HashMap<String, Attribute> attrByName = new HashMap<String, Attribute>() ; 46 private final ArrayList<Attribute> attributes = new ArrayList<Attribute>() ; >>> CID 1327203: FindBugs: Correctness (FB.UWF_NULL_FIELD) >>> Field only ever set to null: util.XMLTools$AttributeList.log. 47 private PrintWriter log = null ; 48 49 /** 50 * Creates a class instance. 51 */ 52 public AttributeList() {} ** CID 1327202: FindBugs: Correctness (FB.UWF_NULL_FIELD) /qadevOOo/runner/util/TextSectionDsc.java: 32 in () ________________________________________________________________________________________________________ *** CID 1327202: FindBugs: Correctness (FB.UWF_NULL_FIELD) /qadevOOo/runner/util/TextSectionDsc.java: 32 in () 26 * the class TextSectionDsc 27 */ 28 public class TextSectionDsc extends InstDescr { 29 30 private static final String service = "com.sun.star.text.TextSection"; 31 private static final String ifcName = "com.sun.star.text.XTextContent"; >>> CID 1327202: FindBugs: Correctness (FB.UWF_NULL_FIELD) >>> Field only ever set to null: util.TextSectionDsc.name. 32 private String name = null; 33 34 35 public TextSectionDsc() { 36 initTextSection(); 37 } ** CID 1327201: FindBugs: Correctness (FB.UWF_NULL_FIELD) /qadevOOo/runner/util/TableDsc.java: 32 in () ________________________________________________________________________________________________________ *** CID 1327201: FindBugs: Correctness (FB.UWF_NULL_FIELD) /qadevOOo/runner/util/TableDsc.java: 32 in () 26 * the class TableDsc 27 */ 28 public class TableDsc extends InstDescr { 29 30 private int rows = 0; 31 private int columns = 0; >>> CID 1327201: FindBugs: Correctness (FB.UWF_NULL_FIELD) >>> Field only ever set to null: util.TableDsc.name. 32 private String name = null; 33 private static final String ifcName = "com.sun.star.text.XTextTable"; 34 private static final String service = "com.sun.star.text.TextTable"; 35 36 public TableDsc() { 37 initTable(); ** CID 1327200: FindBugs: Correctness (FB.UWF_NULL_FIELD) /qadevOOo/runner/util/ParagraphDsc.java: 33 in () ________________________________________________________________________________________________________ *** CID 1327200: FindBugs: Correctness (FB.UWF_NULL_FIELD) /qadevOOo/runner/util/ParagraphDsc.java: 33 in () 27 * the class ParagraphDsc 28 */ 29 public class ParagraphDsc extends InstDescr { 30 31 private static final String service = "com.sun.star.text.Paragraph"; 32 private static final String ifcName = "com.sun.star.text.XTextContent"; >>> CID 1327200: FindBugs: Correctness (FB.UWF_NULL_FIELD) >>> Field only ever set to null: util.ParagraphDsc.name. 33 private String name = null; 34 35 36 public ParagraphDsc() { 37 initParagraph(); 38 } ** CID 1327199: FindBugs: Correctness (FB.UWF_NULL_FIELD) /qadevOOo/runner/util/FrameDsc.java: 35 in () ________________________________________________________________________________________________________ *** CID 1327199: FindBugs: Correctness (FB.UWF_NULL_FIELD) /qadevOOo/runner/util/FrameDsc.java: 35 in () 29 * the class FrameDsc 30 */ 31 public class FrameDsc extends InstDescr { 32 33 private int height = 2000; 34 private int width = 2000; >>> CID 1327199: FindBugs: Correctness (FB.UWF_NULL_FIELD) >>> Field only ever set to null: util.FrameDsc.name. 35 private String name = null; 36 private static final String ifcName = "com.sun.star.text.XTextFrame"; 37 private static final String service = "com.sun.star.text.TextFrame"; 38 39 public FrameDsc() { 40 initFrame(); ** CID 1327198: FindBugs: Correctness (FB.UWF_NULL_FIELD) /qadevOOo/runner/util/FootnoteDsc.java: 32 in () ________________________________________________________________________________________________________ *** CID 1327198: FindBugs: Correctness (FB.UWF_NULL_FIELD) /qadevOOo/runner/util/FootnoteDsc.java: 32 in () 26 * describes a Footnote to be inserted in a container 27 */ 28 public class FootnoteDsc extends InstDescr { 29 30 private static final String service = "com.sun.star.text.Footnote"; 31 private static final String ifcName = "com.sun.star.text.XTextContent"; >>> CID 1327198: FindBugs: Correctness (FB.UWF_NULL_FIELD) >>> Field only ever set to null: util.FootnoteDsc.name. 32 private String name = null; 33 34 35 public FootnoteDsc() { 36 initFootnote(); 37 } ** CID 1327197: (FB.UWF_NULL_FIELD) /qadevOOo/runner/util/DBTools.java: 123 in () /qadevOOo/runner/util/DBTools.java: 127 in () /qadevOOo/runner/util/DBTools.java: 131 in () ________________________________________________________________________________________________________ *** CID 1327197: (FB.UWF_NULL_FIELD) /qadevOOo/runner/util/DBTools.java: 123 in () 117 * Representation of <code>'SuppressVersionColumns'</code> property. 118 */ 119 private Boolean SuppressVersionColumns; 120 /** 121 * Representation of <code>'IsReadOnly'</code> property. 122 */ >>> CID 1327197: (FB.UWF_NULL_FIELD) >>> Field only ever set to null: util.DBTools$DataSourceInfo.IsReadOnly. 123 private Boolean IsReadOnly = null ; 124 /** 125 * Representation of <code>'TableFilter'</code> property. 126 */ 127 private String[] TableFilter = null ; 128 /** /qadevOOo/runner/util/DBTools.java: 127 in () 121 * Representation of <code>'IsReadOnly'</code> property. 122 */ 123 private Boolean IsReadOnly = null ; 124 /** 125 * Representation of <code>'TableFilter'</code> property. 126 */ >>> CID 1327197: (FB.UWF_NULL_FIELD) >>> Field only ever set to null: util.DBTools$DataSourceInfo.TableFilter. 127 private String[] TableFilter = null ; 128 /** 129 * Representation of <code>'TableTypeFilter'</code> property. 130 */ 131 private String[] TableTypeFilter = null ; 132 /qadevOOo/runner/util/DBTools.java: 131 in () 125 * Representation of <code>'TableFilter'</code> property. 126 */ 127 private String[] TableFilter = null ; 128 /** 129 * Representation of <code>'TableTypeFilter'</code> property. 130 */ >>> CID 1327197: (FB.UWF_NULL_FIELD) >>> Field only ever set to null: >>> util.DBTools$DataSourceInfo.TableTypeFilter. 131 private String[] TableTypeFilter = null ; 132 133 /** 134 * Creates an empty instance. 135 */ 136 public DataSourceInfo() ** CID 1327196: FindBugs: Correctness (FB.UWF_NULL_FIELD) /qadevOOo/runner/util/BookmarkDsc.java: 32 in () ________________________________________________________________________________________________________ *** CID 1327196: FindBugs: Correctness (FB.UWF_NULL_FIELD) /qadevOOo/runner/util/BookmarkDsc.java: 32 in () 26 * describes a Bookmark to be inserted in a container 27 */ 28 public class BookmarkDsc extends InstDescr { 29 30 private static final String service = "com.sun.star.text.Bookmark"; 31 private static final String ifcName = "com.sun.star.text.XTextContent"; >>> CID 1327196: FindBugs: Correctness (FB.UWF_NULL_FIELD) >>> Field only ever set to null: util.BookmarkDsc.name. 32 private String name = null; 33 34 35 public BookmarkDsc() { 36 initBookmark(); 37 } ** CID 1327194: FindBugs: Dodgy code (FB.UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD) /qadevOOo/tests/java/ifc/sheet/_XDataPilotTable2.java: 55 in () ________________________________________________________________________________________________________ *** CID 1327194: FindBugs: Dodgy code (FB.UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD) /qadevOOo/tests/java/ifc/sheet/_XDataPilotTable2.java: 55 in () 49 * </ul> 50 * 51 * @see com.sun.star.sheet.XDataPilotTable2 52 * @see com.sun.star.table.CellAddress 53 * 54 */ >>> CID 1327194: FindBugs: Dodgy code >>> (FB.UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD) >>> Unused public or protected field: ifc.sheet._XDataPilotTable2.oObj. 55 public class _XDataPilotTable2 extends MultiMethodTest 56 { 57 private XSpreadsheetDocument xSheetDoc = null; 58 private XDataPilotTable2 xDPTab2 = null; 59 private CellRangeAddress mRangeWhole = null; 60 private CellRangeAddress mRangeTable = null; ________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/libreoffice?tab=overview To manage Coverity Scan email notifications for "libreoffice@lists.freedesktop.org", click https://scan.coverity.com/subscriptions/edit?email=libreoffice%40lists.freedesktop.org&token=d6481d718a775246b2340f282ebe5939 _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice