Skip to content
Permalink
Browse files
Add missing '@OverRide' annotations.
  • Loading branch information
garydgregory committed Nov 21, 2020
1 parent f7e1ae7 commit 3709e5882b631db58a55e5d321ae300e60314360
Showing 2 changed files with 12 additions and 0 deletions.
@@ -47,6 +47,7 @@ private void run(final String[] args) {
final Collection<Configurable> configurables = new ArrayList<Configurable>();

final FilesystemAlterationListener listener = new FileChangeListener() {
@Override
public void onStop(final FilesystemAlterationObserver pObserver) {
super.onStop(pObserver);

@@ -61,6 +61,7 @@ public final class ServerPageServlet extends HttpServlet {

private Map<String, HttpServlet> servletsByClassname = new HashMap<String, HttpServlet>();

@Override
public void init() throws ServletException {
super.init();

@@ -73,13 +74,15 @@ public void init() throws ServletException {
private Set<String> newClasses;
private Map<String, HttpServlet> newServletsByClassname;

@Override
public void onStart() {
super.onStart();

newClasses = new HashSet<String>();
newServletsByClassname = new HashMap<String, HttpServlet>(servletsByClassname);
}

@Override
public void onStop() {
super.onStop();

@@ -109,6 +112,7 @@ public void onStop() {
}
}

@Override
public void write(final String pResourceName, final byte[] pResourceData) {
super.write(pResourceName, pResourceData);

@@ -128,13 +132,15 @@ public void write(final String pResourceName, final byte[] pResourceData) {
private final Map<String, byte[]> sources = new HashMap<String, byte[]>();
private final Set<String> resourceToCompile = new HashSet<String>();

@Override
public void onStart(final FilesystemAlterationObserver pObserver) {
super.onStart(pObserver);

resourceToCompile.clear();
}


@Override
public void onFileChange(final File pFile) {
if (pFile.getName().endsWith(".jsp")) {
final String resourceName = ConversionUtils.stripExtension(getSourceNameFromFile(observer, pFile)) + ".java";
@@ -149,6 +155,7 @@ public void onFileChange(final File pFile) {
}


@Override
public void onFileCreate(final File pFile) {
if (pFile.getName().endsWith(".jsp")) {
final String resourceName = ConversionUtils.stripExtension(getSourceNameFromFile(observer, pFile)) + ".java";
@@ -163,6 +170,7 @@ public void onFileCreate(final File pFile) {
}


@Override
public String[] getResourcesToCompile(final FilesystemAlterationObserver pObserver) {
// we only want to compile the jsp pages
final String[] resourceNames = new String[resourceToCompile.size()];
@@ -171,6 +179,7 @@ public String[] getResourcesToCompile(final FilesystemAlterationObserver pObserv
}


@Override
public ResourceReader getReader( final FilesystemAlterationObserver pObserver ) {
return new JspReader(sources, super.getReader(pObserver));
}
@@ -189,6 +198,7 @@ private String convertRequestToServletClassname( final HttpServletRequest reques
return ConversionUtils.stripExtension(path).replace('/', '.');
}

@Override
protected void service(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {

log("Request " + request.getRequestURI());
@@ -232,6 +242,7 @@ protected void service(final HttpServletRequest request, final HttpServletRespon
servlet.service(request, response);
}

@Override
public void destroy() {

fam.stop();

0 comments on commit 3709e58

Please sign in to comment.