Skip to content

Commit b460cdd

Browse files
nan2izMikemosca
andauthored
fix(nlc): add a deprecation message (#1185)
* fix(nlc): add a deprecation message on Natural Language Classifier logger * fix(nlc): update deprecated annotation for Natural Language Classifier Co-authored-by: Michael G Mosca <moscam@us.ibm.com>
1 parent 29ad02a commit b460cdd

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

natural-language-classifier/src/main/java/com/ibm/watson/natural_language_classifier/v1/NaturalLanguageClassifier.java

+14
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@
5252
* @see <a href="https://cloud.ibm.com/docs/natural-language-classifier">Natural Language
5353
* Classifier</a>
5454
*/
55+
56+
/**
57+
* @deprecated On 9 August 2021, IBM announced the deprecation of the Natural Language Classifier service.
58+
* The service will no longer be available from 8 August 2022. As of 9 September 2021, you will not be able to create new instances.
59+
* Existing instances will be supported until 8 August 2022. Any instance that still exists on that date will be deleted.
60+
* (https://github.com/watson-developer-cloud/java-sdk/tree/master#natural-language-classifier-deprecation).
61+
*/
62+
@Deprecated
5563
public class NaturalLanguageClassifier extends BaseService {
5664

5765
public static final String DEFAULT_SERVICE_NAME = "natural_language_classifier";
@@ -100,6 +108,12 @@ public NaturalLanguageClassifier(String serviceName, Authenticator authenticator
100108
super(serviceName, authenticator);
101109
setServiceUrl(DEFAULT_SERVICE_URL);
102110
this.configureService(serviceName);
111+
112+
System.err.println(
113+
"On 9 August 2021, IBM announced the deprecation of the Natural Language Classifier service."
114+
+ "\nThe service will no longer be available from 8 August 2022. As of 9 September 2021, you will not be able to create new instances."
115+
+ "\nExisting instances will be supported until 8 August 2022. Any instance that still exists on that date will be deleted."
116+
+ "\n(https://github.com/watson-developer-cloud/java-sdk/tree/master#natural-language-classifier-deprecation).");
103117
}
104118

105119
/**

0 commit comments

Comments
 (0)