Skip to content

Commit

Permalink
Merge 32d1215 into 398d2e1
Browse files Browse the repository at this point in the history
  • Loading branch information
ozlerhakan committed May 2, 2021
2 parents 398d2e1 + 32d1215 commit 3075304
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
:toclevels: 1

= Poiji
:version: v3.0.3
:version: v3.1.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.2-brightgreen.svg[] image:https://app.fossa.com/api/projects/git%2Bgithub.com%2Fozlerhakan%2Fpoiji.svg?type=shield["FOSSA Status", link="https://app.fossa.com/projects/git%2Bgithub.com%2Fozlerhakan%2Fpoiji?ref=badge_shield"] image:https://img.shields.io/badge/license-MIT-blue.svg[]
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-5.0.0-brightgreen.svg[] image:https://app.fossa.com/api/projects/git%2Bgithub.com%2Fozlerhakan%2Fpoiji.svg?type=shield["FOSSA Status", link="https://app.fossa.com/projects/git%2Bgithub.com%2Fozlerhakan%2Fpoiji?ref=badge_shield"] image:https://img.shields.io/badge/license-MIT-blue.svg[]

Poiji is a teeny Java library that provides one way mapping from Excel sheets to Java classes. In a way it lets us convert each row of the specified excel data into Java objects. Poiji uses https://poi.apache.org/[Apache Poi] (the Java API for Microsoft Documents) under the hood to fulfill the mapping process.

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

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

Expand Down
4 changes: 2 additions & 2 deletions 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>3.0.3</version>
<version>3.1.0</version>
<packaging>jar</packaging>

<name>poiji</name>
Expand Down Expand Up @@ -45,7 +45,7 @@
</issueManagement>

<properties>
<apache.poi.version>4.1.2</apache.poi.version>
<apache.poi.version>5.0.0</apache.poi.version>
<junit.version>4.12</junit.version>
<project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/poiji/bind/mapping/HSSFUnmarshaller.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.poiji.config.Casting;
import com.poiji.config.Formatting;
import com.poiji.exception.IllegalCastException;
import com.poiji.exception.PoijiException;
import com.poiji.option.PoijiOptions;
import com.poiji.util.AnnotationUtil;
import com.poiji.util.ReflectUtil;
Expand Down Expand Up @@ -67,6 +68,9 @@ abstract class HSSFUnmarshaller extends PoijiWorkBook implements Unmarshaller {
@Override
public <T> void unmarshal(Class<T> type, Consumer<? super T> consumer) {
HSSFWorkbook workbook = (HSSFWorkbook) workbook();
if (workbook == null) {
throw new PoijiException("The workbook is null.");
}
Optional<String> maybeSheetName = this.getSheetName(type, options);

baseFormulaEvaluator = HSSFFormulaEvaluator.create(workbook, null, null);
Expand Down
1 change: 1 addition & 0 deletions src/test/java/com/poiji/deserialize/DeserializersTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public static Iterable<Object[]> queries() {
return Arrays.asList(new Object[][]{
{"src/test/resources/employees.xlsx", unmarshallingDeserialize(), null, -1},
{"src/test/resources/employees_sheet2.xlsx", unmarshallingDeserialize(), null, 1},
{"src/test/resources/cloud-not-found.xls", unmarshallingDeserialize(), PoijiException.class, -1},
{"src/test/resources/cloud.xls", unmarshallingDeserialize(), PoijiException.class, -1},
{"src/test/resources/cloud", unmarshallingDeserialize(), PoijiException.class, -1},
});
Expand Down

0 comments on commit 3075304

Please sign in to comment.