diff options
author | Noel Grandin <noel@peralex.com> | 2012-08-20 17:05:35 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-08-20 19:04:33 +0100 |
commit | 8bfe47960f60e1dc2e6bcf0f3c3f7e43dfd3fc0b (patch) | |
tree | 12399f5232ff90f000bb58e213629140e564f0ce /javaunohelper/com/sun/star/lib | |
parent | f906ac27761332580b769f5f90d1f6bbd7f93701 (diff) |
Java5 updates - convert to generics
Change-Id: I039e51958865a7ea000034e7bf765f64d49689cd
Diffstat (limited to 'javaunohelper/com/sun/star/lib')
3 files changed, 6 insertions, 6 deletions
diff --git a/javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java b/javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java index 503e970ece19..f575927d2c1e 100644 --- a/javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java +++ b/javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java @@ -89,7 +89,7 @@ public class ByteArrayToXInputStreamAdapter // System.err.println("readbytes(..., "+param+")"); _check(); try { - int remain = (int)(m_length - m_pos); + int remain = (m_length - m_pos); if (param > remain) param = remain; /* ARGH!!! */ if (values[0] == null){ diff --git a/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java b/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java index bbd4152f32ef..7c7a3f4445b0 100644 --- a/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java +++ b/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java @@ -142,7 +142,7 @@ public class InputStreamToXInputStreamAdapter implements XInputStream { tmpIntVal = Integer.MAX_VALUE; } else { // Casting is safe here. - tmpIntVal = (int)tmpLongVal; + tmpIntVal = tmpLongVal; } tmpLongVal -= tmpIntVal; diff --git a/javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java b/javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java index 950840cb0d1c..246dd8639c54 100644 --- a/javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java +++ b/javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java @@ -712,7 +712,7 @@ public final class PropertySetMixin { throws UnknownPropertyException, PropertyVetoException, com.sun.star.lang.IllegalArgumentException, WrappedTargetException { - PropertyData p = (PropertyData) properties.get(name); + PropertyData p = properties.get(name); if (p == null) { throw new UnknownPropertyException(name, object); } @@ -784,7 +784,7 @@ public final class PropertySetMixin { Object getProperty(String name, PropertyState[] state) throws UnknownPropertyException, WrappedTargetException { - PropertyData p = (PropertyData) properties.get(name); + PropertyData p = properties.get(name); if (p == null) { throw new UnknownPropertyException(name, object); } @@ -1008,7 +1008,7 @@ public final class PropertySetMixin { private PropertyData get(Object object, String propertyName) throws UnknownPropertyException { - PropertyData p = (PropertyData) properties.get(propertyName); + PropertyData p = properties.get(propertyName); if (p == null || !p.present) { throw new UnknownPropertyException(propertyName, object); } @@ -1057,7 +1057,7 @@ public final class PropertySetMixin { } public boolean hasPropertyByName(String name) { - PropertyData p = (PropertyData) properties.get(name); + PropertyData p = properties.get(name); return p != null && p.present; } |