Skip to content

Commit e4b4427

Browse files
authored
Backport NB23 patch 7390 to fix the Exception template (#247)
In NB23, [patch #7390](apache/netbeans/pull/7390) fixed the regression where the newly created exception from template did not extend Exception, thereby failing to compile. This temporarily backports the fix until NB23 is incorporated. Signed-off-by: Siddharth Srinivasan <[email protected]>
1 parent 6310a3b commit e4b4427

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

build.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
patches/7368.diff
4141
patches/7370.diff
4242
patches/7382.diff
43+
patches/7390.diff
4344
patches/7491-preliminary.diff
4445
patches/7497.diff
4546
patches/7548_source-1.8.diff

patches/7390.diff

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/java/java.project.ui/src/org/netbeans/modules/java/project/ui/resources/Exception.java.template b/java/java.project.ui/src/org/netbeans/modules/java/project/ui/resources/Exception.java.template
2+
index ab05caa21d2e..bdccca88f8e3 100644
3+
--- a/java/java.project.ui/src/org/netbeans/modules/java/project/ui/resources/Exception.java.template
4+
+++ b/java/java.project.ui/src/org/netbeans/modules/java/project/ui/resources/Exception.java.template
5+
@@ -33,7 +33,7 @@ import ${interface};
6+
</#list>
7+
<#assign implementation = "${implementation}"?remove_ending(", ")>
8+
</#if>
9+
-public class ${name}<#if extension?? && extension != ""> extends ${extension}</#if><#if implementation?? && implementation != ""> implements ${implementation}</#if> {
10+
+public class ${name}<#if extension?? && extension != ""> extends ${extension}<#else> extends Exception</#if><#if implementation?? && implementation != ""> implements ${implementation}</#if> {
11+
12+
/**
13+
* Creates a new instance of <code>${name}</code> without detail message.

0 commit comments

Comments
 (0)