Skip to content

[All Java Generators] Diamond operators for java 8 back to < Java 1.7 #6472

Closed
@JFCote

Description

@JFCote
Description

I found that a change I had made some time ago has disappeared. It was a simple change to remove warnings since in Java 8 we don't need to provide the type in the diamond.

For example:

In java 1.7
List<SomeObject> myVar = new ArrayList<SomeObject>();

In java 1.8
List<SomeObject> myVar = new ArrayList<>();

The changes has been erased in commit 506c58e by user @daveish

I can submit a new PR to fix this but I would like to know what was the reason for the regression. Was this creating bugs in other generator?

It is related to #2588 and #6373

My changes were removed in the AbstractJavaCodegen.java file: https://github.com/swagger-api/swagger-codegen/pull/6373/files#diff-563d4b5a0d57e0184af3b98607bbb4a5L642

So, @wing328 and @daveish , can you please check and confirm that I can submit my change back?

Thanks!

Swagger-codegen version

Master

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions