Class SemicolonResourceContentAnnotator

java.lang.Object
com.atlassian.plugin.webresource.impl.annotators.ResourceContentAnnotator
com.atlassian.plugin.webresource.impl.annotators.SemicolonResourceContentAnnotator

public class SemicolonResourceContentAnnotator extends ResourceContentAnnotator
Prepend and append a semicolon.

If a JavaScript file follows another that doesn't end with a semicolon, when it's batched, it's possible for the semantics of the JavaScript to change. Consider the following:

// FILE ONE.js
 console.log("Loading...")

 // FILE TWO.js
 (function () {})()
When batched, it's turned into:
console.log("Loading...")(function () {})()
(Notice that the result of `console.log` is being *executed* with `function () {}` passed in as an argument. This means you'll get an exception like this:
TypeError: undefined is not a function
This is a stateless implementation of the ResourceContentAnnotator that will write a semicolon before and after each resource.
Since:
3.1.1