Skip to content

Conversation

@BradWalker
Copy link
Member

Reduce the number of unchecked call warnings. like this..

   [repeat] /home/bwalker/netbeans/webcommon/javascript2.nodejs/src/org/netbeans/modules/javascript2/nodejs/editor/model/NodeJsObjectInterceptor.java:101: warning: [unchecked] unchecked call to ArrayList(Collection<? extends E>) as a member of the raw type ArrayList
   [repeat]             List<? extends DeclarationScope> childrenScopesCopy = new ArrayList(globalScope.getChildrenScopes());
   [repeat]                                                                   ^
   [repeat]   where E is a type-variable:
   [repeat]     E extends Object declared in class ArrayList

This is done by simply adding the diamond operator <>..

In addition, I also had to update the project.properties file at a few places to allow the use of the diamond operator..

compile:
   [depend] Deleted 14 out of date files in 0 seconds
 [nb-javac] Compiling 10 source files to /home/bwalker/netbeans/platform/masterfs/build/classes
   [repeat] warning: [options] bootstrap class path not set in conjunction with -source 1.6
   [repeat] /home/bwalker/netbeans/platform/masterfs/src/org/netbeans/modules/masterfs/filebasedfs/naming/NamingFactory.java:50: error: diamond operator is not supported in -source 1.6
   [repeat]         final List<FileInfo> list = new ArrayList<>(queue);
   [repeat]                                                   ^
   [repeat]   (use -source 7 or higher to enable diamond operator)
   [repeat] 1 error
   [repeat] 1 warning
  [nbmerge] Failed to build target: all-masterfs

In these few places I changed the source to 1.8..

@matthiasblaesing
Copy link
Contributor

Merged via 7149573. I rebased the changeset onto master.

@junichi11 junichi11 added this to the 11.2 milestone Aug 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants