jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "angela (JIRA)" <j...@apache.org>
Subject [jira] Created: (JCR-1857) jcr2spi: NPE with SessionImporter#checkIncludesMixReferenceable if NodeInfo doesn't contain mixin names
Date Fri, 14 Nov 2008 15:04:44 GMT
jcr2spi: NPE with SessionImporter#checkIncludesMixReferenceable if NodeInfo doesn't contain
mixin names
-------------------------------------------------------------------------------------------------------

                 Key: JCR-1857
                 URL: https://issues.apache.org/jira/browse/JCR-1857
             Project: Jackrabbit
          Issue Type: Bug
          Components: jackrabbit-jcr2spi
            Reporter: angela


issue reported by tobi:

java.lang.NullPointerException
	at java.util.Arrays$ArrayList.<init>(Arrays.java:2355)
	at java.util.Arrays.asList(Arrays.java:2341)
	at org.apache.jackrabbit.jcr2spi.xml.SessionImporter.checkIncludesMixReferenceable(SessionImporter.java:637)
	at org.apache.jackrabbit.jcr2spi.xml.SessionImporter.startNode(SessionImporter.java:209)

including test case:

    public void testEmptyMixins() throws Exception {
        String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
                "<sv:node xmlns:nt=\"http://www.jcp.org/jcr/nt/1.0\"\n" +
                "         xmlns:sv=\"http://www.jcp.org/jcr/sv/1.0\"\n" +
                "         xmlns:mix=\"http://www.jcp.org/jcr/mix/1.0\"\n" +
                "         xmlns:jcr=\"http://www.jcp.org/jcr/1.0\"\n" +
                "         sv:name=\"testnode1\">\n" +
                "    <sv:property sv:name=\"jcr:primaryType\"
sv:type=\"Name\">\n" +
                "        <sv:value>nt:unstructured</sv:value>\n" +
                "    </sv:property>\n" +
                "    <sv:property sv:name=\"jcr:title\" sv:type=\"String\">\n" +
                "        <sv:value>Test Node</sv:value>\n" +
                "    </sv:property>\n" +
                "    <sv:property sv:name=\"jcr:uuid\" sv:type=\"String\">\n" +
                "        <sv:value>1234</sv:value>\n" +
                "    </sv:property>\n" +
                "</sv:node>";

        InputStream in = new ByteArrayInputStream(xml.getBytes());
        session.importXML("/", in,
ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW);
        session.save();
    }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message