tamaya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anat...@apache.org
Subject [09/10] incubator-tamaya git commit: Added default prio.
Date Wed, 09 Mar 2016 13:11:18 GMT
Added default prio.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/a88d16d4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/a88d16d4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/a88d16d4

Branch: refs/heads/master
Commit: a88d16d435f58ba5e17b27ee2e393018f0ee9678
Parents: 4cc0fcf
Author: anatole <anatole@apache.org>
Authored: Wed Mar 9 14:03:10 2016 +0100
Committer: anatole <anatole@apache.org>
Committed: Wed Mar 9 14:03:10 2016 +0100

----------------------------------------------------------------------
 .../org/apache/tamaya/examples/simple/SimplePropertySource.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/a88d16d4/examples/2-simple-propertysource-example/src/main/java/org/apache/tamaya/examples/simple/SimplePropertySource.java
----------------------------------------------------------------------
diff --git a/examples/2-simple-propertysource-example/src/main/java/org/apache/tamaya/examples/simple/SimplePropertySource.java
b/examples/2-simple-propertysource-example/src/main/java/org/apache/tamaya/examples/simple/SimplePropertySource.java
index 72bfc98..9e52e0e 100644
--- a/examples/2-simple-propertysource-example/src/main/java/org/apache/tamaya/examples/simple/SimplePropertySource.java
+++ b/examples/2-simple-propertysource-example/src/main/java/org/apache/tamaya/examples/simple/SimplePropertySource.java
@@ -33,10 +33,11 @@ import java.util.Properties;
  */
 public class SimplePropertySource extends BasePropertySource{
 
+    public static final String CONFIG_PROPERTIES_LOCATION = "META-INF/MyOtherConfigProperties.properties";
     private Map<String,String> props = new HashMap<>();
 
     public SimplePropertySource() throws IOException {
-        URL url = ClassLoader.getSystemClassLoader().getResource("META-INF/MyOtherConfigProperties.properties");
+        URL url = ClassLoader.getSystemClassLoader().getResource(CONFIG_PROPERTIES_LOCATION);
         Properties properties = new Properties();
         try(InputStream is = url.openStream()){
             properties.load(is);
@@ -51,7 +52,7 @@ public class SimplePropertySource extends BasePropertySource{
 
     @Override
     public String getName() {
-        return "META-INF/MyOtherConfigProperties.properties";
+        return CONFIG_PROPERTIES_LOCATION;
     }
 
     @Override


Mime
View raw message