Skip to content

Commit 47b9e54

Browse files
Version update of Tableschema lib
1 parent e9700f8 commit 47b9e54

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>io.frictionlessdata</groupId>
55
<artifactId>datapackage-java</artifactId>
6-
<version>0.2.4-SNAPSHOT</version>
6+
<version>0.3.0-SNAPSHOT</version>
77
<packaging>jar</packaging>
88
<issueManagement>
99
<url>https://github.com/frictionlessdata/datapackage-java/issues</url>
@@ -20,10 +20,10 @@
2020
<java.version>8</java.version>
2121
<maven.compiler.source>${java.version}</maven.compiler.source>
2222
<maven.compiler.target>${java.version}</maven.compiler.target>
23-
<tableschema-java-version>0.2.4</tableschema-java-version>
23+
<tableschema-java-version>0.3.0</tableschema-java-version>
2424
<hamcrest.version>1.3</hamcrest.version>
2525
<junit.version>5.9.1</junit.version>
26-
<slf4j-simple.version>1.7.36</slf4j-simple.version>
26+
<slf4j-simple.version>2.0.5</slf4j-simple.version>
2727
<apache-commons-collections4.version>4.4</apache-commons-collections4.version>
2828
<everit-json-schema.version>1.14.1</everit-json-schema.version>
2929
<maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>

src/main/java/io/frictionlessdata/datapackage/JSONBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ public static ObjectNode dereference(File fileObj, Path basePath, boolean isArch
405405
*/
406406

407407
private static ObjectNode dereference(String url, URL basePath) throws IOException {
408-
JsonNode dereferencedObj = null;
408+
JsonNode dereferencedObj;
409409

410410
if (isValidUrl(url)) {
411411
// Create the dereferenced object from the remote file.

src/main/java/io/frictionlessdata/datapackage/Package.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,15 +197,15 @@ public Package(Path descriptorFile, boolean strict) throws Exception {
197197

198198

199199
private FileSystem getTargetFileSystem(File outputDir, boolean zipCompressed) throws IOException {
200-
FileSystem outFs = null;
200+
FileSystem outFs;
201201
if (zipCompressed) {
202202
if (outputDir.exists()) {
203203
throw new DataPackageException("Cannot save into existing ZIP file: "
204204
+outputDir.getName());
205205
}
206206
Map<String, String> env = new HashMap<>();
207207
env.put("create", "true");
208-
outFs = FileSystems.newFileSystem(URI.create("jar:" + outputDir.toURI().toString()), env);
208+
outFs = FileSystems.newFileSystem(URI.create("jar:" + outputDir.toURI()), env);
209209
} else {
210210
if (!(outputDir.isDirectory())) {
211211
throw new DataPackageException("Target for save() exists and is a regular file: "
@@ -500,8 +500,8 @@ public void removeProperty(String key){
500500
/**
501501
* Validation is strict or unstrict depending on how the package was
502502
* instantiated with the strict flag.
503-
* @throws IOException
504-
* @throws DataPackageException
503+
* @throws IOException if something goes wrong reading the datapackage
504+
* @throws DataPackageException if validation fails and validation is strict
505505
*/
506506
final void validate() throws IOException, DataPackageException{
507507
try{
@@ -813,7 +813,7 @@ private static URL getParentUrl(URL urlSource) throws URISyntaxException, Malfor
813813

814814
// https://stackoverflow.com/a/47595502/2535335
815815
private static boolean isArchive(File f) throws IOException {
816-
int fileSignature = 0;
816+
int fileSignature;
817817
RandomAccessFile raf = new RandomAccessFile(f, "r");
818818
fileSignature = raf.readInt();
819819
raf.close();

src/main/java/io/frictionlessdata/datapackage/resource/AbstractResource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public Iterator<C> beanIterator(Class<C> beanType, boolean relations) throws Exc
110110
ensureDataLoaded();
111111
IteratorChain<C> ic = new IteratorChain<>();
112112
for (Table table : tables) {
113-
ic.addIterator (table.iterator(beanType, false));
113+
ic.addIterator ((Iterator<? extends C>) table.iterator(beanType, false));
114114
}
115115
return ic;
116116
}
@@ -164,7 +164,7 @@ public List<C> getData(Class<C> beanClass) throws Exception {
164164
List<C> retVal = new ArrayList<C>();
165165
ensureDataLoaded();
166166
for (Table t : tables) {
167-
final BeanIterator<C> iter = t.iterator(beanClass, false);
167+
final BeanIterator<C> iter = (BeanIterator<C>) t.iterator(beanClass, false);
168168
while (iter.hasNext()) {
169169
retVal.add(iter.next());
170170
}

0 commit comments

Comments
 (0)