Skip to content

Conversation

@BradWalker
Copy link
Member

Cleanup May raw type warnings that look like this:

[repeat] /home/bwalker/src/netbeans/ide/team.commons/src/org/netbeans/modules/bugtracking/commons/AttachmentsPanel.java:353: warning: [rawtypes] found raw type: Map
[repeat] Map attributes = cmp.getFont().getAttributes();
[repeat] ^
[repeat] missing type arguments for generic class Map<K,V>
[repeat] where K,V are type-variables:
[repeat] K extends Object declared in interface Map
[repeat] V extends Object declared in interface Map

Also, some minor code cleanup.


^Add meaningful description above

By opening a pull request you confirm that, unless explicitly stated otherwise, the changes -

  • are all your own work, and you have the right to contribute them.
  • are contributed solely under the terms and conditions of the Apache License 2.0 (see section 5 of the license for more information).

Please make sure (eg. git log) that all commits have a valid name and email address for you in the Author field.

If you're a first time contributor, see the Contributing guidelines for more information.

If you're a committer, please label the PR before pressing "Create pull request" so that the right test jobs can run.

@BradWalker BradWalker added the Code cleanup Label for cleanup done on the Netbeans IDE label Jun 22, 2023
@BradWalker BradWalker added this to the NB19 milestone Jun 22, 2023
@BradWalker BradWalker self-assigned this Jun 22, 2023
@mbien mbien added the ci:all-tests [ci] enable all tests label Jun 22, 2023
@mbien mbien modified the milestones: NB19, NB20 Jul 13, 2023
@neilcsmith-net neilcsmith-net removed this from the NB20 milestone Oct 14, 2023
@neilcsmith-net neilcsmith-net marked this pull request as draft October 14, 2023 09:58
@BradWalker BradWalker added the API Change [ci] enable extra API related tests label Dec 29, 2025
@BradWalker BradWalker force-pushed the cleanup_map_raw_type branch 3 times, most recently from 8b62fa5 to 2135e4c Compare December 29, 2025 14:34
Cleanup May raw type warnings that look like this:

   [repeat] /home/bwalker/src/netbeans/ide/team.commons/src/org/netbeans/modules/bugtracking/commons/AttachmentsPanel.java:353: warning: [rawtypes] found raw type: Map
   [repeat]         Map attributes = cmp.getFont().getAttributes();
   [repeat]         ^
   [repeat]   missing type arguments for generic class Map<K,V>
   [repeat]   where K,V are type-variables:
   [repeat]     K extends Object declared in interface Map
   [repeat]     V extends Object declared in interface Map

Also, some minor code cleanup.
@BradWalker BradWalker marked this pull request as ready for review December 29, 2025 20:50
@BradWalker
Copy link
Member Author

Need to resolve this old PR.. So I rebased against the latest, resolved the comments, and it's now ready.

@BradWalker BradWalker added this to the NB29 milestone Dec 29, 2025
Comment on lines 260 to +263
/**
* @return Map{@code <String, String>} containing vendor specific properties.
*/
public abstract Map getUnresolvedVendorSpecificProperties();
public abstract Map<String, String> getUnresolvedVendorSpecificProperties();
Copy link
Member

Choose a reason for hiding this comment

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

the implementations should be also updated, otherwise it becomes an unchecked conversion warning there

Comment on lines 1125 to 1131
private Map dtdMap;
private Map<String, String> dtdMap;
private ResourceElem topRE;
private StringBuffer pcdata = new StringBuffer();
private int weight;
private String uri;

Handler(Map dtdMap, ResourceElem rootElem, boolean validate) {
Copy link
Member

Choose a reason for hiding this comment

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

@matthiasblaesing Handler is package private and I don't see the constructor in the sig file. I suppose this means package private inner classes aren't exported?

constructor could be changed to:

        Handler(Map<String, String> dtdMap, ResourceElem rootElem, boolean validate) {

the now redundant cast in L1277 should be now also removed

            String publicURL = (String) dtdMap.get(pid);
->
            String publicURL = dtdMap.get(pid);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API Change [ci] enable extra API related tests ci:all-tests [ci] enable all tests Code cleanup Label for cleanup done on the Netbeans IDE

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants