# HG changeset patch # User Michael Schloh von Bennewitz # Date 1423774080 -3600 # Node ID b9ad6f933bc913f9c59b6a73a6b7655ab85c60bd # Parent c87042164cd8475bdcb6ef3af1421301fb6e5a34 Introduce lame effort to avoid NPE problems in calling createRegistry(). diff -r c87042164cd8 -r b9ad6f933bc9 build.gradle --- a/build.gradle Thu Feb 12 21:40:00 2015 +0100 +++ b/build.gradle Thu Feb 12 21:48:00 2015 +0100 @@ -43,6 +43,7 @@ } dependencies { + compile 'junit:junit:4.+' compile 'com.android.support:support-v4:19.1.0' compile 'backport-util-concurrent:backport-util-concurrent:3.1' compile 'org.apache.commons:commons-lang3:3.2' diff -r c87042164cd8 -r b9ad6f933bc9 src/org/gege/caldavsyncadapter/android/entities/AndroidEvent.java --- a/src/org/gege/caldavsyncadapter/android/entities/AndroidEvent.java Thu Feb 12 21:40:00 2015 +0100 +++ b/src/org/gege/caldavsyncadapter/android/entities/AndroidEvent.java Thu Feb 12 21:48:00 2015 +0100 @@ -72,6 +72,8 @@ import java.net.URISyntaxException; import java.text.ParseException; +import static org.junit.Assert.*; + //import android.accounts.Account; //import android.content.ContentProviderClient; //import android.content.ContentValues; @@ -317,6 +319,7 @@ public boolean createIcs(String strUid) { boolean Result = false; TimeZone timeZone = null; + assertNotNull(Thread.currentThread().getContextClassLoader()); TimeZoneRegistry registry = TimeZoneRegistryFactory.getInstance().createRegistry(); //TODO: do not simply create the ics-file new. take into account the RAWDATA if available /*