Skip to content

Commit

Permalink
stock patch: java: fix warnings (unusual)
Browse files Browse the repository at this point in the history
some of these may involve idea bugs, unclear.

Refs https://gitlab.ilscipio.com/scipio-dev/dev/external/scipio-ide/issues/5
  • Loading branch information
pplx committed Apr 10, 2019
1 parent e6970f5 commit 9e13d76
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion framework/base/src/org/ofbiz/base/util/ObjectType.java
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ public static Boolean doRealCompare(Object value1, Object value2, String operato
return Boolean.TRUE;
}

@SuppressWarnings("unchecked")
//@SuppressWarnings("unchecked") // SCIPIO: Not necessary for javac or IDEA - NOTE: Eclipse may report a warning
public static boolean isEmpty(Object value) {
if (value == null) {
return true;
Expand Down
6 changes: 3 additions & 3 deletions framework/base/src/org/ofbiz/base/util/UtilGenerics.java
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ public static <K, V> Map<K, V> toMap(Class<K> keyType, Class<V> valueType, Objec
return map;
}

@SafeVarargs
@SuppressWarnings("hiding")
public static <K, Object> Map<K, Object> toMap(Class<K> keyType, Object... data) {
//@SafeVarargs // SCIPIO: Not needed for reifiable types
//@SuppressWarnings("hiding") // SCIPIO: Not needed, now removed Object: public static <K, Object>
public static <K> Map<K, Object> toMap(Class<K> keyType, Object... data) { // SCIPIO: Fixed: public static <K, Object>...
if (data == null) {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ protected BufferedImage scaleImageDebug(BufferedImage image, int targetWidth, in
*/
protected abstract BufferedImage scaleImageCore(BufferedImage image, int targetWidth, int targetHeight, Map<String, Object> options) throws IOException;

@SuppressWarnings("unchecked")
//@SuppressWarnings("unchecked") // SCIPIO: Not necessary for javac or IDEA - NOTE: Eclipse may report a warning
@Override
public AbstractImageScalerFactory<? extends AbstractImageScaler> getFactory() { // for return type
return (AbstractImageScalerFactory<? extends AbstractImageScaler>) factory;
Expand Down

0 comments on commit 9e13d76

Please sign in to comment.