From 8cd0a9f5ce1d0c132ed5118106dfb7ae06505d3e Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sun, 2 May 2021 17:16:23 +0200 Subject: [PATCH] [core] Mark IntrospectionProvider as deprecated --- .../smack/provider/IntrospectionProvider.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/smack-core/src/main/java/org/jivesoftware/smack/provider/IntrospectionProvider.java b/smack-core/src/main/java/org/jivesoftware/smack/provider/IntrospectionProvider.java index 4119c687c..b5885531e 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/provider/IntrospectionProvider.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/provider/IntrospectionProvider.java @@ -26,10 +26,22 @@ import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParserException; +/** + * Parsing with introspection poses a security threat and results in mutable classes and is therefore discouraged. + * @deprecated use a proper parser. + */ +// TODO: Remove in Smack 4.6. +@Deprecated public class IntrospectionProvider{ // Unfortunately, we have to create two introspection providers, with the exactly the same code here + /** + * Parsing with introspection poses a security threat and results in mutable classes and is therefore discouraged. + * @deprecated use a proper parser. + */ + // TODO: Remove in Smack 4.6. + @Deprecated public abstract static class IQIntrospectionProvider extends IQProvider { private final Class elementClass; @@ -51,6 +63,12 @@ public class IntrospectionProvider{ } } + /** + * Parsing with introspection poses a security threat and results in mutable classes and is therefore discouraged. + * @deprecated use a proper parser. + */ + // TODO: Remove in Smack 4.6. + @Deprecated public abstract static class PacketExtensionIntrospectionProvider extends ExtensionElementProvider { private final Class elementClass;