Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ public class ConceptInsights extends WatsonService {
*/
public ConceptInsights() {
super(SERVICE_NAME);
setEndPoint(URL);
if (getEndPoint() == null || getEndPoint().isEmpty())
setEndPoint(URL);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public final class ConversationService extends WatsonService {
*/
public ConversationService(final String versionDate) {
super(SERVICE_NAME);
if (getEndPoint() == null)
if (getEndPoint() == null || getEndPoint().isEmpty())
setEndPoint(URL);

Validator.isTrue(versionDate != null && !versionDate.isEmpty(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ public class DocumentConversion extends WatsonService {
*/
public DocumentConversion(String versionDate) {
super(SERVICE_NAME);
setEndPoint(URL);
if (getEndPoint() == null || getEndPoint().isEmpty())
setEndPoint(URL);
this.versionDate = versionDate;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ public class LanguageTranslation extends WatsonService {
*/
public LanguageTranslation() {
super(SERVICE_NAME);
setEndPoint(URL);
if (getEndPoint() == null || getEndPoint().isEmpty())
setEndPoint(URL);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ public class NaturalLanguageClassifier extends WatsonService {
*/
public NaturalLanguageClassifier() {
super(SERVICE_NAME);
setEndPoint(URL);
if (getEndPoint() == null || getEndPoint().isEmpty())
setEndPoint(URL);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ public class PersonalityInsights extends WatsonService {
*/
public PersonalityInsights() {
super(SERVICE_NAME);
setEndPoint(URL);
if (getEndPoint() == null || getEndPoint().isEmpty())
setEndPoint(URL);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ public class RetrieveAndRank extends WatsonService implements ClusterLifecycleMa
*/
public RetrieveAndRank() {
super("retrieve_and_rank");
setEndPoint(URL);
if (getEndPoint() == null || getEndPoint().isEmpty())
setEndPoint(URL);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public abstract class AlchemyService extends WatsonService {
*/
public AlchemyService() {
super(SERVICE_NAME);
setEndPoint(ENDPOINT);
if (getEndPoint() == null || getEndPoint().isEmpty())
setEndPoint(ENDPOINT);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ public class SpeechToText extends WatsonService {
*/
public SpeechToText() {
super(SERVICE_NAME);
setEndPoint(URL);
if (getEndPoint() == null || getEndPoint().isEmpty())
setEndPoint(URL);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ public class TextToSpeech extends WatsonService {
*/
public TextToSpeech() {
super(SERVICE_NAME);
setEndPoint(URL);
if (getEndPoint() == null || getEndPoint().isEmpty())
setEndPoint(URL);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ public class ToneAnalyzer extends WatsonService {
*/
public ToneAnalyzer(String versionDate) {
super(SERVICE_NAME);
setEndPoint(URL);
if (getEndPoint() == null || getEndPoint().isEmpty())
setEndPoint(URL);
this.versionDate = versionDate;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ public class TradeoffAnalytics extends WatsonService {
*/
public TradeoffAnalytics() {
super(SERVICE_NAME);
setEndPoint(URL);
if (getEndPoint() == null || getEndPoint().isEmpty())
setEndPoint(URL);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ public class VisualRecognition extends WatsonService {
*/
public VisualRecognition(String versionDate) {
super(SERVICE_NAME);
setEndPoint(URL);
if (getEndPoint() == null || getEndPoint().isEmpty())
setEndPoint(URL);
Validator.notNull(versionDate, "versionDate cannot be null. Use '2016-05-19'");
this.versionDate = versionDate;
}
Expand Down