[jira] [Created] (NETBEANS-2656) Remove old JDK(5,7) migrator configs under Inspect and Transform

2019-06-09 Thread Reema Taneja (JIRA)
Reema Taneja created NETBEANS-2656:
--

 Summary: Remove old JDK(5,7) migrator configs under Inspect and 
Transform 
 Key: NETBEANS-2656
 URL: https://issues.apache.org/jira/browse/NETBEANS-2656
 Project: NetBeans
  Issue Type: Bug
Reporter: Reema Taneja
Assignee: Reema Taneja


Old JDK migrator options for unsupported releases JDK 5, 7 should be removed. 
JDK 10 configuration should be renamed as JDK11 configuration as no new hints 
added for JDK 11 and it's a LTS release. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[jira] [Updated] (NETBEANS-2516) Warnings hints for Convert rule switch to Traditional switch

2019-06-09 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/NETBEANS-2516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated NETBEANS-2516:
-
Labels: pull-request-available  (was: )

> Warnings hints for Convert rule switch to Traditional switch
> 
>
> Key: NETBEANS-2516
> URL: https://issues.apache.org/jira/browse/NETBEANS-2516
> Project: NetBeans
>  Issue Type: Improvement
>Reporter: vikas kumar prabhakar
>Assignee: vikas kumar prabhakar
>Priority: Major
>  Labels: pull-request-available
>
> Implementation of warning hints for  "Convert rule switch to Traditional 
> switch"
> Use case:
> Actual code:
> public void test(int i){
>  String result;
>  switch(i){
>  case 1 -> System.out.println("One");
>  case 2 -> System.out.println("Two");
>  default -> System.out.println("Default");
>  }
>  }
> Warning Hints : "Convert to traditional switch"
> After Fix:
> public void test(int i){
>  String result;
>  switch(i){
>  case 1 :
>  System.out.println("One");
>  break;
>  case 2 :
>  System.out.println("Two");
>  break;
>  default:
>  System.out.println("Default");
>  break;
>  }
>  }



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[netbeans] branch master updated (fb01691 -> b4f8d19)

2019-06-09 Thread matthiasblaesing
This is an automated email from the ASF dual-hosted git repository.

matthiasblaesing pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git.


from fb01691  [NETBEANS-2621] cleanup generic class iterator
 new 3b86876  Do not run Git integration tests by default
 new 05a0614  Support running AddTest with millisecond resolution of last 
modified time
 new b4f8d19  Merge branch 'pr-932'

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ide/libs.git/nbproject/project.properties |  2 ++
 .../org/netbeans/libs/git/jgit/ConnectionTest.java| 19 +++
 .../org/netbeans/libs/git/jgit/commands/AddTest.java  |  4 ++--
 .../netbeans/libs/git/jgit/commands/CheckoutTest.java | 10 +-
 4 files changed, 32 insertions(+), 3 deletions(-)


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

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[netbeans] 03/03: Merge branch 'pr-932'

2019-06-09 Thread matthiasblaesing
This is an automated email from the ASF dual-hosted git repository.

matthiasblaesing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git

commit b4f8d19733318daff1b3d3fc538a1493b8b02bbe
Merge: fb01691 05a0614
Author: Matthias Bläsing 
AuthorDate: Sun Jun 9 23:19:15 2019 +0200

Merge branch 'pr-932'

 ide/libs.git/nbproject/project.properties |  2 ++
 .../org/netbeans/libs/git/jgit/ConnectionTest.java| 19 +++
 .../org/netbeans/libs/git/jgit/commands/AddTest.java  |  4 ++--
 .../netbeans/libs/git/jgit/commands/CheckoutTest.java | 10 +-
 4 files changed, 32 insertions(+), 3 deletions(-)


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

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[netbeans] 02/03: Support running AddTest with millisecond resolution of last modified time

2019-06-09 Thread matthiasblaesing
This is an automated email from the ASF dual-hosted git repository.

matthiasblaesing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git

commit 05a0614883baa37645eaeea17174cc154094fcd4
Author: Matthias Bläsing 
AuthorDate: Sun Jun 9 22:23:07 2019 +0200

Support running AddTest with millisecond resolution of last modified time
---
 .../test/unit/src/org/netbeans/libs/git/jgit/commands/AddTest.java| 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/ide/libs.git/test/unit/src/org/netbeans/libs/git/jgit/commands/AddTest.java 
