}
if (styleSheet != null) {
// TODO nick - handle encoding
String encoding = ctx.getExternalContext().getResponseCharacterEncoding();
CSSVisitorImpl cssVisitor = new CSSVisitorImpl(ctx);
cssVisitor.setEncoding(encoding != null ? encoding : "UTF-8");
cssVisitor.visitStyleSheet(styleSheet);
String cssText = cssVisitor.getCSSText();
return new ByteArrayInputStream(cssText.getBytes(cssVisitor.getEncoding()));
} else {
if (!ctx.isProjectStage(ProjectStage.Production)) {
LOGGER.info(MessageFormat.format(NULL_STYLESHEET, getLibraryName(), getResourceName()));
}
return null;