Skip to content

Commit

Permalink
Revert "Merge pull request #296 from tburny/issue-244-update-to-sprin…
Browse files Browse the repository at this point in the history
…g-20"

This reverts commit 1d140cf, reversing
changes made to a9a5a28.

Reverting commit to release 2.0.5
  • Loading branch information
Aleksandar Stojsavljevic committed Jan 29, 2019
1 parent 1d140cf commit 393d266
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 28 deletions.
30 changes: 20 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
<version>2.0.5</version>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.2.RELEASE</version>
</parent>
<groupId>io.spring.platform</groupId>
<artifactId>platform-bom</artifactId>
<version>Brussels-SR6</version>
<relativePath/>
</parent>

<name>RAML to Spring MVC code generator</name>
<description>Component is Maven plugin that reads RAML documents and creates Spring MVC endpoints</description>
Expand Down Expand Up @@ -49,12 +50,22 @@
<maven.core.version>3.3.9</maven.core.version>
<jsonschema2pojo.version>0.5.1</jsonschema2pojo.version>
<ramlparser2.version>1.0.28</ramlparser2.version>
<feign.client.version>2.0.2.RELEASE</feign.client.version>
<feign.client.version>1.1.6.RELEASE</feign.client.version>
<codemodel.version>2.6</codemodel.version>
</properties>

<dependencies>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>

<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</dependency>

<dependency>
<groupId>org.raml</groupId>
<artifactId>raml-parser-2</artifactId>
Expand All @@ -75,7 +86,7 @@

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<artifactId>spring-cloud-starter-feign</artifactId>
<version>${feign.client.version}</version>
<optional>true</optional>
<exclusions>
Expand Down Expand Up @@ -107,7 +118,7 @@
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.6.0</version>
<version>3.4</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -129,11 +140,10 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<version>2.1</version>
<artifactId>hamcrest-all</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;

import org.apache.commons.collections.MapUtils;
import org.raml.v2.api.model.v10.datamodel.DateTimeTypeDeclaration;
import org.raml.v2.api.model.v10.datamodel.TypeDeclaration;
import org.slf4j.Logger;
Expand Down Expand Up @@ -324,8 +324,7 @@ public PojoBuilder withCompleteConstructor() {
// because default constructor (without fields) is already present
Map<String, JFieldVar> nonTransientAndNonStaticFields = getNonTransientAndNonStaticFields();

// if nonTransientAndNonStaticFields is not empty
if (!Optional.ofNullable(nonTransientAndNonStaticFields).map(Map::isEmpty).orElse(true)) {
if (MapUtils.isNotEmpty(nonTransientAndNonStaticFields)) {
// Create complete constructor
JMethod constructor = this.pojo.constructor(JMod.PUBLIC);
Map<String, JVar> superParametersToAdd = getSuperParametersToAdd(this.pojo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
package com.phoenixnap.oss.ramlplugin.raml2code.rules;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.netflix.feign.FeignClient;

import com.phoenixnap.oss.ramlplugin.raml2code.rules.spring.SpringFeignClientInterfaceDecoratorRule;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
package com.phoenixnap.oss.ramlplugin.raml2code.rules.spring;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.netflix.feign.FeignClient;

import com.phoenixnap.oss.ramlplugin.raml2code.data.ApiResourceMetadata;
import com.phoenixnap.oss.ramlplugin.raml2code.rules.Rule;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
package com.phoenixnap.oss.ramlplugin.raml2code.rules.spring;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.netflix.feign.FeignClient;

import com.phoenixnap.oss.ramlplugin.raml2code.data.ApiResourceMetadata;
import com.phoenixnap.oss.ramlplugin.raml2code.rules.GenericJavaClassRule;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import java.util.Set;

import org.hamcrest.MatcherAssert;
import org.hamcrest.text.IsEqualCompressingWhiteSpace;
import org.hamcrest.text.IsEqualIgnoringWhiteSpace;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
Expand Down Expand Up @@ -146,20 +146,19 @@ protected URI getUri(String resourcePath) throws URISyntaxException {
return resource.toURI();
}

public static class IsEqualIgnoringLeadingAndEndingWhiteSpaces extends IsEqualCompressingWhiteSpace {
public static class IsEqualIgnoringLeadingAndEndingWhiteSpaces extends IsEqualIgnoringWhiteSpace {

public IsEqualIgnoringLeadingAndEndingWhiteSpaces(String string) {
super(string);
}

@Override
public String stripSpaces(String toBeStripped) {
public String stripSpace(String toBeStripped) {
String result = "";
BufferedReader bufReader = new BufferedReader(new StringReader(toBeStripped));
String line;
try {
while ((line = bufReader.readLine()) != null) {
result += super.stripSpaces(line);
result += super.stripSpace(line);
}
} catch (IOException e) {
return e.getMessage();
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/validations/FeignClient.java.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ package com.gen.test;
import java.util.List;
import javax.validation.Valid;
import com.gen.test.model.Song;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package com.gen.test;

import java.math.BigDecimal;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package com.gen.test;

import java.math.BigDecimal;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class SampleUnit implements Serializable
* The type string.
*
*/
@JsonProperty("t_string")
@JsonProperty("t_String")
protected String tString;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package com.gen.test;
import java.math.BigDecimal;
import java.util.Date;
import javax.validation.Valid;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.HttpHeaders;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ package com.gen.test;

import javax.validation.Valid;
import com.gen.test.model.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ package com.gen.test;

import javax.validation.Valid;
import com.gen.test.model.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
Expand Down

0 comments on commit 393d266

Please sign in to comment.