tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: svn commit: r1044729 - in /tomcat/trunk: java/org/apache/tomcat/jni/Library.java res/checkstyle/org-import-control.xml
Date Sun, 12 Dec 2010 13:05:46 GMT
On 11 December 2010 21:48,  <markt@apache.org> wrote:
> Author: markt
> Date: Sat Dec 11 21:48:22 2010
> New Revision: 1044729
>
> URL: http://svn.apache.org/viewvc?rev=1044729&view=rev
> Log:
> o.a.tomcat.jni should not have any external dependencies

Maybe document this in the source file?

> OK for o.a.naming to have dependencies
>
> Modified:
>    tomcat/trunk/java/org/apache/tomcat/jni/Library.java
>    tomcat/trunk/res/checkstyle/org-import-control.xml
>
> Modified: tomcat/trunk/java/org/apache/tomcat/jni/Library.java
> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/Library.java?rev=1044729&r1=1044728&r2=1044729&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/tomcat/jni/Library.java (original)
> +++ tomcat/trunk/java/org/apache/tomcat/jni/Library.java Sat Dec 11 21:48:22 2010
> @@ -17,8 +17,6 @@
>
>  package org.apache.tomcat.jni;
>

Could add a note here that external dependencies are not allowed.
[Much easier to spot than an SVN log message in a few years time]

> -import org.apache.tomcat.util.ExceptionUtils;
> -
>  /** Library
>  *
>  * @author Mladen Turk
> @@ -44,8 +42,13 @@ public final class Library {
>                 System.loadLibrary(NAMES[i]);
>                 loaded = true;
>             }
> -            catch (Throwable e) {
> -                ExceptionUtils.handleThrowable(e);
> +            catch (Throwable t) {
> +                if (t instanceof ThreadDeath) {
> +                    throw (ThreadDeath) t;
> +                }
> +                if (t instanceof VirtualMachineError) {
> +                    throw (VirtualMachineError) t;
> +                }
>                 String name = System.mapLibraryName(NAMES[i]);
>                 String path = System.getProperty("java.library.path");
>                 String sep = System.getProperty("path.separator");
> @@ -53,12 +56,12 @@ public final class Library {
>                 for (int j=0; j<paths.length; j++) {
>                     java.io.File fd = new java.io.File(paths[j] , name);
>                     if (fd.exists()) {
> -                        e.printStackTrace();
> +                        t.printStackTrace();
>                     }
>                 }
>                 if ( i > 0)
>                     err += ", ";
> -                err +=  e.getMessage();
> +                err +=  t.getMessage();
>             }
>             if (loaded)
>                 break;
>
> Modified: tomcat/trunk/res/checkstyle/org-import-control.xml
> URL: http://svn.apache.org/viewvc/tomcat/trunk/res/checkstyle/org-import-control.xml?rev=1044729&r1=1044728&r2=1044729&view=diff
> ==============================================================================
> --- tomcat/trunk/res/checkstyle/org-import-control.xml (original)
> +++ tomcat/trunk/res/checkstyle/org-import-control.xml Sat Dec 11 21:48:22 2010
> @@ -72,7 +72,6 @@
>     <allow pkg="javax.mail"/>
>     <allow pkg="javax.wsdl"/>
>     <allow pkg="org.apache.naming"/>
> -    <!-- To remove? -->
>     <allow class="org.apache.catalina.util.RequestUtil"/>
>     <allow class="org.apache.tomcat.util.http.FastHttpDateFormat"/>
>   </subpackage>
> @@ -81,10 +80,7 @@
>     <subpackage name="buildutil">
>       <allow pkg="org.apache.tools.ant"/>
>     </subpackage>
> -    <subpackage name="jni">
> -      <!-- To remove? -->
> -      <allow class="org.apache.tomcat.util.ExceptionUtils"/>
> -    </subpackage>
> +    <subpackage name="jni"/>
>     <subpackage name="util">
>       <allow pkg="org.apache.juli"/>
>       <allow pkg="org.apache.tomcat.jni"/>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message