Skip to content

Commit

Permalink
Remove references to LocaleServiceProvider
Browse files Browse the repository at this point in the history
Helps with Google App Engine integration
Fixes #22
  • Loading branch information
jodastephen committed Dec 9, 2014
1 parent a9e0d56 commit f1ae2cf
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 8 deletions.
6 changes: 6 additions & 0 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
<body>

<!-- types are add, fix, remove, update -->
<release version="1.2" date="SNAPSHOT" description="v1.2">
<action dev="jodastephen" type="fix" >
Remove references to LocaleServiceProvider.
Fixes #22.
</action>
</release>
<release version="1.1" date="2014-10-24" description="v1.1">
<action dev="jodastephen" type="update" >
Update to time-zone data 2014i.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
package org.threeten.bp.format;

import java.util.Locale;
import java.util.spi.LocaleServiceProvider;

import org.threeten.bp.chrono.Chronology;

Expand All @@ -45,7 +44,7 @@
* Implementations must be thread-safe.
* Implementations should cache the returned formatters.
*/
abstract class DateTimeFormatStyleProvider extends LocaleServiceProvider {
abstract class DateTimeFormatStyleProvider {

/**
* Gets the provider.
Expand All @@ -56,6 +55,15 @@ static DateTimeFormatStyleProvider getInstance() {
return new SimpleDateTimeFormatStyleProvider();
}

/**
* Gets the available locales.
*
* @return the locales
*/
public Locale[] getAvailableLocales() {
throw new UnsupportedOperationException();
}

/**
* Gets a localized date, time or date-time formatter.
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -733,10 +733,6 @@ public String getText(TemporalField field, long value, TextStyle style, Locale l
public Iterator<Entry<String, Long>> getTextIterator(TemporalField field, TextStyle style, Locale locale) {
return store.getTextIterator(style);
}
@Override
public Locale[] getAvailableLocales() {
throw new UnsupportedOperationException();
}
};
appendInternal(new TextPrinterParser(field, TextStyle.FULL, provider));
return this;
Expand Down
12 changes: 10 additions & 2 deletions src/main/java/org/threeten/bp/format/DateTimeTextProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import java.util.Iterator;
import java.util.Locale;
import java.util.Map.Entry;
import java.util.spi.LocaleServiceProvider;

import org.threeten.bp.temporal.TemporalField;

Expand All @@ -47,7 +46,7 @@
* Implementations must be thread-safe.
* Implementations should cache the textual information.
*/
abstract class DateTimeTextProvider extends LocaleServiceProvider {
abstract class DateTimeTextProvider {

/**
* Gets the provider.
Expand All @@ -58,6 +57,15 @@ static DateTimeTextProvider getInstance() {
return new SimpleDateTimeTextProvider();
}

/**
* Gets the available locales.
*
* @return the locales
*/
public Locale[] getAvailableLocales() {
throw new UnsupportedOperationException();
}

/**
* Gets the text for the specified field, locale and style
* for the purpose of printing.
Expand Down

0 comments on commit f1ae2cf

Please sign in to comment.