Source:
public void visit(RasterSymbolizer rs) { ColorMapUtilities.ensureNonNull("RasterSymbolizer", rs); CoverageProcessingNode currNode; CoverageProcessingNode prevNode = this.getSource(0); final ChannelSelectionNode csNode = new ChannelSelectionNode(); currNode = csNode; currNode.addSource(prevNode); prevNode = currNode; final ChannelSelection cs = rs.getChannelSelection(); csNode.visit(cs); final ColorMapNode cmNode = new ColorMapNode(this.getHints()); currNode = cmNode; currNode.addSource(prevNode); prevNode.addSink(currNode); prevNode = currNode; final ColorMap cm = rs.getColorMap(); cmNode.visit(cm); final ContrastEnhancementNode ceNode = new ContrastEnhancementNode(this.getHints()); currNode = ceNode; currNode.addSource(prevNode); prevNode.addSink(currNode); prevNode = currNode; final ContrastEnhancement ce = rs.getContrastEnhancement(); ceNode.visit(ce); final ShadedReliefNode srNode = new ShadedReliefNode(this.getHints()); currNode = srNode; boolean applyShadedRelief = !Double.isNaN(srNode.getReliefFactor()); boolean applyContrastEnhancement = ceNode.getType() != null; if (applyShadedRelief && applyContrastEnhancement) { throw new IllegalArgumentException( "ContrastEnhancement and ShadedRelief can't be applied at the same time. "); } if (applyShadedRelief) { currNode.addSource(prevNode); prevNode.addSink(currNode); setSink(currNode); final ShadedRelief sr = rs.getShadedRelief(); srNode.visit(sr); } else { setSink(prevNode); } final Expression op = rs.getOpacity(); if (op != null) { final Number number = (Number) op.evaluate(null, Float.class); if (number != null) { opacity = number.floatValue(); } } }

Target:
public void visit(RasterSymbolizer rs) { ColorMapUtilities.ensureNonNull("RasterSymbolizer", rs); CoverageProcessingNode currNode; CoverageProcessingNode prevNode = this.getSource(0); final ChannelSelectionNode csNode = new ChannelSelectionNode(); currNode = csNode; currNode.addSource(prevNode); prevNode = currNode; final ChannelSelection cs = rs.getChannelSelection(); csNode.visit(cs); final ColorMapNode cmNode = new ColorMapNode(this.getHints()); currNode = cmNode; currNode.addSource(prevNode); prevNode.addSink(currNode); prevNode = currNode; final ColorMap cm = rs.getColorMap(); cmNode.visit(cm); final ContrastEnhancementNode ceNode = new ContrastEnhancementNode(this.getHints()); currNode = ceNode; currNode.addSource(prevNode); prevNode.addSink(currNode); prevNode = currNode; final ContrastEnhancement ce = rs.getContrastEnhancement(); ceNode.visit(ce); final ShadedReliefNode srNode = new ShadedReliefNode(this.getHints()); final ShadedRelief sr = rs.getShadedRelief(); srNode.visit(sr); currNode = srNode; boolean applyShadedRelief = !Double.isNaN(srNode.getReliefFactor()); boolean applyContrastEnhancement = ceNode.getType() != null; if (applyShadedRelief && applyContrastEnhancement) { throw new IllegalArgumentException( "ContrastEnhancement and ShadedRelief can't be applied at the same time. "); } if (applyShadedRelief) { currNode.addSource(cmNode); prevNode.addSink(currNode); setSink(currNode); } else { setSink(prevNode); } final Expression op = rs.getOpacity(); if (op != null) { final Number number = (Number) op.evaluate(null, Float.class); if (number != null) { opacity = number.floatValue(); } } }