You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
com.jcabi.xml.ClasspathInput is currently filled with methods which are "//intentionally empty" or return null.
Some of them can be properly implemented, some of them I think should throw UnsupportedOperationException.
Parameters baseURI and encoding can be specified in the constructor when instanciating the class in ClasspathResolver.resolveResource:
class ClasspathResolver implements LSResourceResolver {
@Override
@SuppressWarnings("PMD.UseObjectForClearerAPI")
// @checkstyle ParameterNumber (1 line)
public LSInput resolveResource(final String type, final String namespaceuri,
final String publicid, final String systemid, final String baseuri) {
LSInput input = null;
if (systemid != null && getClass().getResource(systemid) != null) {
input = new ClasspathInput(publicid, systemid, "UTF-8", baseuri);
}
return input;
}
}
Then the getters and setters for the 2 can be properly implemented inside ClasspathInput .. also, encoding would be used by getStringData() rather than hardcoding "UTF-8" there.
All other unimplemented setters can throw new UnsupportedOperationException();
getCharacterStream() and getByteStream() should remain as they are or should return a mock of Reader/inputStream - they cannot throw UnsupportedOperationException since then tests fail (they are evantually called by the XML validators...)
I did these changes and the build was successfull.
The text was updated successfully, but these errors were encountered:
com.jcabi.xml.ClasspathInput
is currently filled with methods which are "//intentionally empty" or return null.Some of them can be properly implemented, some of them I think should throw UnsupportedOperationException.
baseURI
andencoding
can be specified in the constructor when instanciating the class inClasspathResolver.resolveResource
:Then the getters and setters for the 2 can be properly implemented inside
ClasspathInput
.. also,encoding
would be used bygetStringData()
rather than hardcoding "UTF-8" there.throw new UnsupportedOperationException();
getCharacterStream() and getByteStream()
should remain as they are or should return a mock of Reader/inputStream - they cannot throw UnsupportedOperationException since then tests fail (they are evantually called by the XML validators...)I did these changes and the build was successfull.
The text was updated successfully, but these errors were encountered: