修复Byte[]类型参数死循环的问题
This commit is contained in:
		
							parent
							
								
									dc83ba0356
								
							
						
					
					
						commit
						a2dede8448
					
				| @ -797,7 +797,17 @@ public class Convert | |||||||
|         } |         } | ||||||
|         else if (obj instanceof byte[] || obj instanceof Byte[]) |         else if (obj instanceof byte[] || obj instanceof Byte[]) | ||||||
|         { |         { | ||||||
|             return str((Byte[]) obj, charset); |             if (obj instanceof byte[]){ | ||||||
|  |                 return str((byte[]) obj, charset); | ||||||
|  |             } else { | ||||||
|  |                 Byte[] bytes = (Byte[])obj; | ||||||
|  |                 int length = bytes.length; | ||||||
|  |                 byte[] dest = new byte[length]; | ||||||
|  |                 for (int i = 0; i < length; i++) { | ||||||
|  |                     dest[i] = bytes[i]; | ||||||
|  |                 } | ||||||
|  |             return str (dest,charset); | ||||||
|  |             } | ||||||
|         } |         } | ||||||
|         else if (obj instanceof ByteBuffer) |         else if (obj instanceof ByteBuffer) | ||||||
|         { |         { | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 周艺峰
						周艺峰