mklaehn commented on a change in pull request #2556:
URL: https://github.com/apache/netbeans/pull/2556#discussion_r528562470
##########
File path:
java/ant.debugger/src/org/netbeans/modules/ant/debugger/AntDebugger.java
##########
@@ -306,9 +306,8 @@ private void stopHere(AntEvent event) {
updateUI();
currentFile = event.getScriptLocation();
// update variable values
- Set properties = event.getPropertyNames ();
- variables = (String[]) properties.toArray
- (new String [properties.size ()]);
+ Set<String> properties = event.getPropertyNames();
+ variables = (String[])properties.toArray(new String
[properties.size()]);
Review comment:
Redundant cast after change
```suggestion
variables = properties.toArray(new String [properties.size()]);
```
##########
File path: ide/xsl/src/org/netbeans/modules/xsl/grammar/XSLGrammarQuery.java
##########
@@ -136,33 +136,33 @@ private static Map getElementDecls() {
// Commonly used variables
Set emptySet = new TreeSet();
String spaceAtt = "xml:space"; // NOI18N
- Set tmpSet;
+ Set<String> tmpSet;
////////////////////////////////////////////////
// Initialize common sets
- Set charInstructions = new TreeSet(Arrays.asList(new
String[]{"apply-templates", // NOI18N
+ Set<String> charInstructions = new
TreeSet<>(Arrays.<String>asList(new String[]{"apply-templates", // NOI18N
"call-template","apply-imports","for-each","value-of", // NOI18N
"copy-of","number","choose","if","text","copy", // NOI18N
"variable","message","fallback"})); // NOI18N
- Set instructions = new TreeSet(charInstructions);
- instructions.addAll(Arrays.asList(new
String[]{"processing-instruction", // NOI18N
+ Set<String> instructions = new TreeSet<>(charInstructions);
+ instructions.addAll(Arrays.<String>asList(new
String[]{"processing-instruction", // NOI18N
Review comment:
inferrable type informations
```suggestion
instructions.addAll(Arrays.asList(new
String[]{"processing-instruction", // NOI18N
```
strictly speaking the array creation is not needed as well
##########
File path: ide/xsl/src/org/netbeans/modules/xsl/grammar/XSLGrammarQuery.java
##########
@@ -136,33 +136,33 @@ private static Map getElementDecls() {
// Commonly used variables
Set emptySet = new TreeSet();
String spaceAtt = "xml:space"; // NOI18N
- Set tmpSet;
+ Set<String> tmpSet;
////////////////////////////////////////////////
// Initialize common sets
- Set charInstructions = new TreeSet(Arrays.asList(new
String[]{"apply-templates", // NOI18N
+ Set<String> charInstructions = new
TreeSet<>(Arrays.<String>asList(new String[]{"apply-templates", // NOI18N
Review comment:
inferrable type informations
```suggestion
Set<String> charInstructions = new TreeSet<>(Arrays.asList(new
String[]{"apply-templates", // NOI18N
```
strictly speaking the array creation is not needed as well
##########
File path: ide/xsl/src/org/netbeans/modules/xsl/grammar/XSLGrammarQuery.java
##########
@@ -365,7 +365,7 @@ private static Set getTemplate() {
private static Set getXslFunctions() {
if (xslFunctions == null) {
- xslFunctions = new TreeSet(Arrays.asList(new String[]{
+ xslFunctions = new TreeSet<>(Arrays.<String>asList(new String[]{
Review comment:
inferrable type informations
```suggestion
xslFunctions = new TreeSet<>(Arrays.asList(new String[]{
```
strictly speaking the array creation is not needed as well
##########
File path: ide/xsl/src/org/netbeans/modules/xsl/grammar/XSLGrammarQuery.java
##########
@@ -136,33 +136,33 @@ private static Map getElementDecls() {
// Commonly used variables
Set emptySet = new TreeSet();
String spaceAtt = "xml:space"; // NOI18N
- Set tmpSet;
+ Set<String> tmpSet;
////////////////////////////////////////////////
// Initialize common sets
- Set charInstructions = new TreeSet(Arrays.asList(new
String[]{"apply-templates", // NOI18N
+ Set<String> charInstructions = new
TreeSet<>(Arrays.<String>asList(new String[]{"apply-templates", // NOI18N
"call-template","apply-imports","for-each","value-of", // NOI18N
"copy-of","number","choose","if","text","copy", // NOI18N
"variable","message","fallback"})); // NOI18N
- Set instructions = new TreeSet(charInstructions);
- instructions.addAll(Arrays.asList(new
String[]{"processing-instruction", // NOI18N
+ Set<String> instructions = new TreeSet<>(charInstructions);
+ instructions.addAll(Arrays.<String>asList(new
String[]{"processing-instruction", // NOI18N
"comment","element","attribute"})); // NOI18N
- Set charTemplate = charInstructions; // We don't care about PCDATA
+ Set<String> charTemplate = charInstructions; // We don't care
about PCDATA
- template = new TreeSet(instructions);
+ template = new TreeSet<>(instructions);
template.add(resultElements);
- Set topLevel = new TreeSet(Arrays.asList(new
String[]{"import","include","strip-space", // NOI18N
+ Set<String> topLevel = new TreeSet<>(Arrays.<String>asList(new
String[]{"import","include","strip-space", // NOI18N
Review comment:
inferrable type informations
```suggestion
Set<String> topLevel = new TreeSet<>(Arrays.asList(new
String[]{"import","include","strip-space", // NOI18N
```
strictly speaking the array creation is not needed as well
##########
File path: ide/xsl/src/org/netbeans/modules/xsl/grammar/XSLGrammarQuery.java
##########
@@ -378,7 +378,7 @@ private static Set getXslFunctions() {
private static Set getXPathAxes() {
if (xpathAxes == null) {
- xpathAxes = new TreeSet(Arrays.asList(new String[]{"ancestor::",
"ancestor-or-self::", // NOI18N
+ xpathAxes = new TreeSet<>(Arrays.<String>asList(new
String[]{"ancestor::", "ancestor-or-self::", // NOI18N
Review comment:
inferrable type informations
```suggestion
xpathAxes = new TreeSet<>(Arrays.asList(new
String[]{"ancestor::", "ancestor-or-self::", // NOI18N
```
strictly speaking the array creation is not needed as well
##########
File path: ide/xsl/src/org/netbeans/modules/xsl/grammar/XSLGrammarQuery.java
##########
@@ -136,33 +136,33 @@ private static Map getElementDecls() {
// Commonly used variables
Set emptySet = new TreeSet();
String spaceAtt = "xml:space"; // NOI18N
- Set tmpSet;
+ Set<String> tmpSet;
////////////////////////////////////////////////
// Initialize common sets
- Set charInstructions = new TreeSet(Arrays.asList(new
String[]{"apply-templates", // NOI18N
+ Set<String> charInstructions = new
TreeSet<>(Arrays.<String>asList(new String[]{"apply-templates", // NOI18N
"call-template","apply-imports","for-each","value-of", // NOI18N
"copy-of","number","choose","if","text","copy", // NOI18N
"variable","message","fallback"})); // NOI18N
- Set instructions = new TreeSet(charInstructions);
- instructions.addAll(Arrays.asList(new
String[]{"processing-instruction", // NOI18N
+ Set<String> instructions = new TreeSet<>(charInstructions);
+ instructions.addAll(Arrays.<String>asList(new
String[]{"processing-instruction", // NOI18N
"comment","element","attribute"})); // NOI18N
- Set charTemplate = charInstructions; // We don't care about PCDATA
+ Set<String> charTemplate = charInstructions; // We don't care
about PCDATA
- template = new TreeSet(instructions);
+ template = new TreeSet<>(instructions);
template.add(resultElements);
- Set topLevel = new TreeSet(Arrays.asList(new
String[]{"import","include","strip-space", // NOI18N
+ Set<String> topLevel = new TreeSet<>(Arrays.<String>asList(new
String[]{"import","include","strip-space", // NOI18N
"preserve-space","output","key","decimal-format","attribute-set",
// NOI18N
"variable","param","template","namespace-alias"})); // NOI18N
- Set topLevelAttr = new TreeSet(Arrays.asList(new
String[]{"extension-element-prefixes", // NOI18N
+ Set<String> topLevelAttr = new TreeSet(Arrays.<String>asList(new
String[]{"extension-element-prefixes", // NOI18N
Review comment:
inferrable type informations
```suggestion
Set<String> topLevelAttr = new TreeSet(Arrays.asList(new
String[]{"extension-element-prefixes", // NOI18N
```
strictly speaking the array creation is not needed as well
##########
File path: ide/xsl/src/org/netbeans/modules/xsl/grammar/XSLGrammarQuery.java
##########
@@ -136,33 +136,33 @@ private static Map getElementDecls() {
// Commonly used variables
Set emptySet = new TreeSet();
String spaceAtt = "xml:space"; // NOI18N
- Set tmpSet;
+ Set<String> tmpSet;
////////////////////////////////////////////////
// Initialize common sets
- Set charInstructions = new TreeSet(Arrays.asList(new
String[]{"apply-templates", // NOI18N
+ Set<String> charInstructions = new
TreeSet<>(Arrays.<String>asList(new String[]{"apply-templates", // NOI18N
"call-template","apply-imports","for-each","value-of", // NOI18N
"copy-of","number","choose","if","text","copy", // NOI18N
"variable","message","fallback"})); // NOI18N
- Set instructions = new TreeSet(charInstructions);
- instructions.addAll(Arrays.asList(new
String[]{"processing-instruction", // NOI18N
+ Set<String> instructions = new TreeSet<>(charInstructions);
+ instructions.addAll(Arrays.<String>asList(new
String[]{"processing-instruction", // NOI18N
"comment","element","attribute"})); // NOI18N
- Set charTemplate = charInstructions; // We don't care about PCDATA
+ Set<String> charTemplate = charInstructions; // We don't care
about PCDATA
- template = new TreeSet(instructions);
+ template = new TreeSet<>(instructions);
template.add(resultElements);
- Set topLevel = new TreeSet(Arrays.asList(new
String[]{"import","include","strip-space", // NOI18N
+ Set<String> topLevel = new TreeSet<>(Arrays.<String>asList(new
String[]{"import","include","strip-space", // NOI18N
"preserve-space","output","key","decimal-format","attribute-set",
// NOI18N
"variable","param","template","namespace-alias"})); // NOI18N
- Set topLevelAttr = new TreeSet(Arrays.asList(new
String[]{"extension-element-prefixes", // NOI18N
+ Set<String> topLevelAttr = new TreeSet(Arrays.<String>asList(new
String[]{"extension-element-prefixes", // NOI18N
"exclude-result-prefixes","id","version",spaceAtt})); // NOI18N
- resultElementAttr = new TreeSet(Arrays.asList(new
String[]{"extension-element-prefixes", // NOI18N
+ resultElementAttr = new TreeSet<>(Arrays.<String>asList(new
String[]{"extension-element-prefixes", // NOI18N
Review comment:
inferrable type informations
```suggestion
resultElementAttr = new TreeSet<>(Arrays.asList(new
String[]{"extension-element-prefixes", // NOI18N
```
strictly speaking the array creation is not needed as well
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists