Re: svn commit: r512491 - /incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/MockServletContext.java
* Jean-Baptiste Quenot: > Author: jbq > Date: Tue Feb 27 15:29:12 2007 > New Revision: 512491 > > URL: http://svn.apache.org/viewvc?view=rev&rev=512491 > Log: > Merged with revision 497650: > > better creation of the tmp/work dir and cleanup > > Modified: > > incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/MockServletContext.java > > Modified: > incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/MockServletContext.java > URL: > http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/MockServletContext.java?view=diff&rev=512491&r1=512490&r2=512491 > == > --- > incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/MockServletContext.java > (original) > +++ > incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/MockServletContext.java > Tue Feb 27 15:29:12 2007 > @@ -27,6 +27,7 @@ > import java.util.Enumeration; > import java.util.HashSet; > import java.util.Set; > +import java.util.UUID; > > import javax.servlet.RequestDispatcher; > import javax.servlet.Servlet; > @@ -106,6 +107,58 @@ > mimeTypes.put("gif", "image/gif"); > mimeTypes.put("jpg", "image/jpeg"); > mimeTypes.put("png", "image/png"); > + > + // Set ServletContext temp dir > + setAttribute("javax.servlet.context.tempdir", > createTempDir("wicket" + UUID.randomUUID())); > + } There's something I don't understand: why neither Eclipse nor "mvn -Pjdk1.4 clean test" in wicket-parent prevent me from introducing Java 1.5-specific features? -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/
Re: svn commit: r512491 - /incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/MockServletContext.java
I don't know about that maven option, but if you check out the project from svn with the project files (which are custom) it should prevent you adding > 1.4 code. Eelco On 2/27/07, Jean-Baptiste Quenot <[EMAIL PROTECTED]> wrote: * Jean-Baptiste Quenot: > Author: jbq > Date: Tue Feb 27 15:29:12 2007 > New Revision: 512491 > > URL: http://svn.apache.org/viewvc?view=rev&rev=512491 > Log: > Merged with revision 497650: > > better creation of the tmp/work dir and cleanup > > Modified: > incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/MockServletContext.java > > Modified: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/MockServletContext.java > URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/MockServletContext.java?view=diff&rev=512491&r1=512490&r2=512491 > == > --- incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/MockServletContext.java (original) > +++ incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/MockServletContext.java Tue Feb 27 15:29:12 2007 > @@ -27,6 +27,7 @@ > import java.util.Enumeration; > import java.util.HashSet; > import java.util.Set; > +import java.util.UUID; > > import javax.servlet.RequestDispatcher; > import javax.servlet.Servlet; > @@ -106,6 +107,58 @@ > mimeTypes.put("gif", "image/gif"); > mimeTypes.put("jpg", "image/jpeg"); > mimeTypes.put("png", "image/png"); > + > + // Set ServletContext temp dir > + setAttribute("javax.servlet.context.tempdir", createTempDir("wicket" + UUID.randomUUID())); > + } There's something I don't understand: why neither Eclipse nor "mvn -Pjdk1.4 clean test" in wicket-parent prevent me from introducing Java 1.5-specific features? -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/
Re: svn commit: r512491 - /incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/MockServletContext.java
* Eelco Hillenius: > I don't know about that maven option, but if you check out the > project from svn with the project files (which are custom) it > should prevent you adding > 1.4 code. I already have 1.4 compliance level in the project. -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/
Re: svn commit: r512491 - /incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/MockServletContext.java
I already have 1.4 compliance level in the project. That *and* in the libraries section you should set JRE system library to 'execution environment JSE-1.4 (JVM 1.4). Eelco
Re: svn commit: r512491 - /incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/MockServletContext.java
* Eelco Hillenius: > > I already have 1.4 compliance level in the project. > > That *and* in the libraries section you should set JRE system > library to 'execution environment JSE-1.4 (JVM 1.4). I have J2SE-1.4, but pointing to my one and only JDK: 1.5. Shall I install JDK 1.4 as well? -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/
Re: svn commit: r512491 - /incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/MockServletContext.java
eclipse doesnt catch this, neither does javac i dont think :| they catch generics and other language constructs, but you can still import classes like stringbuilder -igor On 2/27/07, Jean-Baptiste Quenot <[EMAIL PROTECTED]> wrote: * Eelco Hillenius: > > I already have 1.4 compliance level in the project. > > That *and* in the libraries section you should set JRE system > library to 'execution environment JSE-1.4 (JVM 1.4). I have J2SE-1.4, but pointing to my one and only JDK: 1.5. Shall I install JDK 1.4 as well? -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/
Re: svn commit: r512491 - /incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/MockServletContext.java
On 2/27/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: eclipse doesnt catch this, neither does javac i dont think :| they catch generics and other language constructs, but you can still import classes like stringbuilder Not if you use the JDK 1.4 lib as the syslib of your project. Which is why that project file is committed like that. Eelco
Re: svn commit: r512491 - /incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/MockServletContext.java
yes if you have the actual 1.4jdk installed :) but i bet a lot of people dont -igor On 2/27/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: On 2/27/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > eclipse doesnt catch this, neither does javac i dont think :| they catch > generics and other language constructs, but you can still import classes > like stringbuilder Not if you use the JDK 1.4 lib as the syslib of your project. Which is why that project file is committed like that. Eelco
Re: svn commit: r512491 - /incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/MockServletContext.java
> eclipse doesnt catch this, neither does javac i dont think :| they catch > generics and other language constructs, but you can still import classes > like stringbuilder Not if you use the JDK 1.4 lib as the syslib of your project. Which is why that project file is committed like that. Or maybe not. Just tested it and indeed it doesn't catch it. Weak! I guess it could work if you set the default JDK to 1.4. Or it might be a bug (can't think why this would be allowed). Eelco
Re: svn commit: r512491 - /incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/MockServletContext.java
On 2/28/07, Jean-Baptiste Quenot <[EMAIL PROTECTED]> wrote: * Eelco Hillenius: > > I already have 1.4 compliance level in the project. > > That *and* in the libraries section you should set JRE system > library to 'execution environment JSE-1.4 (JVM 1.4). I have J2SE-1.4, but pointing to my one and only JDK: 1.5. Shall I install JDK 1.4 as well? I have both 1.5 and 1.4 installed for the same reason. I think we can conclude that 1.5 can't be used to ensure that 1.4 projects are clean. We have talked about it before with the build server. Frank