Skip to content

Commit

Permalink
Code cleanup, fix unstable tests (using J8 time API to fix past tense)
Browse files Browse the repository at this point in the history
  • Loading branch information
lincolnthree committed Dec 19, 2020
1 parent fd92041 commit aa50cd9
Show file tree
Hide file tree
Showing 36 changed files with 820 additions and 732 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ target/
*.ipr
*.swp
bin/
nlp/dependency-reduced-pom.xml
/*/src/main/java/META-INF
docs/reference/src/main/docbook/en-US/version_info.xml
.idea
288 changes: 159 additions & 129 deletions core/src/main/java/org/ocpsoft/prettytime/PrettyTime.java

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions core/src/main/java/org/ocpsoft/prettytime/i18n/Resources_cs.java
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ CsTimeFormat build(final ResourceBundle bundle)

}

private static class CsTimeFormat extends SimpleTimeFormat implements TimeFormat
private static class CsTimeFormat extends SimpleTimeFormat
{

private final List<CsName> futureNames = new ArrayList<Resources_cs.CsName>();
Expand All @@ -283,19 +283,23 @@ public CsTimeFormat(String resourceKeyPrefix, ResourceBundle bundle, Collection<
try {
setFuturePluralName(bundle.getString(resourceKeyPrefix + "FuturePluralName"));
}
catch (Exception e) {}
catch (Exception e) {
}
try {
setFutureSingularName((bundle.getString(resourceKeyPrefix + "FutureSingularName")));
}
catch (Exception e) {}
catch (Exception e) {
}
try {
setPastPluralName((bundle.getString(resourceKeyPrefix + "PastPluralName")));
}
catch (Exception e) {}
catch (Exception e) {
}
try {
setPastSingularName((bundle.getString(resourceKeyPrefix + "PastSingularName")));
}
catch (Exception e) {}
catch (Exception e) {
}

for (CsName name : names) {
if (name.isFuture()) {
Expand Down
12 changes: 0 additions & 12 deletions core/src/main/java/org/ocpsoft/prettytime/i18n/Resources_et.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,6 @@
*/
package org.ocpsoft.prettytime.i18n;

import java.util.ListResourceBundle;
import java.util.ResourceBundle;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

import org.ocpsoft.prettytime.Duration;
import org.ocpsoft.prettytime.TimeFormat;
import org.ocpsoft.prettytime.TimeUnit;
import org.ocpsoft.prettytime.format.SimpleTimeFormat;
import org.ocpsoft.prettytime.impl.TimeFormatProvider;
import org.ocpsoft.prettytime.units.Day;

public class Resources_et extends Resources_fi
{
private static final Object[][] OBJECTS = new Object[][] {
Expand Down
Loading

0 comments on commit aa50cd9

Please sign in to comment.