Author: rjung
Date: Mon Jan 18 11:30:42 2016
New Revision: 1725237

URL: http://svn.apache.org/viewvc?rev=1725237&view=rev
Log:
Improve a bit the API consistency check script.

Modified:
    tomcat/native/trunk/native/build/api.pl

Modified: tomcat/native/trunk/native/build/api.pl
URL: 
http://svn.apache.org/viewvc/tomcat/native/trunk/native/build/api.pl?rev=1725237&r1=1725236&r2=1725237&view=diff
==============================================================================
--- tomcat/native/trunk/native/build/api.pl (original)
+++ tomcat/native/trunk/native/build/api.pl Mon Jan 18 11:30:42 2016
@@ -237,7 +237,7 @@ sub javaNativeApi {
         # Example declaration
         #public static native long uid(String username, long p)
         #       throws Error;
-        if ($_ =~ /^\s*public\s+([^\(]*)/ && ($type = $1) && $type =~ 
/\snative\s/) {
+        if ($_ =~ /^\s*((public|protected|private)\s+)?([^\(]*)\(/ && ($type = 
$3) && $type =~ /\snative\s/) {
             chomp();
             $signature = $_;
             # Concat next line until signature is complete
@@ -252,7 +252,7 @@ sub javaNativeApi {
 
                 # Normalize return type and method name
                 # Remove unused specifiers
-                $type =~ s/\bpublic\b//g;
+                $type =~ s/\b(public|protected|private)\b//g;
                 $type =~ s/\bnative\b//g;
                 $type =~ s/\bstatic\b//g;
                 # Collapse multiple spaces



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

Reply via email to