You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by bf...@apache.org on 2014/04/07 11:13:57 UTC

svn commit: r1585436 - /oodt/trunk/protocol/api/src/main/java/org/apache/oodt/cas/protocol/ProtocolFile.java

Author: bfoster
Date: Mon Apr  7 09:13:57 2014
New Revision: 1585436

URL: http://svn.apache.org/r1585436
Log:
- Fix possible NullPointerException

Modified:
    oodt/trunk/protocol/api/src/main/java/org/apache/oodt/cas/protocol/ProtocolFile.java

Modified: oodt/trunk/protocol/api/src/main/java/org/apache/oodt/cas/protocol/ProtocolFile.java
URL: http://svn.apache.org/viewvc/oodt/trunk/protocol/api/src/main/java/org/apache/oodt/cas/protocol/ProtocolFile.java?rev=1585436&r1=1585435&r2=1585436&view=diff
==============================================================================
--- oodt/trunk/protocol/api/src/main/java/org/apache/oodt/cas/protocol/ProtocolFile.java (original)
+++ oodt/trunk/protocol/api/src/main/java/org/apache/oodt/cas/protocol/ProtocolFile.java Mon Apr  7 09:13:57 2014
@@ -104,9 +104,9 @@ public class ProtocolFile {
 	 */
 	public ProtocolFile getAbsoluteFile() {
 		if (this.isRelative()) {
-			ProtocolFile parent = this.getParent().getAbsoluteFile();
-			if (parent != null) {
-				return new ProtocolFile(StringUtils.chomp(parent.getPath(), SEPARATOR)
+		  ProtocolFile parent = this.getParent();
+		  if (parent != null) {
+				return new ProtocolFile(StringUtils.chomp(parent.getAbsoluteFile().getPath(), SEPARATOR)
 						+ SEPARATOR + this.getPath(), this.isDir());
 			}
 		}