Source:
<code>public ImportInfoImpl accept(WorkspaceFilter wspFilter, Node parent, String name, ArtifactSetImpl artifacts) throws RepositoryException, IOException { Artifact dir = artifacts.getDirectory(); if (dir == null || artifacts.size() != 1) { return null; } ImportInfoImpl info = new ImportInfoImpl(); if (dir.getRelativePath().length() == 0) { return info; } if (!parent.hasNode(dir.getRelativePath())) { Node node = parent.addNode(dir.getRelativePath(), nodeType); info.onCreated(node.getPath()); } else { Set<String> hints = new HashSet<String>(); String rootPath = parent.getPath(); if (!rootPath.equals("/")) { rootPath += "/"; } for (Artifact a: artifacts.values(ArtifactType.HINT)) { hints.add(rootPath + a.getRelativePath()); } Node node = parent.getNode(dir.getRelativePath()); <START> if (wspFilter.contains(node.getPath()) && !node.getPrimaryNodeType().isNodeType(nodeType)) { <END> node = modifyPrimaryType(node, info); } NodeIterator iter = node.getNodes(); while (iter.hasNext()) { Node child = iter.nextNode(); String path = child.getPath(); if (wspFilter.contains(path)) { if (wspFilter.getImportMode(path) == ImportMode.REPLACE) { if (!hints.contains(path)) { if (getAclManagement().isACLNode(child)) { if (acHandling == AccessControlHandling.OVERWRITE || acHandling == AccessControlHandling.CLEAR) { info.onDeleted(path); getAclManagement().clearACL(node); } } else { info.onDeleted(path); child.remove(); } } else if (acHandling == AccessControlHandling.CLEAR && getAclManagement().isACLNode(child)) { info.onDeleted(path); getAclManagement().clearACL(node); } } } } } return info; }</code><technical_language>afir, isNodeType() allows node of a sub-type of node type. eg: if node is sling:Folder check isNodeType('nt:hierachyNode') return true.... I want check for equality</technical_language>

Target:
public ImportInfoImpl accept(WorkspaceFilter wspFilter, Node parent, String name, ArtifactSetImpl artifacts) throws RepositoryException, IOException { Artifact dir = artifacts.getDirectory(); if (dir == null || artifacts.size() != 1) { return null; } ImportInfoImpl info = new ImportInfoImpl(); if (dir.getRelativePath().length() == 0) { return info; } if (!parent.hasNode(dir.getRelativePath())) { Node node = parent.addNode(dir.getRelativePath(), nodeType); info.onCreated(node.getPath()); } else { Set<String> hints = new HashSet<String>(); String rootPath = parent.getPath(); if (!rootPath.equals("/")) { rootPath += "/"; } for (Artifact a: artifacts.values(ArtifactType.HINT)) { hints.add(rootPath + a.getRelativePath()); } Node node = parent.getNode(dir.getRelativePath()); if (wspFilter.contains(node.getPath()) && !nodeType.equals(node.getPrimaryNodeType().getName())) { node = modifyPrimaryType(node, info); } NodeIterator iter = node.getNodes(); while (iter.hasNext()) { Node child = iter.nextNode(); String path = child.getPath(); if (wspFilter.contains(path)) { if (wspFilter.getImportMode(path) == ImportMode.REPLACE) { if (!hints.contains(path)) { if (getAclManagement().isACLNode(child)) { if (acHandling == AccessControlHandling.OVERWRITE || acHandling == AccessControlHandling.CLEAR) { info.onDeleted(path); getAclManagement().clearACL(node); } } else { info.onDeleted(path); child.remove(); } } else if (acHandling == AccessControlHandling.CLEAR && getAclManagement().isACLNode(child)) { info.onDeleted(path); getAclManagement().clearACL(node); } } } } } return info; }