Skip to content

Commit

Permalink
Merge pull request #119 from ozlerhakan/2.4.0
Browse files Browse the repository at this point in the history
bump version 2.4.0
  • Loading branch information
ozlerhakan committed Jan 1, 2020
2 parents 773e59f + 2f7097f commit fe2c4dc
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 17 deletions.
18 changes: 18 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"files": [
"README.adoc"
],
"imageSize": 100,
"contributorsPerLine": 7,
"badgeTemplate": "[![All Contributors](https://img.shields.io/badge/all_contributors-<%= contributors.length %>-orange.svg?style=flat-square)](#contributors)",
"contributorTemplate": "<a href=\"<%= contributor.profile %>\"><img src=\"<%= contributor.avatar_url %>\" width=\"<%= options.imageSize %>px;\" alt=\"\"/><br /><sub><b><%= contributor.name %></b></sub></a>",
"types": {
"custom": {
"symbol": "🔭",
"description": "A custom contribution type.",
"link": "[<%= symbol %>](<%= url %> \"<%= description %>\"),"
}
},
"skipCi": "true",
"contributors": []
}
6 changes: 3 additions & 3 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
= Poiji
:version: v2.3.0
:version: v2.4.0

image:https://travis-ci.org/ozlerhakan/poiji.svg?branch=master["Build Status", link="https://travis-ci.org/ozlerhakan/poiji"] image:https://api.codacy.com/project/badge/Grade/6587e90886184da29a1b7c5634695c9d["Codacy code quality", link="https://www.codacy.com/app/ozlerhakan/poiji?utm_source=github.com&utm_medium=referral&utm_content=ozlerhakan/poiji&utm_campaign=Badge_Grade"] image:https://coveralls.io/repos/github/ozlerhakan/poiji/badge.svg?branch=master["Coverage Status", link="https://coveralls.io/github/ozlerhakan/poiji?branch=master"] image:https://img.shields.io/badge/apache.poi-4.1.0-brightgreen.svg[] image:https://img.shields.io/badge/gitter-join%20chat-blue.svg["Gitter", link="https://gitter.im/poiji/Lobby"] image:https://img.shields.io/badge/license-MIT-blue.svg[]

Expand All @@ -15,15 +15,15 @@ In your Maven/Gradle project, first add the corresponding dependency:
<dependency>
<groupId>com.github.ozlerhakan</groupId>
<artifactId>poiji</artifactId>
<version>2.3.0</version>
<version>2.4.0</version>
</dependency>
----

.gradle
[source,groovy]
----
dependencies {
compile 'com.github.ozlerhakan:poiji:2.3.0'
compile 'com.github.ozlerhakan:poiji:2.4.0'
}
----

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.github.ozlerhakan</groupId>
<artifactId>poiji</artifactId>
<version>2.3.0</version>
<version>2.4.0</version>
<packaging>jar</packaging>

<name>poiji</name>
Expand Down
26 changes: 13 additions & 13 deletions src/main/java/com/poiji/config/DefaultCasting.java
Original file line number Diff line number Diff line change
Expand Up @@ -195,43 +195,43 @@ public Object castValue(Class<?> fieldType, String rawValue, int row, int col, P

Object o;

if (fieldType.getName().equals("int")) {
if (fieldType == int.class) {
o = primitiveIntegerValue(value, sheetName, row, col);

} else if (fieldType.getName().equals("java.lang.Integer")) {
} else if (fieldType == Integer.class) {
o = integerValue(value, sheetName, row, col, options);

} else if (fieldType.getName().equals("java.math.BigDecimal")) {
} else if (fieldType == BigDecimal.class) {
o = bigDecimalValue(value, sheetName, row, col, options);

} else if (fieldType.getName().equals("long")) {
} else if (fieldType == long.class) {
o = primitiveLongValue(value, sheetName, row, col);

} else if (fieldType.getName().equals("java.lang.Long")) {
} else if (fieldType == Long.class) {
o = longValue(value, sheetName, row, col, options);

} else if (fieldType.getName().equals("double")) {
} else if (fieldType == double.class) {
o = primitiveDoubleValue(value, sheetName, row, col);

} else if (fieldType.getName().equals("java.lang.Double")) {
} else if (fieldType == Double.class) {
o = doubleValue(value, sheetName, row, col, options);

} else if (fieldType.getName().equals("float")) {
} else if (fieldType == float.class) {
o = primitiveFloatValue(value, sheetName, row, col);

} else if (fieldType.getName().equals("java.lang.Float")) {
} else if (fieldType == Float.class) {
o = floatValue(value, sheetName, row, col, options);

} else if (fieldType.getName().equals("boolean") || fieldType.getName().equals("java.lang.Boolean")) {
} else if (fieldType == boolean.class || fieldType == Boolean.class) {
o = Boolean.valueOf(value);

} else if (fieldType.getName().equals("java.util.Date")) {
} else if (fieldType == Date.class) {
o = dateValue(value, sheetName, row, col, options);

} else if (fieldType.getName().equals("java.time.LocalDate")) {
} else if (fieldType == LocalDate.class) {
o = localDateValue(value, sheetName, row, col, options);

} else if (fieldType.getName().equals("java.time.LocalDateTime")) {
} else if (fieldType == LocalDateTime.class) {
o = localDateTimeValue(value, sheetName, row, col, options);

} else if (fieldType.isEnum()) {
Expand Down

0 comments on commit fe2c4dc

Please sign in to comment.