b/ide/libs.git/test/unit/src/org/netbeans/libs/git/jgit/commands/AddTest.java
index 6c7e7bc..689908b 100644
--- 
a/ide/libs.git/test/unit/src/org/netbeans/libs/git/jgit/commands/AddTest.java
+++ 
b/ide/libs.git/test/unit/src/org/netbeans/libs/git/jgit/commands/AddTest.java
@@ -527,7 +527,7 @@ public class AddTest extends AbstractGitTestCase {
 DirCacheEntry e = repository.readDirCache().getEntry(link.getName());
 assertEquals(FileMode.SYMLINK, e.getFileMode());
 ObjectId id = e.getObjectId();
-assertEquals(ts, e.getLastModified() / 1000 * 1000);
+assertTrue((ts - 1000) < e.getLastModified() && (ts + 1000) > 
e.getLastModified());
 ObjectReader reader = repository.getObjectDatabase().newReader();
 assertTrue(reader.has(e.getObjectId()));
 byte[] bytes = reader.open(e.getObjectId()).getBytes();
@@ -543,7 +543,7 @@ public class AddTest extends AbstractGitTestCase {
 assertEquals(FileMode.SYMLINK, e2.getFileMode());
 assertEquals(id, e2.getObjectId());
 assertEquals(0, e2.getLength());
-assertEquals(ts, e2.getLastModified() / 1000 * 1000);
+assertTrue((ts - 1000) < e2.getLastModified() && (ts + 1000) > 
e2.getLastModified());
 assertTrue(reader.has(e2.getObjectId()));
 bytes = reader.open(e2.getObjectId()).getBytes();
 assertEquals(path, RawParseUtils.decode(bytes));


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

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[netbeans] 01/03: Do not run Git integration tests by default

2019-06-09 Thread matthiasblaesing
This is an automated email from the ASF dual-hosted git repository.

matthiasblaesing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git

commit 3b8687643a291c53a18811311dbda42f638b9f82
Author: Christian Bourque 
AuthorDate: Mon Oct 1 00:20:46 2018 -0400

Do not run Git integration tests by default
---
 ide/libs.git/nbproject/project.properties |  2 ++
 .../org/netbeans/libs/git/jgit/ConnectionTest.java| 19 +++
 .../netbeans/libs/git/jgit/commands/CheckoutTest.java | 10 +-
 3 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/ide/libs.git/nbproject/project.properties 
b/ide/libs.git/nbproject/project.properties
index 821d146..9bfc317 100644
--- a/ide/libs.git/nbproject/project.properties
+++ b/ide/libs.git/nbproject/project.properties
@@ -25,6 +25,8 @@ 
nbm.homepage=http://netbeans.org/projects/versioncontrol/pages/Git_main
 nbm.module.author=Ondrej Vrabec
 sigtest.gen.fail.on.error=false
 
+test-unit-sys-prop.skip.git.integration.tests=true
+
 test.config.stableBTD.includes=**/*Test.class
 test.config.stableBTD.excludes=\
 **/AddTest.class,\
diff --git 
a/ide/libs.git/test/unit/src/org/netbeans/libs/git/jgit/ConnectionTest.java 
b/ide/libs.git/test/unit/src/org/netbeans/libs/git/jgit/ConnectionTest.java
index 0d62f1e..2d9d124 100644
--- a/ide/libs.git/test/unit/src/org/netbeans/libs/git/jgit/ConnectionTest.java
+++ b/ide/libs.git/test/unit/src/org/netbeans/libs/git/jgit/ConnectionTest.java
@@ -29,6 +29,7 @@ import org.eclipse.jgit.lib.Repository;
 import org.eclipse.jgit.storage.file.FileBasedConfig;
 import org.eclipse.jgit.util.FS;
 import org.eclipse.jgit.util.SystemReader;
+import org.netbeans.junit.Filter;
 import org.netbeans.libs.git.GitClient;
 import org.netbeans.libs.git.GitClientCallback;
 import org.netbeans.libs.git.GitException;
@@ -44,6 +45,24 @@ public class ConnectionTest extends AbstractGitTestCase {
 
 public ConnectionTest (String testName) throws IOException {
 super(testName);
+if (Boolean.getBoolean("skip.git.integration.tests")) {
+Filter filter = new Filter();
+filter.setExcludes(new Filter.IncludeExclude[] {
+new Filter.IncludeExclude("testGitConnection", ""),
+new Filter.IncludeExclude("testHttpConnection", ""),
+new Filter.IncludeExclude("testHttpConnectionPublic", ""),
+new 
Filter.IncludeExclude("testHttpConnectionCredentialsInUri", ""),
+new Filter.IncludeExclude("testHttpConnectionEmptyPassword", 
""),
+new Filter.IncludeExclude("testSshConnectionCredentialsInUri", 
""),
+new 
Filter.IncludeExclude("testSshConnectionCredentialsFromCallback", ""),
+new 
Filter.IncludeExclude("testSshConnectionGITSSH_Issue213394", ""),
+new Filter.IncludeExclude("testSshConnectionPassphrase", ""),
+new 
Filter.IncludeExclude("testSshFetchCredentialsFromCallback", ""),
+new 
Filter.IncludeExclude("testSshConnectionUserInUriPasswordFromCallback", ""),
+new Filter.IncludeExclude("testSshConnectionCanceled", "")
+});
+setFilter(filter);
+}
 }
 
 @Override
diff --git 
a/ide/libs.git/test/unit/src/org/netbeans/libs/git/jgit/commands/CheckoutTest.java
 
b/ide/libs.git/test/unit/src/org/netbeans/libs/git/jgit/commands/CheckoutTest.java
index c1079aa..ace208a 100644
--- 
a/ide/libs.git/test/unit/src/org/netbeans/libs/git/jgit/commands/CheckoutTest.java
+++ 
b/ide/libs.git/test/unit/src/org/netbeans/libs/git/jgit/commands/CheckoutTest.java
@@ -47,6 +47,7 @@ import org.eclipse.jgit.lib.StoredConfig;
 import org.eclipse.jgit.revwalk.RevCommit;
 import org.eclipse.jgit.revwalk.RevWalk;
 import org.eclipse.jgit.storage.file.WindowCacheConfig;
+import org.netbeans.junit.Filter;
 import org.netbeans.libs.git.ApiUtils;
 import org.netbeans.libs.git.GitBranch;
 import org.netbeans.libs.git.GitClient;
@@ -66,9 +67,16 @@ public class CheckoutTest extends AbstractGitTestCase {
 private File workDir;
 private Repository repository;
 private static final String BRANCH = "nova";
-
+
 public CheckoutTest (String testName) throws IOException {
 super(testName);
+if (Boolean.getBoolean("skip.git.integration.tests")) {
+Filter filter = new Filter();
+filter.setExcludes(new Filter.IncludeExclude[] {
+new Filter.IncludeExclude("testLargeFile", ""),
+});
+setFilter(filter);
+}
 }
 
 @Override


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

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[netbeans] branch master updated: [NETBEANS-2621] cleanup generic class iterator

2019-06-09 Thread matthiasblaesing
This is an automated email from the ASF dual-hosted git repository.

matthiasblaesing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
 new fb01691  [NETBEANS-2621] cleanup generic class iterator
fb01691 is described below

commit fb016919734b98643341c01c5f720d205e48ecff
Author: Brad Walker 
AuthorDate: Fri May 31 14:16:49 2019 -0600

[NETBEANS-2621] cleanup generic class iterator

reduce the # of instances of the following error..

   [repeat] /home/bwalker/netbeans-11.0/platform/core.startup/src/org/
 netbeans/core/startup/AutomaticDependencies.java:372: warning: 
[rawtypes] found raw type: Iterator
   [repeat] Iterator it = exclusions.iterator();
   [repeat] ^
   [repeat]   missing type arguments for generic class Iterator
   [repeat]   where E is a type-variable:
   [repeat] E extends Object declared in interface Iterator
---
 .../modules/glassfish/javaee/RunTimeDDCatalog.java |  4 +---
 .../src/org/netbeans/insane/model/InsaneConverter.java | 12 
 .../editor/errorstripe/AnnotationViewDataImpl.java | 10 +++---
 .../modules/java/freeform/JavaProjectGenerator.java|  4 +---
 .../netbeans/core/startup/AutomaticDependencies.java   | 10 --
 .../org/netbeans/swing/etable/ETableColumnModel.java   | 18 ++
 .../src/org/openide/filesystems/MultiFileObject.java   |  6 +-
 7 files changed, 20 insertions(+), 44 deletions(-)

diff --git 
a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/RunTimeDDCatalog.java
 
b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/RunTimeDDCatalog.java
index 8f4fa8f..26d8a85 100644
--- 
a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/RunTimeDDCatalog.java
+++ 
b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/RunTimeDDCatalog.java
@@ -370,9 +370,7 @@ public class RunTimeDDCatalog extends GrammarQueryManager 
implements CatalogRead
 }
 
 public  void fireCatalogListeners() {
-Iterator iter = catalogListeners.iterator();
-while (iter.hasNext()) {
-CatalogListener l = (CatalogListener) iter.next();
+for (CatalogListener l : catalogListeners) {
 l.notifyInvalidate();
 }
 }
diff --git 
a/harness/o.n.insane/src/org/netbeans/insane/model/InsaneConverter.java 
b/harness/o.n.insane/src/org/netbeans/insane/model/InsaneConverter.java
index 871bcc7..e63e4ab 100644
--- a/harness/o.n.insane/src/org/netbeans/insane/model/InsaneConverter.java
+++ b/harness/o.n.insane/src/org/netbeans/insane/model/InsaneConverter.java
@@ -337,16 +337,14 @@ final class InsaneConverter {
 int currentOffset = 4+4+4;
 
 // compute offset of classes
-for (Iterator it = classInfo.values().iterator(); it.hasNext(); ) {
-ClassInfo info = (ClassInfo)it.next();
+for (ClassInfo info : classInfo.values()) {
 currentOffset = info.computeNextOffset(currentOffset);
 }
 
 refsOffset = currentOffset;
 
 // compute offsets of refs
-for (Iterator it = refInfo.values().iterator(); it.hasNext(); ) {
-RefInfo info = (RefInfo)it.next();
+for (RefInfo info : refInfo.values()) {
 currentOffset = info.computeNextOffset(currentOffset);
 }
 
@@ -367,14 +365,12 @@ final class InsaneConverter {
 store.putInt(objsOffset);
 
 // store classes
-for (Iterator it = classInfo.values().iterator(); it.hasNext(); ) {
-ClassInfo info = (ClassInfo)it.next();
+for (ClassInfo info : classInfo.values()) {
 info.storeHeader();
 }
 
 // store refs
-for (Iterator it = refInfo.values().iterator(); it.hasNext(); ) {
-RefInfo info = (RefInfo)it.next();
+for (RefInfo info : refInfo.values()) {
 info.storeHeader();
 }
 
diff --git 
a/ide/editor.errorstripe/src/org/netbeans/modules/editor/errorstripe/AnnotationViewDataImpl.java
 
b/ide/editor.errorstripe/src/org/netbeans/modules/editor/errorstripe/AnnotationViewDataImpl.java
index 29eb50d..b4828a4 100644
--- 
a/ide/editor.errorstripe/src/org/netbeans/modules/editor/errorstripe/AnnotationViewDataImpl.java
+++ 
b/ide/editor.errorstripe/src/org/netbeans/modules/editor/errorstripe/AnnotationViewDataImpl.java
@@ -231,8 +231,7 @@ final class AnnotationViewDataImpl implements 
PropertyChangeListener, Annotation
 }
 
 private void addListenersToStatusProviders() {
-for (Iterator p = statusProviders.iterator(); p.hasNext(); ) {
-UpToDateStatusProvider provider = (UpToDateStatusProvider) 
p.next();
+for (UpToDateStatusProvider provider : statusProviders) {
 
 // 

[jira] [Updated] (NETBEANS-2654) Add debug support for Gradle WebProjects

2019-06-09 Thread Laszlo Kishalmi (JIRA)


 [ 
https://issues.apache.org/jira/browse/NETBEANS-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Laszlo Kishalmi updated NETBEANS-2654:
--
Component/s: projects - Gradle Java EE

> Add debug support for Gradle WebProjects
> 
>
> Key: NETBEANS-2654
> URL: https://issues.apache.org/jira/browse/NETBEANS-2654
> Project: NetBeans
>  Issue Type: Improvement
>  Components: projects - Gradle Java EE
>Reporter: Laszlo Kishalmi
>Assignee: Laszlo Kishalmi
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Gradle Web projects shall support debug action, at least on project level.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[jira] [Updated] (NETBEANS-2655) Gradle debug process always attach the default JDK sources

2019-06-09 Thread Laszlo Kishalmi (JIRA)


 [ 
https://issues.apache.org/jira/browse/NETBEANS-2655?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Laszlo Kishalmi updated NETBEANS-2655:
--
Labels: pull-request-available  (was: )

> Gradle debug process always attach the default JDK sources
> --
>
> Key: NETBEANS-2655
> URL: https://issues.apache.org/jira/browse/NETBEANS-2655
> Project: NetBeans
>  Issue Type: Bug
>Reporter: Laszlo Kishalmi
>Assignee: Laszlo Kishalmi
>Priority: Minor
>  Labels: pull-request-available
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[jira] [Updated] (NETBEANS-2654) Add debug support for Gradle WebProjects

2019-06-09 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/NETBEANS-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated NETBEANS-2654:
-
Labels: pull-request-available  (was: )

> Add debug support for Gradle WebProjects
> 
>
> Key: NETBEANS-2654
> URL: https://issues.apache.org/jira/browse/NETBEANS-2654
> Project: NetBeans
>  Issue Type: Improvement
>Reporter: Laszlo Kishalmi
>Assignee: Laszlo Kishalmi
>Priority: Major
>  Labels: pull-request-available
>
> Gradle Web projects shall support debug action, at least on project level.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[jira] [Created] (NETBEANS-2655) Gradle debug process always attach the default JDK sources

2019-06-09 Thread Laszlo Kishalmi (JIRA)
Laszlo Kishalmi created NETBEANS-2655:
-

 Summary: Gradle debug process always attach the default JDK sources
 Key: NETBEANS-2655
 URL: https://issues.apache.org/jira/browse/NETBEANS-2655
 Project: NetBeans
  Issue Type: Bug
Reporter: Laszlo Kishalmi
Assignee: Laszlo Kishalmi






--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[jira] [Created] (NETBEANS-2654) Add debug support for Gradle WebProjects

2019-06-09 Thread Laszlo Kishalmi (JIRA)
Laszlo Kishalmi created NETBEANS-2654:
-

 Summary: Add debug support for Gradle WebProjects
 Key: NETBEANS-2654
 URL: https://issues.apache.org/jira/browse/NETBEANS-2654
 Project: NetBeans
  Issue Type: Improvement
Reporter: Laszlo Kishalmi
Assignee: Laszlo Kishalmi


Gradle Web projects shall support debug action, at least on project level.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[jira] [Updated] (NETBEANS-2653) Generate toString() with StringBuilder

2019-06-09 Thread Junichi Yamamoto (JIRA)


 [ 
https://issues.apache.org/jira/browse/NETBEANS-2653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Junichi Yamamoto updated NETBEANS-2653:
---
Description: 
Currently, the following toString() is inserted using "insert code" feature:
{code:java}
public class NewClass {
private final String test = "test";
private final String test2 = "test";
private final String test3 = "test";

@Override
public String toString() {
// generate toString() with "+" operator
return "NewClass{" + "test=" + test + ", test2=" + test2 + ", test3=" + 
test3 + '}';
}

}
{code}

Add a check box to the panel for using StringBuilder, then insert the following 
toString(): 
{code:java}
public class NewClass {
private final String test = "test";
private final String test2 = "test";
private final String test3 = "test";

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("NewClass{test=").append(test);
sb.append(", test2=").append(test2);
sb.append(", test3=").append(test3);
sb.append('}');
return sb.toString();
}

}
{code}


  was:
Currently, the following toString() is inserted using "insert code" feature:
{code:java}
public class NewClass {
private final String test = "test";
private final String test2 = "test";
private final String test3 = "test";

@Override
public String toString() {
// generate toString() with "+" operator
return "NewClass{" + "test=" + test + ", test2=" + test2 + ", test3=" + 
test3 + '}';
}

}
{code}

Add a check box to the panel for using StringBuilder, then insert the following 
toString(): 
{code:java}
public class NewClass {
private final String test = "test";
private final String test2 = "test";
private final String test3 = "test";

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("NewClass{");
sb.append("test=").append(test);
sb.append(", ");
sb.append("test2=").append(test2);
sb.append(", ");
sb.append("test3=").append(test3);
sb.append('}');
return sb.toString();
}

}
{code}



> Generate toString() with StringBuilder
> --
>
> Key: NETBEANS-2653
> URL: https://issues.apache.org/jira/browse/NETBEANS-2653
> Project: NetBeans
>  Issue Type: Improvement
>  Components: java - Editor
>Affects Versions: 11.0
>Reporter: Junichi Yamamoto
>Assignee: Junichi Yamamoto
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> Currently, the following toString() is inserted using "insert code" feature:
> {code:java}
> public class NewClass {
> private final String test = "test";
> private final String test2 = "test";
> private final String test3 = "test";
> @Override
> public String toString() {
> // generate toString() with "+" operator
> return "NewClass{" + "test=" + test + ", test2=" + test2 + ", test3=" 
> + test3 + '}';
> }
> }
> {code}
> Add a check box to the panel for using StringBuilder, then insert the 
> following toString(): 
> {code:java}
> public class NewClass {
> private final String test = "test";
> private final String test2 = "test";
> private final String test3 = "test";
> @Override
> public String toString() {
> StringBuilder sb = new StringBuilder();
> sb.append("NewClass{test=").append(test);
> sb.append(", test2=").append(test2);
> sb.append(", test3=").append(test3);
> sb.append('}');
> return sb.toString();
> }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists