git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/2] userdiff: support Java try keyword

From
Sup Yut Sum <ch3cooli@gmail.com>
Date
Jun 2, 2014, 04:13 UTC
Message-ID
<1401682405-3319-2-git-send-email-ch3cooli@gmail.com>
In-Reply-To
<1401682405-3319-1-git-send-email-ch3cooli@gmail.com>

try keyword is enhanced in Java 7, see try-with-resources Statement try (XX yy = new XX()) { } catch (Exception e){ }

Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com>
---
 userdiff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/userdiff.c b/userdiff.c
index 96eda6c..49e898b 100644
--- a/userdiff.c
+++ b/userdiff.c
@@ -39,7 +39,7 @@ IPATTERN("fortran",
 PATTERNS("html", "^[ \t]*(<[Hh][1-6][ \t].*>.*)$",
 	 "[^<>= \t]+"),
 PATTERNS("java",
-	 "!^[ \t]*(catch|do|for|if|instanceof|new|return|switch|throw|while)\n"
+	 "!^[ \t]*(try|catch|do|for|if|instanceof|new|return|switch|throw|while)\n"
 	 "^[ \t]*(([A-Za-z_][A-Za-z_0-9]*[ \t]+)+[A-Za-z_][A-Za-z_0-9]*[ \t]*\\([^;]*)$",
 	 /* -- */
 	 "[a-zA-Z_][a-zA-Z0-9_]*"
-- 
1.9.1
Previous: Sup Yut SumNext: Junio C Hamano
Message 2 of 7 in “userdiff: support C# async methods and correct C# keywords”
  1. 1/2 userdiff: support C# async methods and correct C# keywordsSup Yut Sum, Jun 2, 2014
  2. 2/2 userdiff: support Java try keywordSup Yut Sum, Jun 2, 2014
  3. Junio C HamanoJun 2, 2014
  4. Junio C HamanoJun 5, 2014
  5. Steve HoelzerJun 6, 2014
  6. Junio C HamanoJun 6, 2014
  7. Steve HoelzerJun 7, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.