File tree Expand file tree Collapse file tree
main/java/org/msgpack/template Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -301,12 +301,8 @@ private <T> Template<T> lookupAfterBuilding(Class<T> targetClass) {
301301 TemplateBuilder builder = chain .select (targetClass , true );
302302 Template <T > tmpl = null ;
303303 if (builder != null ) {
304- if (builder instanceof ArrayTemplateBuilder ) {
305- tmpl = builder .loadTemplate (targetClass );
306- } else {
307- // TODO #MN for Android, we should modify here
308- tmpl = chain .getForceBuilder ().loadTemplate (targetClass );
309- }
304+ // TODO #MN for Android, we should modify here
305+ tmpl = chain .getForceBuilder ().loadTemplate (targetClass );
310306 if (tmpl != null ) {
311307 register (targetClass , tmpl );
312308 return tmpl ;
Original file line number Diff line number Diff line change @@ -150,11 +150,16 @@ public <T> Template<T> loadTemplate(Type targetType) {
150150 // FIXME #MN must consider how to load "reference cycle class" in next
151151 // version
152152 Class <T > targetClass = (Class ) targetType ;
153- checkClassValidation (targetClass );
153+ // checkClassValidation(targetClass);
154154 try {
155155 // check loadable
156156 String tmplName = targetClass .getName () + "_$$_Template" ;
157- targetClass .getClassLoader ().loadClass (tmplName );
157+ ClassLoader cl = targetClass .getClassLoader ();
158+ if (cl != null ) {
159+ cl .loadClass (tmplName );
160+ } else {
161+ return null ;
162+ }
158163 } catch (ClassNotFoundException e ) {
159164 return null ;
160165 }
Original file line number Diff line number Diff line change 1717import org .msgpack .unpacker .BufferUnpacker ;
1818import org .msgpack .unpacker .Converter ;
1919
20-
21- @ Ignore
2220public class TestSimpleArrays {
2321
2422 @ Message
@@ -204,7 +202,7 @@ public GenericsTest() {
204202 }
205203
206204 @ SuppressWarnings ({ "unchecked" , "rawtypes" })
207- @ Test
205+ @ Ignore @ Test
208206 public void testGenerics () throws Exception {
209207 MessagePack msgpack = new MessagePack ();
210208
@@ -272,7 +270,7 @@ public Dim2Test() {
272270 }
273271
274272 @ SuppressWarnings ({ "unchecked" , "rawtypes" })
275- @ Test
273+ @ Ignore @ Test
276274 public void testDim2 () throws Exception {
277275 MessagePack msgpack = new MessagePack ();
278276 Dim2Test t = new Dim2Test ();
@@ -337,7 +335,7 @@ public Dim3Test() {
337335 }
338336
339337 @ SuppressWarnings ({ "unchecked" , "rawtypes" })
340- @ Test
338+ @ Ignore @ Test
341339 public void testDim3 () throws Exception {
342340 MessagePack msgpack = new MessagePack ();
343341
You can’t perform that action at this time.
0 commit comments