Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup HashMap raw type warnings.. #7062

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BradWalker
Copy link
Member

@BradWalker BradWalker commented Feb 12, 2024

This change cleans up the majority of warnings related to HashMap.

   [repeat] /home/bwalker/src/netbeans/ide/xml.core/src/org/netbeans/modules/xml/dtd/grammar/DTDParser.java:130: warning: [rawtypes] found raw type: HashMap
   [repeat]             attrs = new HashMap();
   [repeat]                         ^
   [repeat]   missing type arguments for generic class HashMap<K,V>
   [repeat]   where K,V are type-variables:
   [repeat]     K extends Object declared in class HashMap
   [repeat]     V extends Object declared in class HashMap

There are a few still remaining. Those are in generated code, so not currently possible to easily cleanup.

@BradWalker BradWalker added this to the NB22 milestone Feb 12, 2024
@BradWalker BradWalker self-assigned this Feb 12, 2024
Copy link
Member

@mbien mbien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • this seems to go across the project and therefore needs the ci:all-tests label
  • adding the diamond to the right side without adding generics to the type (left side) doesn't fix anything
  • @Override should not be removed

@BradWalker BradWalker added the ci:all-tests [ci] enable all tests label Feb 13, 2024
This change cleans up the majority of warnings related to HashMap.

       [repeat] /home/bwalker/src/netbeans/ide/xml.core/src/org/netbeans/modules/xml/dtd/grammar/DTDParser.java:130: warning: [rawtypes] found raw type: HashMap
       [repeat]             attrs = new HashMap();
       [repeat]                         ^
       [repeat]   missing type arguments for generic class HashMap<K,V>
       [repeat]   where K,V are type-variables:
       [repeat]     K extends Object declared in class HashMap
       [repeat]     V extends Object declared in class HashMap

There are a few still remaining. Those are in generated code, so not currently possible to easily cleanup.
@BradWalker
Copy link
Member Author

BradWalker commented Feb 13, 2024

Hey @mbien , thanks for the help. I've made all the corrections you requested.

One other thing, I'm still confused about the test failure. Doesn't seem like it related to my changes. I really don't like it when tests fails, for any reason.

@apache apache locked and limited conversation to collaborators Feb 28, 2024
@apache apache unlocked this conversation Feb 28, 2024
@mbien
Copy link
Member

mbien commented Feb 28, 2024

@BradWalker sorry for the delay, for some reason I forgot to come back to this PR. Restarted tests.

@mbien mbien self-requested a review February 28, 2024 21:53
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this interface is in public API I think.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one too

@Override
public void internalStartElement(String elemName, HashMap mapMandatory, HashMap mapAllowed)
public void internalStartElement(String elemName, Map mapMandatory, Map mapAllowed)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

override needs to come back

Comment on lines -983 to +982
@Override
public void internalStartElement(String elemName, HashMap mapMandatory, HashMap mapAllowed)
public void internalStartElement(String elemName, Map mapMandatory, Map mapAllowed)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

override removed

@ebarboni ebarboni modified the milestones: NB22, NB23 Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:all-tests [ci] enable all tests Code cleanup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants