river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter <j...@zeus.net.au>
Subject Re: svn commit: r1483062 - in /river/jtsk/skunk/surrogate: nbproject/project.properties src/org/apache/river/container/classloading/VirtualFileSystemClassLoader.java
Date Thu, 16 May 2013 14:25:39 GMT
Cool, so you were previously compiling against trunk, where Security supports generics :)

The important thing about generics and remote code is don't use generics across runtime boundaries.

In other words, don't use generics in service api, it'll blow up unexpectedly at runtime due
to erasure.

Cheers,

Peter.

----- Original message -----
> Author: gtrasuk
> Date: Wed May 15 20:09:50 2013
> New Revision: 1483062
>
> URL: http://svn.apache.org/r1483062
> Log:
> Patch VirtualFileSystemClassLoader to work with River 2.2.1 (remove genericized
> use of Security.doAsPrivileged()).
>
> Modified:
>        river/jtsk/skunk/surrogate/nbproject/project.properties
>     
> river/jtsk/skunk/surrogate/src/org/apache/river/container/classloading/VirtualFileSystemClassLoader.java
>
> Modified: river/jtsk/skunk/surrogate/nbproject/project.properties
> URL:
> http://svn.apache.org/viewvc/river/jtsk/skunk/surrogate/nbproject/project.properties?rev=1483062&r1=1483061&r2=1483062&view=diff
> ==============================================================================
> --- river/jtsk/skunk/surrogate/nbproject/project.properties (original) +++
> river/jtsk/skunk/surrogate/nbproject/project.properties Wed May 15 20:09:50 2013
> @@ -46,6 +46,7 @@ javac.processorpath=\          ${javac.classpath}:\
>          ${libs.JavaCC.classpath}:\
>          ${libs.jaxb.classpath}
> +javac.profile=
>  javac.source=1.6
>  javac.target=1.6
>  javac.test.classpath=\
>
> Modified:
> river/jtsk/skunk/surrogate/src/org/apache/river/container/classloading/VirtualFileSystemClassLoader.java
> URL:
> http://svn.apache.org/viewvc/river/jtsk/skunk/surrogate/src/org/apache/river/container/classloading/VirtualFileSystemClassLoader.java?rev=1483062&r1=1483061&r2=1483062&view=diff
> ==============================================================================
> ---
> river/jtsk/skunk/surrogate/src/org/apache/river/container/classloading/VirtualFileSystemClassLoader.java
> (original) +++
> river/jtsk/skunk/surrogate/src/org/apache/river/container/classloading/VirtualFileSystemClassLoader.java
> Wed May 15 20:09:50 2013 @@ -116,7 +116,7 @@ public class
> VirtualFileSystemClassLoade          @Override          public URL findResource(final
> String name) {                  try { -                      return
Security.doPrivileged(new
> PrivilegedExceptionAction<URL>() { +                      return (URL)
> Security.doPrivileged(new PrivilegedExceptionAction<URL>() {             
                     
> @Override                                  public URL run() throws Exception
{ @@ -134,7 +134,7
> @@ public class VirtualFileSystemClassLoade          @Override
>          public Enumeration<URL> findResources(final String name) throws IOException
> { 
> -              Enumeration result =
> +              Enumeration result = (Enumeration)
>                                  Security.doPrivileged(new PrivilegedAction<Enumeration>()
{
> 
>                          public Enumeration run() {
> @@ -200,7 +200,7 @@ public class VirtualFileSystemClassLoade
>          @Override
>          protected Class<?> findClass(final String name) throws
> ClassNotFoundException {                  try {
> -                      return Security.doPrivileged(new PrivilegedExceptionAction<Class>()
> { +                      return (Class) Security.doPrivileged(new
> PrivilegedExceptionAction<Class>() { 
>                                  public Class run() throws ClassNotFoundException
{
>                                          String resourceName = classToResourceName(name);
>
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message