We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c380f1 commit 6d3e409Copy full SHA for 6d3e409
1 file changed
org.restlet.ext.xml/src/main/java/org/restlet/ext/xml/SaxRepresentation.java
@@ -135,8 +135,8 @@ public InputSource getInputSource() throws IOException {
135
@Override
136
public SAXSource getSaxSource() throws IOException {
137
if (this.source == null && this.xmlRepresentation != null) {
138
- if (xmlRepresentation instanceof XmlRepresentation) {
139
- this.source = ((XmlRepresentation) xmlRepresentation).getSaxSource();
+ if (xmlRepresentation instanceof XmlRepresentation xmlRepresentationCast) {
+ this.source = xmlRepresentationCast.getSaxSource();
140
} else {
141
try {
142
SAXParserFactory spf = SAXParserFactory.newInstance();
0 commit comments