Skip to content

Commit 557c177

Browse files
Merge branch 'master' of https://github.com/GrapeBaBa/java-sdk into GrapeBaBa-master
2 parents 2570488 + 33b0f11 commit 557c177

File tree

14 files changed

+113
-113
lines changed

14 files changed

+113
-113
lines changed

src/main/java/com/ibm/watson/developer_cloud/alchemy/v1/AlchemyVision.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ private <T extends AlchemyGenericModel> T executeRequest(Map<String, Object> par
9191
final String path = AlchemyEndPoints.getPath(operation, inputType);
9292

9393
final RequestBuilder requestBuilder = RequestBuilder.post(path);
94-
if (inputType == IMAGE) {
94+
if (IMAGE.equals(inputType)) {
9595
if (params.get(IMAGE) instanceof String) {
9696
params.put(IMAGE_POST_MODE, NOT_RAW);
9797
} else {

src/main/java/com/ibm/watson/developer_cloud/alchemy/v1/util/TaxonomyTypeAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public void write(JsonWriter writer, Taxonomy value) throws IOException {
7878

7979
if (value.getScore() != null)
8080
writer.name("score").value(value.getScore());
81-
if (value.getConfident() == false)
81+
if (!value.getConfident())
8282
writer.name("confident").value("no");
8383
if (value.getLabel() != null)
8484
writer.name("label").value(value.getLabel());

src/main/java/com/ibm/watson/developer_cloud/concept_expansion/v1/model/Job.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public static Status fromString(final String id) {
6464
* @param name the name
6565
* @param id the id
6666
*/
67-
private Status(String name, String id) {
67+
Status(String name, String id) {
6868
this.name = name;
6969
this.id = id;
7070
}

src/main/java/com/ibm/watson/developer_cloud/http/HttpHeaders.java

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -22,167 +22,167 @@ public interface HttpHeaders {
2222
* See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1">HTTP/1.1
2323
* documentation</a>.
2424
*/
25-
public static final String ACCEPT = "Accept";
25+
String ACCEPT = "Accept";
2626

2727
/**
2828
* See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.2">HTTP/1.1
2929
* documentation</a>.
3030
*/
31-
public static final String ACCEPT_CHARSET = "Accept-Charset";
31+
String ACCEPT_CHARSET = "Accept-Charset";
3232

3333
/**
3434
* See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3">HTTP/1.1
3535
* documentation</a>.
3636
*/
37-
public static final String ACCEPT_ENCODING = "Accept-Encoding";
37+
String ACCEPT_ENCODING = "Accept-Encoding";
3838

3939
/**
4040
* See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4">HTTP/1.1
4141
* documentation</a>.
4242
*/
43-
public static final String ACCEPT_LANGUAGE = "Accept-Language";
43+
String ACCEPT_LANGUAGE = "Accept-Language";
4444

4545
/**
4646
* See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.8">HTTP/1.1
4747
* documentation</a>.
4848
*/
49-
public static final String AUTHORIZATION = "Authorization";
49+
String AUTHORIZATION = "Authorization";
5050

5151
/**
5252
* See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">HTTP/1.1
5353
* documentation</a>.
5454
*/
55-
public static final String CACHE_CONTROL = "Cache-Control";
55+
String CACHE_CONTROL = "Cache-Control";
5656

5757
/**
5858
* See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11">HTTP/1.1
5959
* documentation</a>.
6060
*/
61-
public static final String CONTENT_ENCODING = "Content-Encoding";
61+
String CONTENT_ENCODING = "Content-Encoding";
6262

6363
/**
6464
* See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.12">HTTP/1.1
6565
* documentation</a>.
6666
*/
67-
public static final String CONTENT_LANGUAGE = "Content-Language";
67+
String CONTENT_LANGUAGE = "Content-Language";
6868

6969
/**
7070
* See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.12">HTTP/1.1
7171
* documentation</a>.
7272
*/
73-
public static final String CONTENT_DISPOSITION = "Content-Disposition";
73+
String CONTENT_DISPOSITION = "Content-Disposition";
7474

7575

7676
/**
7777
* See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13">HTTP/1.1
7878
* documentation</a>.
7979
*/
80-
public static final String CONTENT_LENGTH = "Content-Length";
80+
String CONTENT_LENGTH = "Content-Length";
8181

8282
/**
8383
* See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.14">HTTP/1.1
8484
* documentation</a>.
8585
*/
86-
public static final String CONTENT_LOCATION = "Content-Location";
86+
String CONTENT_LOCATION = "Content-Location";
8787

8888
/**
8989
* See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">HTTP/1.1
9090
* documentation</a>.
9191
*/
92-
public static final String CONTENT_TYPE = "Content-Type";
92+
String CONTENT_TYPE = "Content-Type";
9393

9494
/**
9595
* See <a href="http://www.ietf.org/rfc/rfc2109.txt">IETF RFC 2109</a>.
9696
*/
97-
public static final String COOKIE = "Cookie";
97+
String COOKIE = "Cookie";
9898

9999
/**
100100
* See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.18">HTTP/1.1
101101
* documentation</a>.
102102
*/
103-
public static final String DATE = "Date";
103+
String DATE = "Date";
104104

105105
/**
106106
* See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.19">HTTP/1.1
107107
* documentation</a>.
108108
*/
109-
public static final String ETAG = "ETag";
109+
String ETAG = "ETag";
110110

111111
/**
112112
* See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21">HTTP/1.1
113113
* documentation</a>.
114114
*/
115-
public static final String EXPIRES = "Expires";
115+
String EXPIRES = "Expires";
116116

117117
/**
118118
* See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23">HTTP/1.1
119119
* documentation</a>.
120120
*/
121-
public static final String HOST = "Host";
121+
String HOST = "Host";
122122

123123
/**
124124
* See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.24">HTTP/1.1
125125
* documentation</a>.
126126
*/
127-
public static final String IF_MATCH = "If-Match";
127+
String IF_MATCH = "If-Match";
128128

129129
/**
130130
* See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.25">HTTP/1.1
131131
* documentation</a>.
132132
*/
133-
public static final String IF_MODIFIED_SINCE = "If-Modified-Since";
133+
String IF_MODIFIED_SINCE = "If-Modified-Since";
134134

135135
/**
136136
* See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.26">HTTP/1.1
137137
* documentation</a>.
138138
*/
139-
public static final String IF_NONE_MATCH = "If-None-Match";
139+
String IF_NONE_MATCH = "If-None-Match";
140140

141141
/**
142142
* See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.28">HTTP/1.1
143143
* documentation</a>.
144144
*/
145-
public static final String IF_UNMODIFIED_SINCE = "If-Unmodified-Since";
145+
String IF_UNMODIFIED_SINCE = "If-Unmodified-Since";
146146

147147
/**
148148
* See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.29">HTTP/1.1
149149
* documentation</a>.
150150
*/
151-
public static final String LAST_MODIFIED = "Last-Modified";
151+
String LAST_MODIFIED = "Last-Modified";
152152

153153
/**
154154
* See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30">HTTP/1.1
155155
* documentation</a>.
156156
*/
157-
public static final String LOCATION = "Location";
157+
String LOCATION = "Location";
158158

159159
/**
160160
* See <a href="http://www.ietf.org/rfc/rfc2109.txt">IETF RFC 2109</a>.
161161
*/
162-
public static final String SET_COOKIE = "Set-Cookie";
162+
String SET_COOKIE = "Set-Cookie";
163163

164164
/**
165165
* See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43">HTTP/1.1
166166
* documentation</a>.
167167
*/
168-
public static final String USER_AGENT = "User-Agent";
168+
String USER_AGENT = "User-Agent";
169169

170170
/**
171171
* See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.44">HTTP/1.1
172172
* documentation</a>.
173173
*/
174-
public static final String VARY = "Vary";
174+
String VARY = "Vary";
175175

176176
/**
177177
* See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.47">HTTP/1.1
178178
* documentation</a>.
179179
*/
180-
public static final String WWW_AUTHENTICATE = "WWW-Authenticate";
180+
String WWW_AUTHENTICATE = "WWW-Authenticate";
181181

182182
/** The Authorization token header. */
183-
public static final String X_WATSON_AUTHORIZATION_TOKEN = "X-Watson-Authorization-Token";
183+
String X_WATSON_AUTHORIZATION_TOKEN = "X-Watson-Authorization-Token";
184184

185185
/** Allow Watson to collect the payload. */
186-
public static final String X_WATSON_LEARNING_OPT_OUT = "X-Watson-Learning-Opt-Out";
186+
String X_WATSON_LEARNING_OPT_OUT = "X-Watson-Learning-Opt-Out";
187187

188188
}

src/main/java/com/ibm/watson/developer_cloud/http/HttpMediaType.java

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -26,118 +26,118 @@ public interface HttpMediaType {
2626
/**
2727
* Field APPLICATION_ATOM_XML. (value is "application/atom+xml")
2828
*/
29-
public final static String APPLICATION_ATOM_XML = "application/atom+xml";
29+
String APPLICATION_ATOM_XML = "application/atom+xml";
3030
/**
3131
* Field APPLICATION_FORM_URLENCODED. (value is "application/x-www-form-urlencoded")
3232
*/
33-
public final static String APPLICATION_FORM_URLENCODED = "application/x-www-form-urlencoded";
33+
String APPLICATION_FORM_URLENCODED = "application/x-www-form-urlencoded";
3434
/**
3535
* Field APPLICATION_JSON. (value is "application/json")
3636
*/
37-
public final static String APPLICATION_JSON = "application/json";
37+
String APPLICATION_JSON = "application/json";
3838
/**
3939
* Field APPLICATION_MS_WORD. (value is "application/msword")
4040
*/
41-
public final static String APPLICATION_MS_WORD = "application/msword";
41+
String APPLICATION_MS_WORD = "application/msword";
4242

4343
/**
4444
* Field APPLICATION_MS_WORD_DOCX. (value is
4545
* "application/vnd.openxmlformats-officedocument.wordprocessingml.document")
4646
*/
47-
public final static String APPLICATION_MS_WORD_DOCX =
47+
String APPLICATION_MS_WORD_DOCX =
4848
"application/vnd.openxmlformats-officedocument.wordprocessingml.document";
4949

5050
/**
5151
* Field APPLICATION_OCTET_STREAM. (value is "application/octet-stream")
5252
*/
53-
public final static String APPLICATION_OCTET_STREAM = "application/octet-stream";
53+
String APPLICATION_OCTET_STREAM = "application/octet-stream";
5454
/**
5555
* Field APPLICATION_PDF. (value is "application/pdf")
5656
*/
57-
public final static String APPLICATION_PDF = "application/pdf";
57+
String APPLICATION_PDF = "application/pdf";
5858
/**
5959
* Field APPLICATION_SVG_XML. (value is "application/svg+xml")
6060
*/
61-
public final static String APPLICATION_SVG_XML = "application/svg+xml";
61+
String APPLICATION_SVG_XML = "application/svg+xml";
6262
/**
6363
* Field APPLICATION_XHTML_XML. (value is "application/xhtml+xml")
6464
*/
65-
public final static String APPLICATION_XHTML_XML = "application/xhtml+xml";
65+
String APPLICATION_XHTML_XML = "application/xhtml+xml";
6666
/**
6767
* Field APPLICATION_ZIP. (value is "application/zip")
6868
*/
69-
public final static String APPLICATION_ZIP = "application/zip";
69+
String APPLICATION_ZIP = "application/zip";
7070

7171
/**
7272
* Field APPLICATION_XML. (value is "application/xml")
7373
*/
74-
public final static String APPLICATION_XML = "application/xml";
74+
String APPLICATION_XML = "application/xml";
7575
/**
7676
* Field AUDIO_OGG. (value is "audio/ogg; codecs=opus")
7777
*/
78-
public final static String AUDIO_OGG = "audio/ogg; codecs=opus";
78+
String AUDIO_OGG = "audio/ogg; codecs=opus";
7979
/**
8080
* Field AUDIO_WAV. (value is "audio/wav")
8181
*/
82-
public final static String AUDIO_WAV = "audio/wav";
82+
String AUDIO_WAV = "audio/wav";
8383

8484
/**
8585
* Field AUDIO_FLAC. (value is "audio/flac")
8686
*/
87-
public static final String AUDIO_FLAC = "audio/flac";
87+
String AUDIO_FLAC = "audio/flac";
8888

8989
/**
9090
* Field AUDIO_RAW. (value is "audio/l16")
9191
*/
92-
public static final String AUDIO_RAW = "audio/l16";
92+
String AUDIO_RAW = "audio/l16";
9393

9494
/**
9595
* Field BINARY_FILE. (value is "application/octet-stream")
9696
*/
97-
public static final MediaType BINARY_FILE = MediaType.parse(APPLICATION_OCTET_STREAM);
97+
MediaType BINARY_FILE = MediaType.parse(APPLICATION_OCTET_STREAM);
9898
/**
9999
* Field BINARY_OCTET_STREAM. (value is "binary/octet-stream")
100100
*/
101-
public final static String BINARY_OCTET_STREAM = "binary/octet-stream";
101+
String BINARY_OCTET_STREAM = "binary/octet-stream";
102102
/**
103103
* Field JSON. (value is "application/json; charset=utf-8")
104104
*/
105-
public static final MediaType JSON = MediaType.parse(APPLICATION_JSON + "; charset=utf-8");
105+
MediaType JSON = MediaType.parse(APPLICATION_JSON + "; charset=utf-8");
106106
/**
107107
* Field MEDIA_TYPE_WILDCARD. (value is "*")
108108
*/
109-
public static final String MEDIA_TYPE_WILDCARD = "*";
109+
String MEDIA_TYPE_WILDCARD = "*";
110110
/**
111111
* Field MULTIPART_FORM_DATA. (value is "multipart/form-data")
112112
*/
113-
public final static String MULTIPART_FORM_DATA = "multipart/form-data";
113+
String MULTIPART_FORM_DATA = "multipart/form-data";
114114
/**
115115
* Field TEXT_CSV. (value is "text/csv")
116116
*/
117-
public static final String TEXT_CSV = "text/csv";
117+
String TEXT_CSV = "text/csv";
118118

119119
/**
120120
* Field TEXT_HTML. (value is "text/html")
121121
*/
122-
public final static String TEXT_HTML = "text/html";
122+
String TEXT_HTML = "text/html";
123123

124124
/**
125125
* Field TEXT_PLAIN. (value is "text/plain")
126126
*/
127-
public final static String TEXT_PLAIN = "text/plain";
127+
String TEXT_PLAIN = "text/plain";
128128

129129
/**
130130
* Field TEXT. (value is "text/plain; charset=utf-8")
131131
*/
132-
public static final MediaType TEXT = MediaType.parse(TEXT_PLAIN + "; charset=utf-8");
132+
MediaType TEXT = MediaType.parse(TEXT_PLAIN + "; charset=utf-8");
133133

134134
/**
135135
* Field TEXT_XML. (value is "text/xml")
136136
*/
137-
public final static String TEXT_XML = "text/xml";
137+
String TEXT_XML = "text/xml";
138138

139139
/**
140140
* Field WILDCARD. (value is "*\/*")
141141
*/
142-
public final static String WILDCARD = "*/*";
142+
String WILDCARD = "*/*";
143143
}

0 commit comments

Comments
 (0)