Introduce lame effort to avoid NPE problems in calling createRegistry().

Thu, 12 Feb 2015 21:48:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 12 Feb 2015 21:48:00 +0100
changeset 17
b9ad6f933bc9
parent 16
c87042164cd8
child 19
87d37281ea41

Introduce lame effort to avoid NPE problems in calling createRegistry().

build.gradle file | annotate | diff | comparison | revisions
src/org/gege/caldavsyncadapter/android/entities/AndroidEvent.java file | annotate | diff | comparison | revisions
     1.1 --- a/build.gradle	Thu Feb 12 21:40:00 2015 +0100
     1.2 +++ b/build.gradle	Thu Feb 12 21:48:00 2015 +0100
     1.3 @@ -43,6 +43,7 @@
     1.4  }
     1.5  
     1.6  dependencies {
     1.7 +    compile 'junit:junit:4.+'
     1.8      compile 'com.android.support:support-v4:19.1.0'
     1.9      compile 'backport-util-concurrent:backport-util-concurrent:3.1'
    1.10      compile 'org.apache.commons:commons-lang3:3.2'
     2.1 --- a/src/org/gege/caldavsyncadapter/android/entities/AndroidEvent.java	Thu Feb 12 21:40:00 2015 +0100
     2.2 +++ b/src/org/gege/caldavsyncadapter/android/entities/AndroidEvent.java	Thu Feb 12 21:48:00 2015 +0100
     2.3 @@ -72,6 +72,8 @@
     2.4  import java.net.URISyntaxException;
     2.5  import java.text.ParseException;
     2.6  
     2.7 +import static org.junit.Assert.*;
     2.8 +
     2.9  //import android.accounts.Account;
    2.10  //import android.content.ContentProviderClient;
    2.11  //import android.content.ContentValues;
    2.12 @@ -317,6 +319,7 @@
    2.13      public boolean createIcs(String strUid) {
    2.14          boolean Result = false;
    2.15          TimeZone timeZone = null;
    2.16 +        assertNotNull(Thread.currentThread().getContextClassLoader());
    2.17          TimeZoneRegistry registry = TimeZoneRegistryFactory.getInstance().createRegistry();
    2.18  //TODO: do not simply create the ics-file new. take into account the RAWDATA if available
    2.19  		/* 

mercurial