Skip to content

Commit

Permalink
updated license
Browse files Browse the repository at this point in the history
  • Loading branch information
GannaChernyshova committed Mar 27, 2018
1 parent 757ec35 commit 54a8b8f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main/java/ru/alfabank/tests/core/helpers/PropertyLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package ru.alfabank.tests.core.helpers;

import com.google.common.base.Strings;
Expand Down Expand Up @@ -76,6 +77,7 @@ public static Integer loadSystemPropertyOrDefault(String propertyName, Integer d
return defaultValue;
}
}

/**
* Возвращает свойство по его названию из property-файла
*
Expand Down Expand Up @@ -158,8 +160,8 @@ public static String tryLoadProperty(String propertyName) {
private static Properties getPropertiesInstance() {
Properties instance = new Properties();
try (
InputStream resourceStream = PropertyLoader.class.getResourceAsStream(PROPERTIES_FILE);
InputStreamReader inputStream = new InputStreamReader(resourceStream, Charset.forName("UTF-8"))
InputStream resourceStream = PropertyLoader.class.getResourceAsStream(PROPERTIES_FILE);
InputStreamReader inputStream = new InputStreamReader(resourceStream, Charset.forName("UTF-8"))
) {
instance.load(inputStream);
}
Expand All @@ -182,8 +184,8 @@ private static Properties getProfilePropertiesInstance() {
String path = Paths.get(profile, PROPERTIES_FILE).toString();
URL url = PropertyLoader.class.getClassLoader().getResource(path);
try (
InputStream resourceStream = url.openStream();
InputStreamReader inputStream = new InputStreamReader(resourceStream, Charset.forName("UTF-8"))
InputStream resourceStream = url.openStream();
InputStreamReader inputStream = new InputStreamReader(resourceStream, Charset.forName("UTF-8"))
) {
instance.load(inputStream);
}
Expand Down

0 comments on commit 54a8b8f

Please sign in to comment.