Skip to content

Commit

Permalink
Add FormData holder
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem Labazin authored and Artem Labazin committed Mar 28, 2018
1 parent 9c545e3 commit 1c7bcac
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 26 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Include the dependency to your project's pom.xml file:
<dependency>
<groupId>io.github.openfeign.form</groupId>
<artifactId>feign-form</artifactId>
<version>3.2.2</version>
<version>3.3.0</version>
</dependency>
...
</dependencies>
Expand Down Expand Up @@ -124,12 +124,12 @@ Include the dependencies to your project's pom.xml file:
<dependency>
<groupId>io.github.openfeign.form</groupId>
<artifactId>feign-form</artifactId>
<version>3.2.2</version>
<version>3.3.0</version>
</dependency>
<dependency>
<groupId>io.github.openfeign.form</groupId>
<artifactId>feign-form-spring</artifactId>
<version>3.2.2</version>
<version>3.3.0</version>
</dependency>
...
</dependencies>
Expand Down
4 changes: 2 additions & 2 deletions feign-form-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ limitations under the License.
<parent>
<groupId>io.github.openfeign.form</groupId>
<artifactId>parent</artifactId>
<version>3.2.2</version>
<version>3.3.0</version>
</parent>

<name>Open Feign Forms Extension for Spring</name>
Expand All @@ -54,7 +54,7 @@ limitations under the License.
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-feign</artifactId>
<version>1.3.5.RELEASE</version>
<version>1.4.4.RELEASE</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion feign-form/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ limitations under the License.
<parent>
<groupId>io.github.openfeign.form</groupId>
<artifactId>parent</artifactId>
<version>3.2.2</version>
<version>3.3.0</version>
</parent>

<name>Open Feign Forms Core</name>
Expand Down
23 changes: 8 additions & 15 deletions feign-form/src/main/java/feign/form/FormData.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,20 @@
package feign.form;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import lombok.Value;

/**
* This object encapsulates a byte array and its associated content type.
* Use if if you want to specify the content type of your provided byte array.
*
* @author Guillaume Simard
* @since 24.03.2018
*/

@Value
@SuppressFBWarnings({"EI_EXPOSE_REP", "EI_EXPOSE_REP2"})
public final class FormData {
private final String contentType;
private final byte[] data;

public FormData (String contentType, byte[] data) {
this.contentType = contentType;
this.data = data;
}
public class FormData {

public String getContentType () {
return contentType;
}
String contentType;

public byte[] getData () {
return data;
}
byte[] data;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@

import lombok.val;

/**
*
* @author Guillaume Simard
* @since 24.03.2018
*/
public class FormDataWriter extends AbstractWriter {

@Override
public boolean isApplicable (Object value) {
return value instanceof FormData;
Expand Down
13 changes: 8 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ limitations under the License.

<groupId>io.github.openfeign.form</groupId>
<artifactId>parent</artifactId>
<version>3.2.2</version>
<version>3.3.0</version>
<packaging>pom</packaging>

<parent>
Expand Down Expand Up @@ -69,7 +69,7 @@ limitations under the License.
<url>https://github.com/OpenFeign/feign-form</url>
<connection>scm:git:https://github.com/OpenFeign/feign-form.git</connection>
<developerConnection>scm:git:https://github.com/OpenFeign/feign-form.git</developerConnection>
<tag>3.2.2</tag>
<tag>3.3.0</tag>
</scm>

<distributionManagement>
Expand All @@ -90,7 +90,7 @@ limitations under the License.

<ciManagement>
<system>Travis</system>
<url>https://travis-ci.org/infobip/popout</url>
<url>https://travis-ci.org/OpenFeign/feign-form</url>
</ciManagement>

<developers>
Expand All @@ -102,6 +102,9 @@ limitations under the License.
<name>Tomasz Juchniewicz</name>
<email>tjuchniewicz@gmail.com</email>
</developer>
<developer>
<name>Guillaume Simard</name>
</developer>
</developers>

<dependencyManagement>
Expand All @@ -123,7 +126,7 @@ limitations under the License.
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-core</artifactId>
<version>9.5.1</version>
<version>9.6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -139,7 +142,7 @@ limitations under the License.
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-jackson</artifactId>
<version>9.5.1</version>
<version>9.6.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down

0 comments on commit 1c7bcac

Please sign in to comment.