From 348a94ae18fa33a56d7baa193b5ed6489f2c4a38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20B=C3=BCttner?= Date: Thu, 24 Aug 2017 15:14:10 +0200 Subject: [PATCH] tests for project filter package refs #7 --- .travis.yml | 5 ++++- README.md | 1 + .../java/de/idrinth/stellaris/modtools/filter/FileExt.java | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index fa50017..f50c8c3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,6 @@ language: java sudo: false -jdk: oraclejdk8 \ No newline at end of file +jdk: oraclejdk8 +branches: + only: + - master \ No newline at end of file diff --git a/README.md b/README.md index 10a376a..47537de 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # [Stellaris Mod Tools](https://github.com/Idrinths-Stellaris-Mods/Mod-Tools/releases/latest/) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/23bfdba23039450aa3c16f06f93362ee)](https://www.codacy.com/app/Idrinth/Mod-Tools?utm_source=github.com&utm_medium=referral&utm_content=Idrinths-Stellaris-Mods/Mod-Tools&utm_campaign=Badge_Grade) +[!Travis Build](https://api.travis-ci.org/Idrinths-Stellaris-Mods/Mod-Tools.svg?branch=master) ## Current Features diff --git a/src/main/java/de/idrinth/stellaris/modtools/filter/FileExt.java b/src/main/java/de/idrinth/stellaris/modtools/filter/FileExt.java index 1d0d722..07a30d8 100644 --- a/src/main/java/de/idrinth/stellaris/modtools/filter/FileExt.java +++ b/src/main/java/de/idrinth/stellaris/modtools/filter/FileExt.java @@ -23,7 +23,9 @@ public class FileExt implements java.io.FilenameFilter { protected String extension; public FileExt(String extension) { - this.extension = "." + extension; + this.extension = extension.charAt(0) == ".".charAt(0) ? extension : "." + extension; + System.out.println(extension.matches("^\\.")); + System.out.println(this.extension); } @Override