[Libreoffice-commits] core.git: 8 commits - qadevOOo/runner qadevOOo/tests

Caolán McNamara caolanm at redhat.com
Thu Oct 15 08:35:24 PDT 2015


 qadevOOo/runner/util/FootnoteDsc.java                    |    6 +--
 qadevOOo/runner/util/FrameDsc.java                       |    3 -
 qadevOOo/runner/util/ParagraphDsc.java                   |    6 +--
 qadevOOo/runner/util/TableDsc.java                       |    3 -
 qadevOOo/runner/util/TextSectionDsc.java                 |    6 +--
 qadevOOo/runner/util/XMLTools.java                       |   20 ----------
 qadevOOo/tests/java/ifc/beans/_XExactName.java           |   28 ++++++---------
 qadevOOo/tests/java/ifc/drawing/_GraphicObjectShape.java |    4 --
 8 files changed, 23 insertions(+), 53 deletions(-)

New commits:
commit ed6c042d20cbe8245b5e830b714f0bf75e478adf
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 15 15:56:35 2015 +0100

    coverity#1327205 UwF: Unwritten field
    
    Change-Id: I6a9b2471e488b988f70415188ddaed8ea21ab77b

diff --git a/qadevOOo/tests/java/ifc/drawing/_GraphicObjectShape.java b/qadevOOo/tests/java/ifc/drawing/_GraphicObjectShape.java
index 3d49bcb..400f6c9 100644
--- a/qadevOOo/tests/java/ifc/drawing/_GraphicObjectShape.java
+++ b/qadevOOo/tests/java/ifc/drawing/_GraphicObjectShape.java
@@ -81,15 +81,13 @@ public class _GraphicObjectShape extends MultiPropertyTest {
         }
     } ;
 
-    public Any set = null;
-
     /**
      * Property tester which returns new <code>XIndexAccess</code> object.
      */
     protected PropertyTester ImapTester = new PropertyTester() {
         @Override
         protected Object getNewValue(String propName, Object oldValue) {
-            return set;
+            return null;
         }
     } ;
 
commit 9d2a3acf40697776453e27c00a07db6d81f1e28f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 15 15:53:32 2015 +0100

    coverity#1327203 UwF: Unwritten field
    
    Change-Id: I120b6cd6908ab4263a3ec3f8318aff8e507ab62b

diff --git a/qadevOOo/runner/util/XMLTools.java b/qadevOOo/runner/util/XMLTools.java
index 768236a..5feda48 100644
--- a/qadevOOo/runner/util/XMLTools.java
+++ b/qadevOOo/runner/util/XMLTools.java
@@ -44,7 +44,6 @@ public class XMLTools {
         }
         private final HashMap<String, Attribute> attrByName = new HashMap<String, Attribute>() ;
         private final ArrayList<Attribute> attributes = new ArrayList<Attribute>() ;
-        private PrintWriter log = null ;
 
         /**
          * Creates a class instance.
@@ -83,47 +82,30 @@ public class XMLTools {
         ****************************************/
 
         public short getLength() {
-            if (log != null)
-                log.println("getLength() called -> " + attributes.size()) ;
             return (short) attributes.size() ;
         }
 
         public String getNameByIndex(short idx) {
             String name = attributes.get(idx).Name ;
-            if (log != null)
-                log.println("getNameByIndex(" + idx + ") called -> '" +
-                name + "'") ;
             return name ;
         }
 
         public String getTypeByIndex(short idx) {
             String type = attributes.get(idx).Type  ;
-            if (log != null)
-                log.println("getTypeByIndex(" + idx + ") called -> '" +
-                    type + "'") ;
             return type;
         }
 
         public String getTypeByName(String name) {
             String type = attrByName.get(name).Type ;
-            if (log != null)
-                log.println("getTypeByName('" + name + "') called -> '" +
-                    type + "'") ;
             return type;
         }
         public String getValueByIndex(short idx) {
             String value = attributes.get(idx).Value ;
-            if (log != null)
-                log.println("getValueByIndex(" + idx + ") called -> '" +
-                    value + "'") ;
-            return  value;
+            return value;
         }
 
         public String getValueByName(String name) {
             String value = attrByName.get(name).Value ;
-            if (log != null)
-                log.println("getValueByName('" + name + "') called -> '" +
-                    value + "'") ;
             return value;
         }
     }
