matthiasblaesing commented on code in PR #6118:
URL: https://github.com/apache/netbeans/pull/6118#discussion_r1241271894
##########
enterprise/web.core/src/org/netbeans/modules/web/wizards/AttrDialog.java:
##########
@@ -91,24 +91,24 @@ private void initComponents() {//GEN-BEGIN:initComponents
jLabel2.setDisplayedMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/web/wizards/Bundle").getString("A11Y_AttrType_mnem").charAt(0));
jLabel2.setLabelFor(jComboBox1);
- jLabel2.setText(org.openide.util.NbBundle.getMessage(AttrDialog.class,
"LBL_AttrType"));
+ jLabel2.setText(org.openide.util.NbBundle.getMessage(AttrDialog.class,
"LBL_AttrType")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 1;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(0, 6, 6, 0);
add(jLabel2, gridBagConstraints);
-
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(6, 6, 6, 0);
add(jTextField1, gridBagConstraints);
-
jTextField1.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/web/wizards/Bundle").getString("LBL_AttrName"));
+ java.util.ResourceBundle bundle =
java.util.ResourceBundle.getBundle("org/netbeans/modules/web/wizards/Bundle");
// NOI18N
Review Comment:
How was this code changed? This does not look like changes done with the
Form editor, but this is a guarded section, so did you manually change this
code outside NetBeans?
##########
enterprise/web.core/src/org/netbeans/modules/web/jspcompiler/SmapResolver.java:
##########
@@ -318,10 +319,10 @@ public boolean isResolved() {
/**
* get all the filenames in the SMAP
*/
- public Map getFileNames() {
- Hashtable h = new Hashtable(fsection.size());
- Collection c = fsection.values();
- Iterator i = c.iterator();
+ public Map<Integer, String> getFileNames() {
+ Map<Integer, String> h = new HashMap<>(fsection.size());
Review Comment:
This changes the semantic of the returned map. Is this a safe refactoring?
Where is this map used?
##########
enterprise/web.core/src/org/netbeans/modules/web/jspcompiler/SmapResolver.java:
##########
@@ -333,7 +334,7 @@ public Map getFileNames() {
* get primary jsp filename
*/
public String getPrimaryJspFileName() {
- TreeMap tm = new TreeMap(fsection);
+ TreeMap tm = new TreeMap<>(fsection);
Review Comment:
`fsection` is a `HashTable<String,String>`, why not make the result a
`TreeMap<String,String>`, type `o` correctly to `String` and remove the cast in
line 339
##########
enterprise/web.core/src/org/netbeans/modules/web/core/palette/items/IfCustomizer.java:
##########
@@ -188,10 +193,14 @@ private void initComponents() {
getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(IfCustomizer.class,
"ACSD_If_Dialog")); // NOI18N
}// </editor-fold>//GEN-END:initComponents
+
+ private void jComboBox2ActionPerformed(java.awt.event.ActionEvent evt)
{//GEN-FIRST:event_jComboBox2ActionPerformed
+ // TODO add your handling code here:
+ }//GEN-LAST:event_jComboBox2ActionPerformed
Review Comment:
Why?
##########
enterprise/web.core/src/org/netbeans/modules/web/core/jsploader/JspDataObject.java:
##########
@@ -385,7 +371,7 @@ private void checkRefreshServlet() {
}
// editor
- if ((oldServlet == null)/*&&(servletDataObject != null)*/) {
+ if ((oldServlet == null)) {
} else {
Review Comment:
At least the double bracing should be removed.
```suggestion
if (oldServlet != null) {
```
##########
enterprise/web.core/src/org/netbeans/modules/web/core/palette/items/IfCustomizer.java:
##########
@@ -159,6 +159,11 @@ private void initComponents() {
jLabel2.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(IfCustomizer.class,
"ACSN_If_Variable")); // NOI18N
jLabel2.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(IfCustomizer.class,
"ACSD_If_Variable")); // NOI18N
+ jComboBox2.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ jComboBox2ActionPerformed(evt);
+ }
+ });
Review Comment:
Why?
--
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.
To unsubscribe, e-mail: [email protected]
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