Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Vosburgh2016-02-04 17:49:40 +0000
committerBrian Vosburgh2017-05-18 22:36:25 +0000
commit6649430d5e4d8718eb981975586ee0403c9e763b (patch)
treef342ea454c94fe6c0a3636aca837c3b019d6f300
parent8eccd8273125d4d021cf19dbdc417f043faa55cb (diff)
downloadwebtools.dali-6649430d5e4d8718eb981975586ee0403c9e763b.tar.gz
webtools.dali-6649430d5e4d8718eb981975586ee0403c9e763b.tar.xz
webtools.dali-6649430d5e4d8718eb981975586ee0403c9e763b.zip
fix compiler warnings in utility.internal.model.value.prefs
-rw-r--r--common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/model/value/prefs/PreferencePropertyValueModel.java14
-rw-r--r--common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/model/value/prefs/PreferencesCollectionValueModel.java6
2 files changed, 10 insertions, 10 deletions
diff --git a/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/model/value/prefs/PreferencePropertyValueModel.java b/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/model/value/prefs/PreferencePropertyValueModel.java
index f7d4a90f0a..e6b64f1e23 100644
--- a/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/model/value/prefs/PreferencePropertyValueModel.java
+++ b/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/model/value/prefs/PreferencePropertyValueModel.java
@@ -89,7 +89,7 @@ public class PreferencePropertyValueModel<P>
* the specified default value for the preference.
*/
public static PreferencePropertyValueModel<String> forString(Preferences preferences, String key, String defaultValue) {
- return new PreferencePropertyValueModel<String>(
+ return new PreferencePropertyValueModel<>(
preferences,
key,
defaultValue,
@@ -102,7 +102,7 @@ public class PreferencePropertyValueModel<P>
* the specified default value for the preference.
*/
public static PreferencePropertyValueModel<String> forString(PropertyValueModel<? extends Preferences> preferencesModel, String key, String defaultValue) {
- return new PreferencePropertyValueModel<String>(
+ return new PreferencePropertyValueModel<>(
preferencesModel,
key,
defaultValue,
@@ -115,7 +115,7 @@ public class PreferencePropertyValueModel<P>
* the specified default value for the preference.
*/
public static PreferencePropertyValueModel<Boolean> forBoolean(Preferences preferences, String key, boolean defaultValue) {
- return new PreferencePropertyValueModel<Boolean>(
+ return new PreferencePropertyValueModel<>(
preferences,
key,
defaultValue ? Boolean.TRUE : Boolean.FALSE,
@@ -128,7 +128,7 @@ public class PreferencePropertyValueModel<P>
* the specified default value for the preference.
*/
public static PreferencePropertyValueModel<Boolean> forBoolean(PropertyValueModel<? extends Preferences> preferencesModel, String key, boolean defaultValue) {
- return new PreferencePropertyValueModel<Boolean>(
+ return new PreferencePropertyValueModel<>(
preferencesModel,
key,
defaultValue ? Boolean.TRUE : Boolean.FALSE,
@@ -141,7 +141,7 @@ public class PreferencePropertyValueModel<P>
* the specified default value for the preference.
*/
public static PreferencePropertyValueModel<Integer> forInteger(Preferences preferences, String key, int defaultValue) {
- return new PreferencePropertyValueModel<Integer>(
+ return new PreferencePropertyValueModel<>(
preferences,
key,
Integer.valueOf(defaultValue),
@@ -154,7 +154,7 @@ public class PreferencePropertyValueModel<P>
* the specified default value for the preference.
*/
public static PreferencePropertyValueModel<Integer> forInteger(PropertyValueModel<? extends Preferences> preferencesModel, String key, int defaultValue) {
- return new PreferencePropertyValueModel<Integer>(
+ return new PreferencePropertyValueModel<>(
preferencesModel,
key,
Integer.valueOf(defaultValue),
@@ -167,7 +167,7 @@ public class PreferencePropertyValueModel<P>
* the specified default value for the preference.
*/
public PreferencePropertyValueModel(Preferences preferences, String key, P defaultValue, Transformer<String, P> stringTransformer) {
- this(new StaticPropertyValueModel<Preferences>(preferences), key, defaultValue, stringTransformer);
+ this(new StaticPropertyValueModel<>(preferences), key, defaultValue, stringTransformer);
}
/**
diff --git a/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/model/value/prefs/PreferencesCollectionValueModel.java b/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/model/value/prefs/PreferencesCollectionValueModel.java
index 818e9bd56b..4ff7b61362 100644
--- a/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/model/value/prefs/PreferencesCollectionValueModel.java
+++ b/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/model/value/prefs/PreferencesCollectionValueModel.java
@@ -37,7 +37,7 @@ public class PreferencesCollectionValueModel<P>
implements CollectionValueModel<PreferencePropertyValueModel<P>>
{
/** Cache the current preferences, stored in models and keyed by name. */
- protected final HashMap<String, PreferencePropertyValueModel<P>> preferenceModels = new HashMap<String, PreferencePropertyValueModel<P>>();
+ protected final HashMap<String, PreferencePropertyValueModel<P>> preferenceModels = new HashMap<>();
/** A listener that listens to the preferences node for added or removed preferences. */
protected final PreferenceChangeListener preferenceChangeListener;
@@ -52,7 +52,7 @@ public class PreferencesCollectionValueModel<P>
* Construct an adapter for the specified preferences node.
*/
public PreferencesCollectionValueModel(Preferences preferences, Adapter<P> adapter) {
- this(new StaticPropertyValueModel<Preferences>(preferences), adapter);
+ this(new StaticPropertyValueModel<>(preferences), adapter);
}
/**
@@ -175,7 +175,7 @@ public class PreferencesCollectionValueModel<P>
* At this point we can be sure that the subject is not <code>null</code>.
*/
protected Iterable<PreferencePropertyValueModel<P>> getPreferenceModels() {
- return new TransformationIterable<String, PreferencePropertyValueModel<P>>(this.getPreferenceKeys(), new PreferenceKeyTransformer());
+ return new TransformationIterable<>(this.getPreferenceKeys(), new PreferenceKeyTransformer());
}
protected Iterable<String> getPreferenceKeys() {

Back to the top