commit 5d9995131d78e169697aabbdcb09c446900aff89
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 15 15:52:21 2015 +0100

    coverity#1327202 UwF: Unwritten field
    
    Change-Id: Ifa0ffa779aa3dd79f4b41065e33f5cdbf3a89bc9

diff --git a/qadevOOo/runner/util/TextSectionDsc.java b/qadevOOo/runner/util/TextSectionDsc.java
index 5478b4c..3a6cce5 100644
--- a/qadevOOo/runner/util/TextSectionDsc.java
+++ b/qadevOOo/runner/util/TextSectionDsc.java
@@ -29,8 +29,6 @@ public class TextSectionDsc extends InstDescr {
 
     private static final String service = "com.sun.star.text.TextSection";
     private static final String ifcName = "com.sun.star.text.XTextContent";
-    private String name = null;
-
 
     public TextSectionDsc() {
         initTextSection();
@@ -38,7 +36,7 @@ public class TextSectionDsc extends InstDescr {
 
     @Override
     public String getName() {
-        return name;
+        return null;
     }
 
     @Override
@@ -71,4 +69,4 @@ public class TextSectionDsc extends InstDescr {
                                                                 ServiceObj );
         return PG;
     }
-}
\ No newline at end of file
+}
commit 2dea6b9e966a6a39519729edc262a85f6e9623a9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 15 15:51:53 2015 +0100

    coverity#1327201 UwF: Unwritten field
    
    Change-Id: Ia8d7ab83caa55920428448e67f95a340add658e7

