Skip to content
This repository has been archived by the owner on Dec 5, 2020. It is now read-only.

Added AbstractSystemProperty and 4 system properties implementation. #203

Merged
merged 3 commits into from
Mar 29, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* @version $Id$
* @since 1.0.0
* @todo #201:15m/DEV Add fake implementation for the 4 SystemProperty
* interfaces to use them in testing.
* interfaces to use them in testing.
*/
abstract class AbstractSystemProperty implements SystemProperty {

Expand All @@ -49,7 +49,7 @@ public AbstractSystemProperty(String name) {
this.name = name;
}

@Override
@Override
public String read() {
return System.getProperty(this.name);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* @version $Id$
* @since 1.0.0
*/
public final class StAccessKeyId extends AbstractSystemProperty implements SecretKey {
public final class StAccessKeyId extends AbstractSystemProperty implements AccessKeyId {

/**
* Ctor.
Expand Down
10 changes: 9 additions & 1 deletion src/main/java/com/amihaiemil/charles/aws/StEsEndPoint.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,13 @@ public final class StEsEndPoint extends AbstractSystemProperty implements EsEndP
public StEsEndPoint(final String name) {
super(name);
}


@Override
public String read() {
String endPoint = super.read();
if(!endPoint.endsWith("\\")) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SherifWaly We need "/" (slash), not "\" (backslash) :D Sorry, I might have written it wrong when I let the comment the first time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amihaiemil Ok, I've made a new commit :D

endPoint += "\\";
}
return endPoint;
}
}
2 changes: 1 addition & 1 deletion src/main/java/com/amihaiemil/charles/aws/StRegion.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* @version $Id$
* @since 1.0.0
*/
public final class StRegion extends AbstractSystemProperty implements SecretKey {
public final class StRegion extends AbstractSystemProperty implements Region {

/**
* Ctor.
Expand Down