felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From db...@apache.org
Subject svn commit: r1607645 - /felix/trunk/gogo/shell/src/main/java/org/apache/felix/gogo/shell/Shell.java
Date Thu, 03 Jul 2014 13:43:35 GMT
Author: dbaum
Date: Thu Jul  3 13:43:35 2014
New Revision: 1607645

URL: http://svn.apache.org/r1607645
Log:
FELIX-4529 look for gosh_profile in bundle at /ext to allow fragment to over-ride.

Modified:
    felix/trunk/gogo/shell/src/main/java/org/apache/felix/gogo/shell/Shell.java

Modified: felix/trunk/gogo/shell/src/main/java/org/apache/felix/gogo/shell/Shell.java
URL: http://svn.apache.org/viewvc/felix/trunk/gogo/shell/src/main/java/org/apache/felix/gogo/shell/Shell.java?rev=1607645&r1=1607644&r2=1607645&view=diff
==============================================================================
--- felix/trunk/gogo/shell/src/main/java/org/apache/felix/gogo/shell/Shell.java (original)
+++ felix/trunk/gogo/shell/src/main/java/org/apache/felix/gogo/shell/Shell.java Thu Jul  3
13:43:35 2014
@@ -23,6 +23,7 @@ import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.Reader;
 import java.net.URI;
+import java.net.URL;
 import java.net.URLConnection;
 import java.nio.CharBuffer;
 import java.util.ArrayList;
@@ -106,7 +107,11 @@ public class Shell
             URI uri = baseURI.resolve("etc/gosh_profile");
             if (!new File(uri).exists())
             {
-                uri = getClass().getResource("/gosh_profile").toURI();
+                URL url = getClass().getResource("/ext/gosh_profile");
+                if (url == null) {
+                    url = getClass().getResource("/gosh_profile");
+                }
+                uri = (url == null) ? null : url.toURI();
             }
             if (uri != null)
             {



Mime
View raw message