diff --git a/qadevOOo/runner/util/TableDsc.java b/qadevOOo/runner/util/TableDsc.java
index 09dd50d..3fef4eb 100644
--- a/qadevOOo/runner/util/TableDsc.java
+++ b/qadevOOo/runner/util/TableDsc.java
@@ -29,7 +29,6 @@ public class TableDsc extends InstDescr {
 
     private int rows = 0;
     private int columns = 0;
-    private String name = null;
     private static final String ifcName = "com.sun.star.text.XTextTable";
     private static final String service = "com.sun.star.text.TextTable";
 
@@ -45,7 +44,7 @@ public class TableDsc extends InstDescr {
 
     @Override
     public String getName() {
-        return name;
+        return null;
     }
     @Override
     public String getIfcName() {
commit 3cce71478d1fec570edfa34aba65a08b01a1e3ad
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 15 15:51:27 2015 +0100

    coverity#1327200 UwF: Unwritten field
    
    Change-Id: I7e78b77642e70a13dcfa71e71f541bed31a4f47a

diff --git a/qadevOOo/runner/util/ParagraphDsc.java b/qadevOOo/runner/util/ParagraphDsc.java
index e4c73a6..12ec3bf 100644
--- a/qadevOOo/runner/util/ParagraphDsc.java
+++ b/qadevOOo/runner/util/ParagraphDsc.java
@@ -30,8 +30,6 @@ public class ParagraphDsc extends InstDescr {
 
     private static final String service = "com.sun.star.text.Paragraph";
     private static final String ifcName = "com.sun.star.text.XTextContent";
-    private String name = null;
-
 
     public ParagraphDsc() {
         initParagraph();
@@ -39,7 +37,7 @@ public class ParagraphDsc extends InstDescr {
 
     @Override
     public String getName() {
-        return name;
+        return null;
     }
 
     @Override
@@ -72,4 +70,4 @@ public class ParagraphDsc extends InstDescr {
                                                                 ServiceObj );
         return PG;
     }
-}
\ No newline at end of file
+}
commit 1bc8beeea862616f9a28277b5ee2c424e654278d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 15 15:51:02 2015 +0100

    coverity#1327199 UwF: Unwritten field
    
    Change-Id: I1fdb8b0740c947feced9aec6399313231007dcf8

diff --git a/qadevOOo/runner/util/FrameDsc.java b/qadevOOo/runner/util/FrameDsc.java
index 7a069de..b2e6902 100644
--- a/qadevOOo/runner/util/FrameDsc.java
+++ b/qadevOOo/runner/util/FrameDsc.java
@@ -32,7 +32,6 @@ public class FrameDsc extends InstDescr {
 
     private int height = 2000;
     private int width = 2000;
-    private String name = null;
     private static final String ifcName = "com.sun.star.text.XTextFrame";
     private static final String service = "com.sun.star.text.TextFrame";
 
@@ -48,7 +47,7 @@ public class FrameDsc extends InstDescr {
 
     @Override
     public String getName() {
-        return name;
+        return null;
     }
     @Override
     public String getIfcName() {
commit 3b3e2ae28e6108f05c0774f73325e8b497053b99
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 15 15:48:42 2015 +0100

    coverity#1327198 UwF: Unwritten field
    
    Change-Id: I0ecbd7c8b16af7dbd81d9420dfab2edc7ca73493

diff --git a/qadevOOo/runner/util/FootnoteDsc.java b/qadevOOo/runner/util/FootnoteDsc.java
index 3fc082a..b14f70b 100644
--- a/qadevOOo/runner/util/FootnoteDsc.java
+++ b/qadevOOo/runner/util/FootnoteDsc.java
@@ -29,8 +29,6 @@ public class FootnoteDsc extends InstDescr {
 
     private static final String service = "com.sun.star.text.Footnote";
     private static final String ifcName = "com.sun.star.text.XTextContent";
-    private String name = null;
-
 
     public FootnoteDsc() {
         initFootnote();
@@ -38,7 +36,7 @@ public class FootnoteDsc extends InstDescr {
 
     @Override
     public String getName() {
-        return name;
+        return null;
     }
 
     @Override
@@ -71,4 +69,4 @@ public class FootnoteDsc extends InstDescr {
                                                                 ServiceObj );
         return FN;
     }
-}
\ No newline at end of file
+}
commit f40120dc6fca7170a416be2c75ff47b5946efc87
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 15 14:33:00 2015 +0100

    coverity#1326293 Dereference after null check
    
    Change-Id: I6ce295873eb2ed1231ad1d95babfcc2c8ff265e8

diff --git a/qadevOOo/tests/java/ifc/beans/_XExactName.java b/qadevOOo/tests/java/ifc/beans/_XExactName.java
index ab8f6f9..033426e 100644
--- a/qadevOOo/tests/java/ifc/beans/_XExactName.java
+++ b/qadevOOo/tests/java/ifc/beans/_XExactName.java
@@ -41,13 +41,12 @@ public class _XExactName extends MultiMethodTest {
         if (getting == null) {
             res = false;
         } else {
-            res = getting.equals(expectedName);
-        }
-
-        if (!res) {
-            log.println("didn't get the expected Name:");
-            log.println("getting: " + getting);
-            log.println("Expected: " + expectedName);
+            if (!getting.equals(expectedName)) {
+                log.println("didn't get the expected Name:");
+                log.println("getting: " + getting);
+                log.println("Expected: " + expectedName);
+                res = false;
+            }
         }
 
         nameFor = expectedName.toUpperCase();
@@ -58,13 +57,12 @@ public class _XExactName extends MultiMethodTest {
         if (getting == null) {
             res = false;
         } else {
-            res &= getting.equals(expectedName);
-        }
-
-        if (!getting.equals(expectedName)) {
-            log.println("didn't get the expected Name:");
-            log.println("getting: " + getting);
-            log.println("Expected: " + expectedName);
+            if (!getting.equals(expectedName)) {
+                log.println("didn't get the expected Name:");
+                log.println("getting: " + getting);
+                log.println("Expected: " + expectedName);
+                res = false;
+            }
         }
 
         tRes.tested("getExactName()", res);
@@ -83,4 +81,4 @@ public class _XExactName extends MultiMethodTest {
                                               "Object relation expectedName is missing"));
         }
     }
-}
\ No newline at end of file
+}


More information about the Libreoffice-commits mailing list