Author: rob.stryker(a)jboss.com
Date: 2009-01-06 12:48:26 -0500 (Tue, 06 Jan 2009)
New Revision: 12900
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XMLDocumentRepository.java
Log:
random NPE from old code
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XMLDocumentRepository.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XMLDocumentRepository.java 2009-01-06
17:28:48 UTC (rev 12899)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XMLDocumentRepository.java 2009-01-06
17:48:26 UTC (rev 12900)
@@ -110,7 +110,8 @@
* @return whether the document was re-read
*/
public boolean refresh(String fullPath) {
- if (new File(fullPath).lastModified() != ((Long) pathToTimestamp
+ boolean found = pathToTimestamp.get(fullPath) != null;
+ if (!found || new File(fullPath).lastModified() != ((Long) pathToTimestamp
.get(fullPath)).longValue()) {
pathToDocument.put(fullPath, loadDocument(fullPath));
pathToTimestamp.put(fullPath, new Long(new File(fullPath)
Show replies by date