aboutsummaryrefslogtreecommitdiff
path: root/src/patches
diff options
context:
space:
mode:
authormaslovalex <none@none>2017-10-07 23:51:49 +0300
committermaslovalex <none@none>2017-10-07 23:51:49 +0300
commit801443608a6b247d17b9eea373a2aa3bf0cb70a6 (patch)
tree248d27fa8ac5e519e38119e683c59de8c5189adf /src/patches
parent3be41836937952449ccd3eea54ade39c5d90de60 (diff)
downloadsnakeyaml-801443608a6b247d17b9eea373a2aa3bf0cb70a6.tar.gz
Fixes -Pandroid build
- fixed PropertyUtils.patch - added PropertyTest.patch because Android version does not contain MethodProperty.
Diffstat (limited to 'src/patches')
-rw-r--r--src/patches/android/PropertyTest.patch21
-rw-r--r--src/patches/android/PropertyUtils.patch22
2 files changed, 32 insertions, 11 deletions
diff --git a/src/patches/android/PropertyTest.patch b/src/patches/android/PropertyTest.patch
new file mode 100644
index 00000000..a77ba2ce
--- /dev/null
+++ b/src/patches/android/PropertyTest.patch
@@ -0,0 +1,21 @@
+diff --git a/src/test/java/org/yaml/snakeyaml/introspector/PropertyTest.java b/src/test/java/org/yaml/snakeyaml/introspector/PropertyTest.java
+--- a/src/test/java/org/yaml/snakeyaml/introspector/PropertyTest.java
++++ b/src/test/java/org/yaml/snakeyaml/introspector/PropertyTest.java
+@@ -33,17 +33,6 @@
+ public class PropertyTest {
+
+ @Test
+- public void testMethodPropertyToString() throws IntrospectionException {
+- for (PropertyDescriptor property : Introspector.getBeanInfo(TestBean1.class)
+- .getPropertyDescriptors()) {
+- if (property.getName().equals("text")) {
+- MethodProperty prop = new MethodProperty(property);
+- assertEquals("text of class java.lang.String", prop.toString());
+- }
+- }
+- }
+-
+- @Test
+ public void testGetFieldPropertyAnnotation() {
+ PropertyUtils propertyUtils = new PropertyUtils();
+ propertyUtils.setBeanAccess(BeanAccess.FIELD);
diff --git a/src/patches/android/PropertyUtils.patch b/src/patches/android/PropertyUtils.patch
index afc4f16d..b59b5e1d 100644
--- a/src/patches/android/PropertyUtils.patch
+++ b/src/patches/android/PropertyUtils.patch
@@ -4,12 +4,11 @@
diff --git a/src/main/java/org/yaml/snakeyaml/introspector/PropertyUtils.java b/src/main/java/org/yaml/snakeyaml/introspector/PropertyUtils.java
--- a/src/main/java/org/yaml/snakeyaml/introspector/PropertyUtils.java
+++ b/src/main/java/org/yaml/snakeyaml/introspector/PropertyUtils.java
-@@ -15,14 +15,7 @@
+@@ -15,13 +15,7 @@
*/
package org.yaml.snakeyaml.introspector;
-
+
-import java.beans.FeatureDescriptor;
--
-import java.beans.IntrospectionException;
-import java.beans.Introspector;
-import java.beans.PropertyDescriptor;
@@ -19,24 +18,25 @@ diff --git a/src/main/java/org/yaml/snakeyaml/introspector/PropertyUtils.java b/
import java.lang.reflect.Modifier;
import java.util.Collection;
import java.util.HashMap;
-@@ -30,14 +23,11 @@
+@@ -29,15 +23,12 @@
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
-import java.util.logging.Logger;
-
+
import org.yaml.snakeyaml.error.YAMLException;
-
+ import org.yaml.snakeyaml.util.PlatformFeatureDetector;
+
public class PropertyUtils {
-
+
- final private static Logger log = Logger.getLogger(PropertyUtils.class.getPackage().getName());
-
private final Map<Class<?>, Map<String, Property>> propertiesCache = new HashMap<Class<?>, Map<String, Property>>();
private final Map<Class<?>, Set<Property>> readableProperties = new HashMap<Class<?>, Set<Property>>();
private BeanAccess beanAccess = BeanAccess.DEFAULT;
-@@ -50,9 +40,6 @@
+@@ -68,9 +59,6 @@
}
-
+
Map<String, Property> properties = new LinkedHashMap<String, Property>();
- boolean inaccessableFieldsExist = false;
- switch (bAccess) {
@@ -44,7 +44,7 @@ diff --git a/src/main/java/org/yaml/snakeyaml/introspector/PropertyUtils.java b/
for (Class<?> c = type; c != null; c = c.getSuperclass()) {
for (Field field : c.getDeclaredFields()) {
int modifiers = field.getModifiers();
-@@ -62,76 +49,10 @@
+@@ -80,76 +68,10 @@
}
}
}
@@ -85,7 +85,7 @@ diff --git a/src/main/java/org/yaml/snakeyaml/introspector/PropertyUtils.java b/
propertiesCache.put(type, properties);
return properties;
}
-
+
- private boolean transientMethodChecked;
- private Method isTransientMethod;
-