Commit 66552916 authored by Jérôme Euzenat's avatar Jérôme Euzenat
Browse files

Fixed some warning about generated servlets

parent 8f216321
Pipeline #506363 passed with stage
in 12 seconds
/**
* $Id: TransmorphTask.java,v 1.2 2003-01-23 16:06:26 triolet Exp $
*
* Transmorpher
*
* Copyright (C) 2001-2002 Fluxmedia and INRIA Rhne-Alpes.
* Copyright (C) 2001-2002, 2022 Fluxmedia and INRIA Rhne-Alpes.
*
* http://www.fluxmedia.fr - http://transmorpher.inrialpes.fr
* https://gitlab.inria.fr/moex/transmorpher
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
......@@ -40,7 +38,7 @@ import org.apache.tools.ant.BuildException;
/**
* A Ant task for Transmorpher
* @author Jrme Euzenat (Jerome.Euzenat@inrialpes.fr)
* @author Jrme Euzenat (Jerome.Euzenat@inria.fr)
* @since SAX 2.0 / jdk 1.2
* This calls for a complete reworking of all the Application directory
*/
......
/*
* $Id: ApplyProcess.java,v 1.5 2003-01-29 15:59:16 triolet Exp $
*
* Transmorpher
*
* Copyright (C) 2001-2002 Fluxmedia and INRIA Rhône-Alpes.
* Copyright (C) INRIA Rhône-Alpes, 2003.
* Copyright (C) INRIA Rhône-Alpes, 2003, 2022.
*
* http://www.fluxmedia.fr - http://transmorpher.inrialpes.fr
* https://gitlab.inria.fr/moex.transmorpher - https://transmorpher.inrialpes.fr
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
......@@ -206,7 +204,7 @@ public class ApplyProcess extends ApplyImpl {
file.writeln(4, "tmCurrentCompositeProcess.addProcess(tmCurrentProcess);");
file.writeln();
// JE: Here we stack the tmCurrentCompositeProcess
file.writeln(4, "tmProcessStack.push((Object)tmCurrentCompositeProcess);");
file.writeln(4, "tmProcessStack.push( tmCurrentCompositeProcess );");
file.writeln(4, "tmCurrentCompositeProcess = (TProcessComposite)tmCurrentProcess;");
file.writeln();
// JE: Change of port names ?
......@@ -225,7 +223,7 @@ public class ApplyProcess extends ApplyImpl {
}
file.writeln(4, "//----------------------- End of ----process body for " + getId() + " ---------------------");
// JE: Here we unstack the tmCurrentCompositeProcess
file.writeln(4, "tmCurrentCompositeProcess = (TProcessComposite)tmProcessStack.pop();");
file.writeln(4, "tmCurrentCompositeProcess = tmProcessStack.pop();");
}//end proc
/**
......
/*
* $Id: Main.java,v 1.5 2003-01-30 15:47:46 triolet Exp $
*
* Transmorpher
*
* Copyright (C) 2001-2002 Fluxmedia and INRIA Rhne-Alpes.
* Copyright (C) INRIA Rhône-Alpes, 2003.
* Copyright (C) INRIA Rhne-Alpes, 2003, 2022.
*
* http://www.fluxmedia.fr - http://transmorpher.inrialpes.fr
* https://gitlab.inria.fr/moex.transmorpher - https://transmorpher.inrialpes.fr
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
......@@ -116,7 +114,7 @@ public class Main extends MainProcess {
*/
public void generateMainHeader(Writer file) throws IOException {
file.writeln(2, "public static void main(String[] argc) throws Exception {");
file.writeln(4, "tmProcessStack = new Stack();");
file.writeln(4, "tmProcessStack = new Stack<TProcessComposite>();");
//iFile.writeln(4,"vSR = new SystemResources();");
}
......@@ -149,7 +147,7 @@ public class Main extends MainProcess {
file.writeln(4, "p.setParameter(\"" + key + "\", \"" + (String)param.getParameter(key) + "\");");
}
file.writeln(4, "p.setParameters(tmParameters);");
file.writeln(4, "tmCurrentCompositeProcess = (TMain)new TMain(p);");
file.writeln(4, "tmCurrentCompositeProcess = new TMain(p);");
for (ListIterator l = getCalls().listIterator(); l.hasNext(); ) {
((Call)l.next()).generateJavaCode(file);
}
......
/*
* $Id: MainProcess.java,v 1.4 2003-01-30 15:47:46 triolet Exp $
*
* Transmorpher
*
* Copyright (C) 2001-2002 Fluxmedia and INRIA Rhne-Alpes.
* Copyright (C) INRIA Rhne-Alpes, 2003.
* Copyright (C) INRIA Rhne-Alpes, 2003, 2022.
*
* http://www.fluxmedia.fr - http://transmorpher.inrialpes.fr
* https://gitlab.inria.fr/moex.transmorpher - https://transmorpher.inrialpes.fr
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
......@@ -108,7 +106,7 @@ public abstract class MainProcess extends fr.fluxmedia.transmorpher.graph.Proces
file.writeln(4, " // global variable for the processFactory");
file.writeln();
file.writeln(4, " // stack of composite processes");
file.writeln(4, "static Stack tmProcessStack = null;");
file.writeln(4, "static Stack<TProcessComposite> tmProcessStack = null;");
file.writeln();
file.writeln(4, " // global variables for attributes and parameters");
// Default values should be that of Transmorpher
......
/*
* $Id: Repeat.java,v 1.4 2003-01-31 15:23:47 triolet Exp $
*
* Transmorpher
*
* Copyright (C) 2001-2002 Fluxmedia and INRIA Rhône-Alpes.
* Copyright (C) INRIA Rhône-Alpes, 2003.
* Copyright (C) INRIA Rhône-Alpes, 2003, 2022.
*
* http://www.fluxmedia.fr - http://transmorpher.inrialpes.fr
* https://gitlab.inria.fr/moex.transmorpher - https://transmorpher.inrialpes.fr
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
......@@ -192,10 +190,10 @@ public class Repeat extends CallImpl {
file.writeln(4, "tmCurrentProcess.setName(\"" + getId() + "\");");
file.writeln();
file.writeln(4, "tmCurrentCompositeProcess.addProcess(tmCurrentProcess);");
file.writeln(4, "tmCurrentCompositeProcess.addProcess( tmCurrentProcess );");
file.writeln();
file.writeln(4, "tmProcessStack.push((Object)tmCurrentCompositeProcess);");
file.writeln(4, "tmProcessStack.push( tmCurrentCompositeProcess);");
file.writeln(4, "tmCurrentCompositeProcess = (TProcessComposite)tmCurrentProcess;");
file.writeln();
......@@ -212,7 +210,7 @@ public class Repeat extends CallImpl {
}
file.writeln(4, "//----------------------- End of repeat body for " + getId() + " ---------------------");
file.writeln(4, "tmCurrentCompositeProcess = (TProcessComposite)tmProcessStack.pop();");
file.writeln(4, "tmCurrentCompositeProcess = tmProcessStack.pop();");
}
......
/*
* $Id: Servlet.java,v 1.10 2003-05-26 15:03:50 triolet Exp $
*
* Transmorpher
*
* Copyright (C) 2001-2002 Fluxmedia and INRIA Rhne-Alpes.
* Copyright (C) INRIA Rhne-Alpes, 2003.
* Copyright (C) INRIA Rhne-Alpes, 2003, 2022.
*
* http://www.fluxmedia.fr - http://transmorpher.inrialpes.fr
* https://gitlab.inria.fr/moex.transmorpher - https://transmorpher.inrialpes.fr
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
......@@ -119,7 +117,9 @@ public class Servlet extends MainProcess {
*@exception IOException When IO errors occur
*/
public void generateClassHeader(Writer file) throws IOException {
file.writeln("public class " + getName() + " extends HttpServlet {");
// Avoid warning
file.writeln("@SuppressWarnings(\"serial\")");
file.writeln("public class " + getName() + " extends HttpServlet {");
}
/**
......@@ -137,7 +137,7 @@ public class Servlet extends MainProcess {
file.writeln(6, "context = config.getServletContext();");
file.writeln(6, "root = context.getRealPath(\"/\");");
//iFile.writeln(6,"vSR= new SystemResources();");
file.writeln(6, "tmProcessStack = new Stack();");
file.writeln(6, "tmProcessStack = new Stack<TProcessComposite>();");
file.writeln(4, "} catch (Exception TransformException) {");
file.writeln(4, "}");
file.writeln(2, "}");
......@@ -191,7 +191,7 @@ public class Servlet extends MainProcess {
file.writeln(8, "servletParameters.setParameter(\"" + key + "\",req.getParameter(\"" + key + "\"));");
file.writeln(6, "};");
}//end for
file.writeln(8, "tmCurrentCompositeProcess = (TServlet)new TServlet(servletParameters);");
file.writeln(8, "tmCurrentCompositeProcess = new TServlet(servletParameters);");
for (ListIterator l = getCalls().listIterator(); l.hasNext(); ) {
((Call)l.next()).generateJavaCode(file);
}
......
/*
* $Id: Transformer.java,v 1.5 2003-03-06 07:40:00 triolet Exp $
*
* Transmorpher
*
* Copyright (C) 2001-2002 Fluxmedia and INRIA Rhne-Alpes.
* Copyright (C) INRIA Rhne-Alpes, 2003.
* Copyright (C) INRIA Rhne-Alpes, 2003, 2022.
*
* http://www.fluxmedia.fr - http://transmorpher.inrialpes.fr
* https://gitlab.inria.fr/moex.transmorpher - https://transmorpher.inrialpes.fr
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
......@@ -127,7 +125,7 @@ public class Transformer extends MainProcess {
// JE: Here, this should not be main but:
file.writeln(2, "public void transform(Source in, Result out){");
//iFile.writeln(2,"public static void main(String[] args){");
file.writeln(4, "tmProcessStack = new Stack();");
file.writeln(4, "tmProcessStack = new Stack<TProcessComposite>();");
//iFile.writeln(4,"vSR = new SystemResources();");
file.writeln();
}
......@@ -169,7 +167,7 @@ public class Transformer extends MainProcess {
String key = (String)e.nextElement();
file.writeln(4, "p.setParameter(\"" + key + "\", \"" + (String)param.getParameter(key) + "\");");
}
file.writeln(4, "tmCurrentCompositeProcess = (TMain)new TMain(p);");
file.writeln(4, "tmCurrentCompositeProcess = new TMain(p);");
for (ListIterator l = getCalls().listIterator(); l.hasNext(); ) {
((Call)l.next()).generateJavaCode(file);
}
......
/**
* $Id: Version.java,v 1.2 2004-02-24 15:08:00 jerome Exp $
*
* Transmorpher
*
* Copyright (C) 2001-2002 Fluxmedia and INRIA Rhône-Alpes.
* Copyright (C) 2003-2004 INRIA Rhône-Alpes.
* Copyright (C) 2003-2004, 2022 INRIA Rhône-Alpes.
*
* http://www.fluxmedia.fr - http://transmorpher.inrialpes.fr
* https://gitlab.inria.fr/moex/transmorpher
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
......@@ -35,9 +33,9 @@ package fr.fluxmedia.transmorpher.utils ;
public interface Version {
public static final String VERSION = "1.0";
public static final String RELEASE = "@VERS@";
public static final String RELEASE = "1.0.7 (git)";
public static final String NAME = "Transmorpher";
public static final String DATE = "@DATE@";
public static final String URL = "http://transmorpher.inrialpes.fr";
public static final String RIGHTS = "(C) FluxMedia & INRIA Rhône-Alpes, 2001-2002\n(C) INRIA Rhône-Alpes, 2003-2004";
public static final String URL = "https://transmorpher.inrialpes.fr";
public static final String RIGHTS = "(C) FluxMedia & INRIA Rhône-Alpes, 2001-2002\n(C) INRIA Rhône-Alpes, 2003-2004, 2022";
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment