Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-9742

Fix string comparisons using ==

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.5
    • Fix Version/s: 5.6-RC2, 5.6
    • Component/s: None

      Description

      There are a number of places where string comparisons are incorrectly done using ==.

      1. nuxeo/nuxeo-core/nuxeo-core-api/src/main/java/org/nuxeo/ecm/core/utils/BlobsExtractor.java:174
        that latest one is a call to equals() with different types
        => I guess the check on the field name won't be done. I'm unsure about the result of "*".equals(field.getName()) but I don't think field.getName().toString() will be called.
      2. nuxeo/nuxeo-core/nuxeo-core-api/src/main/java/org/nuxeo/ecm/core/utils/BlobsExtractor.java:312
        => the wanted logic is never satisfied
      3. nuxeo/nuxeo-jsf/nuxeo-platform-webapp-base/src/main/java/org/nuxeo/ecm/webapp/directory/VocabularyTreeNode.java:197
        => I guess it's simply never satisfied but works thanks to line 200
      4. nuxeo/nuxeo-jsf/nuxeo-platform-webapp-base/src/main/java/org/nuxeo/ecm/webapp/directory/DirectoryTreeNode.java:305
        => I guess it's simply never satisfied but works thanks to line 308
      5. nuxeo/nuxeo-services/nuxeo-platform-ws/src/main/java/org/nuxeo/ecm/platform/ws/NuxeoRemotingBean.java:278
        => systematic call to rs.getDocumentManager().getSourceDocument(doc.getRef());

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: