maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tibordig...@apache.org
Subject [maven-surefire] 01/02: fixed the build and old tests
Date Fri, 25 Sep 2020 07:46:23 GMT
This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch base64
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git

commit d548e8c37447aa250e91bac1990f7d358a2bbf60
Author: tibordigana <tibordigana@apache.org>
AuthorDate: Tue Sep 22 23:22:54 2020 +0200

    fixed the build and old tests
---
 .../surefire/extensions/EventConsumerThread.java   | 18 ++++++++++-----
 .../booterclient/ForkingRunListenerTest.java       | 27 ++++++++++++++++++----
 .../plugin/surefire/booterclient/MainClass.java    |  2 +-
 .../output/ThreadedStreamConsumerTest.java         |  2 +-
 .../extensions/EventConsumerThreadTest.java        | 22 +++++++++++++++++-
 .../extensions/ForkedProcessEventNotifierTest.java | 22 ++++++++++--------
 .../org/apache/maven/surefire/JUnit4SuiteTest.java |  2 ++
 .../maven/surefire/extensions/ForkChannelTest.java | 11 ++++++---
 .../spi/LegacyMasterProcessChannelEncoder.java     |  6 +++--
 9 files changed, 83 insertions(+), 29 deletions(-)

diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/EventConsumerThread.java
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/EventConsumerThread.java
index 496cba5..2647b60 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/EventConsumerThread.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/EventConsumerThread.java
@@ -150,7 +150,7 @@ public class EventConsumerThread extends CloseableDaemonThread
     private static final int DELIMITER_LENGTH = 1;
     private static final int BYTE_LENGTH = 1;
     private static final int INT_LENGTH = 4;
-    public static final int NO_POSITION = -1;
+    private static final int NO_POSITION = -1;
 
     private final ReadableByteChannel channel;
     private final EventHandler<Event> eventHandler;
@@ -314,6 +314,7 @@ public class EventConsumerThread extends CloseableDaemonThread
     }
 
     @Nonnull
+    @SuppressWarnings( "checkstyle:magicnumber" )
     protected Segment readSegment( Memento memento ) throws IOException, MalformedFrameException
     {
         int readCount = readByte( memento ) & 0xff;
@@ -326,6 +327,7 @@ public class EventConsumerThread extends CloseableDaemonThread
     }
 
     @Nonnull
+    @SuppressWarnings( "checkstyle:magicnumber" )
     protected Charset readCharset( Memento memento ) throws IOException, MalformedFrameException
     {
         int length = readByte( memento ) & 0xff;
@@ -386,6 +388,7 @@ public class EventConsumerThread extends CloseableDaemonThread
         checkDelimiter( memento );
     }
 
+    @SuppressWarnings( "checkstyle:magicnumber" )
     private static void checkDelimiter( Memento memento ) throws MalformedFrameException
     {
         ByteBuffer bb = memento.bb;
@@ -710,7 +713,7 @@ public class EventConsumerThread extends CloseableDaemonThread
     static Map<Segment, ForkedProcessEventType> mapEventTypes()
     {
         Map<Segment, ForkedProcessEventType> map = new HashMap<>();
-        for (ForkedProcessEventType e : ForkedProcessEventType.values() )
+        for ( ForkedProcessEventType e : ForkedProcessEventType.values() )
         {
             byte[] array = e.getOpcode().getBytes( US_ASCII );
             map.put( new Segment( array, 0, array.length ), e );
@@ -755,7 +758,7 @@ public class EventConsumerThread extends CloseableDaemonThread
         private int positionByteBuffer;
         private boolean isNewLine;
 
-        public BufferedStream( int capacity )
+        BufferedStream( int capacity )
         {
             this.buffer = new byte[capacity];
         }
@@ -905,7 +908,7 @@ public class EventConsumerThread extends CloseableDaemonThread
         private final int length;
         private final int hashCode;
 
-        public Segment( byte[] array, int fromIndex, int length )
+        Segment( byte[] array, int fromIndex, int length )
         {
             this.array = array;
             this.fromIndex = fromIndex;
@@ -913,7 +916,7 @@ public class EventConsumerThread extends CloseableDaemonThread
 
             int hashCode = 0;
             int i = fromIndex;
-            for (int loops = length >> 1; loops-- != 0; )
+            for ( int loops = length >> 1; loops-- != 0; )
             {
                 hashCode = 31 * hashCode + array[i++];
                 hashCode = 31 * hashCode + array[i++];
@@ -952,7 +955,10 @@ public class EventConsumerThread extends CloseableDaemonThread
         }
     }
 
-    public static class MalformedFrameException extends Exception
+    /**
+     *
+     */
+    static class MalformedFrameException extends Exception
     {
         private final int readFrom;
         private final int readTo;
diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkingRunListenerTest.java
b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkingRunListenerTest.java
index 8d3a3e5..8887e4d 100644
--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkingRunListenerTest.java
+++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkingRunListenerTest.java
@@ -45,6 +45,7 @@ import javax.annotation.Nonnull;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.Closeable;
+import java.io.File;
 import java.io.PrintStream;
 import java.nio.channels.ReadableByteChannel;
 import java.util.ArrayList;
@@ -57,7 +58,13 @@ import java.util.concurrent.TimeUnit;
 
 import static org.apache.maven.surefire.api.util.internal.Channels.newBufferedChannel;
 import static org.apache.maven.surefire.api.util.internal.Channels.newChannel;
+import static org.fest.assertions.Assertions.assertThat;
+import static org.fest.assertions.MapAssert.entry;
+import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyZeroInteractions;
 import static org.mockito.Mockito.when;
 
 /**
@@ -193,20 +200,27 @@ public class ForkingRunListenerTest
         TestSetMockReporterFactory providerReporterFactory = new TestSetMockReporterFactory();
         ForkClient forkStreamClient = new ForkClient( providerReporterFactory, new MockNotifiableTestStream(),
1 );
 
-        byte[] cmd = ":maven-surefire-event:sys-prop:normal-run:UTF-8:azE=:djE=:\n".getBytes();
+        byte[] cmd = ( ":maven-surefire-event:\u0008:sys-prop:" + (char) 10 + ":normal-run:\u0005:UTF-8:"
+            + "\u0000\u0000\u0000\u0002:k1:\u0000\u0000\u0000\u0002:v1:\n" ).getBytes();
         for ( Event e : streamToEvent( cmd ) )
         {
             forkStreamClient.handleEvent( e );
         }
-        cmd = "\n:maven-surefire-event:sys-prop:normal-run:UTF-8:azI=:djI=:\n".getBytes();
+        cmd = ( "\n:maven-surefire-event:\u0008:sys-prop:" + (char) 10 + ":normal-run:\u0005:UTF-8:"
+            + "\u0000\u0000\u0000\u0002:k2:\u0000\u0000\u0000\u0002:v2:\n" ).getBytes();
         for ( Event e : streamToEvent( cmd ) )
         {
             forkStreamClient.handleEvent( e );
         }
 
-        assertTrue( forkStreamClient.getTestVmSystemProperties().size() == 2 );
-        assertTrue( forkStreamClient.getTestVmSystemProperties().containsKey( "k1" ) );
-        assertTrue( forkStreamClient.getTestVmSystemProperties().containsKey( "k2" ) );
+        assertThat( forkStreamClient.getTestVmSystemProperties() )
+            .hasSize( 2 );
+
+        assertThat( forkStreamClient.getTestVmSystemProperties() )
+            .includes( entry( "k1", "v1" ) );
+
+        assertThat( forkStreamClient.getTestVmSystemProperties() )
+            .includes( entry( "k2", "v2" ) );
     }
 
     public void testMultipleEntries() throws Exception
@@ -286,12 +300,15 @@ public class ForkingRunListenerTest
         CountdownCloseable countdown = new CountdownCloseable( mock( Closeable.class ), 1
);
         ConsoleLogger logger = mock( ConsoleLogger.class );
         ForkNodeArguments arguments = mock( ForkNodeArguments.class );
+        when( arguments.dumpStreamText( anyString() ) ).thenReturn( new File( "" ) );
         when( arguments.getConsoleLogger() ).thenReturn( logger );
         ReadableByteChannel channel = newChannel( new ByteArrayInputStream( stream ) );
         try ( EventConsumerThread t = new EventConsumerThread( "t", channel, handler, countdown,
arguments ) )
         {
             t.start();
             countdown.awaitClosed();
+            verifyZeroInteractions( logger );
+            verify( arguments, never() ).dumpStreamText( anyString() );
             for ( int i = 0, size = handler.countEventsInCache(); i < size; i++ )
             {
                 events.add( handler.pullEvent() );
diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/MainClass.java
b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/MainClass.java
index dc435b5..3d58ade 100644
--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/MainClass.java
+++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/MainClass.java
@@ -34,7 +34,7 @@ public class MainClass
         }
         else
         {
-            System.out.println( ":maven-surefire-event:bye:" );
+            System.out.println( ":maven-surefire-event:\u0003:bye:" );
             String byeAck = ":maven-surefire-command:bye-ack:";
             byte[] cmd = new byte[byeAck.length()];
             int len = System.in.read( cmd );
diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/output/ThreadedStreamConsumerTest.java
b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/output/ThreadedStreamConsumerTest.java
index a859c76..3c1fd37 100644
--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/output/ThreadedStreamConsumerTest.java
+++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/output/ThreadedStreamConsumerTest.java
@@ -123,7 +123,7 @@ public class ThreadedStreamConsumerTest
     }
 
     @Test
-    public void test3() throws Exception
+    public void testBasicStatus() throws Exception
     {
         final QueueSynchronizer<String> sync = new QueueSynchronizer<>( 2, null
);
         sync.pushNext( "1" );
diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/extensions/EventConsumerThreadTest.java
b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/extensions/EventConsumerThreadTest.java
index da681fc..63287df 100644
--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/extensions/EventConsumerThreadTest.java
+++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/extensions/EventConsumerThreadTest.java
@@ -1,5 +1,24 @@
 package org.apache.maven.plugin.surefire.extensions;
 
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 import org.apache.maven.plugin.surefire.extensions.EventConsumerThread.Memento;
 import org.apache.maven.plugin.surefire.extensions.EventConsumerThread.Segment;
 import org.apache.maven.plugin.surefire.extensions.EventConsumerThread.SegmentType;
@@ -155,6 +174,7 @@ import static org.powermock.reflect.Whitebox.invokeMethod;
  *     }
  * </pre>
  */
+@SuppressWarnings( "checkstyle:magicnumber" )
 public class EventConsumerThreadTest
 {
     private static final CountdownCloseable COUNTDOWN_CLOSEABLE = new CountdownCloseable(
new MockCloseable(), 0 );
@@ -1088,7 +1108,7 @@ public class EventConsumerThreadTest
         private final int chunkSize;
         protected int i;
 
-        public Channel( byte[] bytes, int chunkSize )
+        Channel( byte[] bytes, int chunkSize )
         {
             this.bytes = bytes;
             this.chunkSize = chunkSize;
diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/extensions/ForkedProcessEventNotifierTest.java
b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/extensions/ForkedProcessEventNotifierTest.java
index 0b2ee68..b83884a 100644
--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/extensions/ForkedProcessEventNotifierTest.java
+++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/extensions/ForkedProcessEventNotifierTest.java
@@ -77,11 +77,11 @@ import static org.apache.maven.surefire.api.report.RunMode.NORMAL_RUN;
 import static org.apache.maven.surefire.api.util.internal.Channels.newBufferedChannel;
 import static org.apache.maven.surefire.api.util.internal.Channels.newChannel;
 import static org.fest.assertions.Assertions.assertThat;
-import static org.fest.assertions.Index.atIndex;
 import static org.junit.Assert.assertTrue;
 import static org.junit.rules.ExpectedException.none;
 import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.verifyZeroInteractions;
@@ -200,9 +200,9 @@ public class ForkedProcessEventNotifierTest
             assertThat( decodedReportEntry.getMessage() ).isEqualTo( reportEntry.getMessage()
);
             assertThat( decodedReportEntry.getStackTraceWriter() ).isNull();
 
-            decodedReportEntry = EventConsumerThread.newReportEntry( reportEntry.getSourceName(),
reportEntry.getSourceText(),
-                reportEntry.getName(), reportEntry.getNameText(), reportEntry.getGroup(),
reportEntry.getMessage(),
-                null, exceptionMessage, smartStackTrace, null );
+            decodedReportEntry = EventConsumerThread.newReportEntry( reportEntry.getSourceName(),
+                reportEntry.getSourceText(), reportEntry.getName(), reportEntry.getNameText(),
reportEntry.getGroup(),
+                reportEntry.getMessage(), null, exceptionMessage, smartStackTrace, null );
 
             assertThat( decodedReportEntry ).isNotNull();
             assertThat( decodedReportEntry.getSourceName() ).isEqualTo( reportEntry.getSourceName()
);
@@ -240,9 +240,9 @@ public class ForkedProcessEventNotifierTest
             assertThat( decodedReportEntry.getStackTraceWriter().writeTraceToString() )
                 .isNull();
 
-            decodedReportEntry = EventConsumerThread.newReportEntry( reportEntry.getSourceName(),
reportEntry.getSourceText(),
-                reportEntry.getName(), reportEntry.getNameText(), reportEntry.getGroup(),
reportEntry.getMessage(),
-                1003, exceptionMessage, smartStackTrace, stackTrace );
+            decodedReportEntry = EventConsumerThread.newReportEntry( reportEntry.getSourceName(),
+                reportEntry.getSourceText(), reportEntry.getName(), reportEntry.getNameText(),
reportEntry.getGroup(),
+                reportEntry.getMessage(), 1003, exceptionMessage, smartStackTrace, stackTrace
);
 
             assertThat( decodedReportEntry ).isNotNull();
             assertThat( decodedReportEntry.getSourceName() ).isEqualTo( reportEntry.getSourceName()
);
@@ -261,9 +261,9 @@ public class ForkedProcessEventNotifierTest
             assertThat( decodedReportEntry.getStackTraceWriter().writeTraceToString() ).isEqualTo(
stackTrace );
             assertThat( decodedReportEntry.getStackTraceWriter().writeTrimmedTraceToString()
).isEqualTo( stackTrace );
 
-            decodedReportEntry = EventConsumerThread.newReportEntry( reportEntry.getSourceName(),
reportEntry.getSourceText(),
-                reportEntry.getName(), reportEntry.getNameText(), reportEntry.getGroup(),
reportEntry.getMessage(),
-                1003, exceptionMessage, smartStackTrace, trimmedStackTrace );
+            decodedReportEntry = EventConsumerThread.newReportEntry( reportEntry.getSourceName(),
+                reportEntry.getSourceText(), reportEntry.getName(), reportEntry.getNameText(),
reportEntry.getGroup(),
+                reportEntry.getMessage(), 1003, exceptionMessage, smartStackTrace, trimmedStackTrace
);
 
             assertThat( decodedReportEntry ).isNotNull();
             assertThat( decodedReportEntry.getSourceName() ).isEqualTo( reportEntry.getSourceName()
);
@@ -353,12 +353,14 @@ public class ForkedProcessEventNotifierTest
             ConsoleLogger logger = mock( ConsoleLogger.class );
             ForkNodeArguments arguments = mock( ForkNodeArguments.class );
             when( arguments.getConsoleLogger() ).thenReturn( logger );
+            when( arguments.dumpStreamText( anyString() ) ).thenReturn( new File( "" ) );
             try ( EventConsumerThread t = new EventConsumerThread( "t", channel, eventHandler,
countdown, arguments ) )
             {
                 t.start();
                 notifier.notifyEvent( eventHandler.pullEvent() );
             }
             verifyZeroInteractions( logger );
+            verify( arguments, never() ).dumpStreamText( anyString() );
             assertThat( listener.called.get() )
                 .isTrue();
         }
diff --git a/maven-surefire-common/src/test/java/org/apache/maven/surefire/JUnit4SuiteTest.java
b/maven-surefire-common/src/test/java/org/apache/maven/surefire/JUnit4SuiteTest.java
index 9770f8a..7692a04 100644
--- a/maven-surefire-common/src/test/java/org/apache/maven/surefire/JUnit4SuiteTest.java
+++ b/maven-surefire-common/src/test/java/org/apache/maven/surefire/JUnit4SuiteTest.java
@@ -44,6 +44,7 @@ import org.apache.maven.plugin.surefire.booterclient.output.ForkClientTest;
 import org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumerTest;
 import org.apache.maven.plugin.surefire.extensions.ConsoleOutputReporterTest;
 import org.apache.maven.plugin.surefire.extensions.E2ETest;
+import org.apache.maven.plugin.surefire.extensions.EventConsumerThreadTest;
 import org.apache.maven.plugin.surefire.extensions.ForkedProcessEventNotifierTest;
 import org.apache.maven.plugin.surefire.extensions.StatelessReporterTest;
 import org.apache.maven.plugin.surefire.extensions.StreamFeederTest;
@@ -114,6 +115,7 @@ public class JUnit4SuiteTest extends TestCase
         suite.addTest( new JUnit4TestAdapter( StreamFeederTest.class ) );
         suite.addTest( new JUnit4TestAdapter( E2ETest.class ) );
         suite.addTest( new JUnit4TestAdapter( ThreadedStreamConsumerTest.class ) );
+        suite.addTest( new JUnit4TestAdapter( EventConsumerThreadTest.class ) );
         return suite;
     }
 }
diff --git a/maven-surefire-common/src/test/java/org/apache/maven/surefire/extensions/ForkChannelTest.java
b/maven-surefire-common/src/test/java/org/apache/maven/surefire/extensions/ForkChannelTest.java
index a1bfe0d..8caa668 100644
--- a/maven-surefire-common/src/test/java/org/apache/maven/surefire/extensions/ForkChannelTest.java
+++ b/maven-surefire-common/src/test/java/org/apache/maven/surefire/extensions/ForkChannelTest.java
@@ -63,6 +63,7 @@ public class ForkChannelTest
     @Test( timeout = TESTCASE_TIMEOUT )
     public void shouldRequestReplyMessagesViaTCP() throws Exception
     {
+        final MockReporter reporter = new MockReporter();
         final String sessionId = UUID.randomUUID().toString();
         ForkNodeArguments forkNodeArguments = new ForkNodeArguments()
         {
@@ -102,7 +103,7 @@ public class ForkChannelTest
             @Nonnull
             public ConsoleLogger getConsoleLogger()
             {
-                return new MockReporter();
+                return reporter;
             }
         };
 
@@ -140,7 +141,7 @@ public class ForkChannelTest
             CountdownCloseable cc = new CountdownCloseable( closeable, 2 );
             Consumer consumer = new Consumer();
 
-            Client client = new Client( uri.getPort(), sessionId.toString() );
+            Client client = new Client( uri.getPort(), sessionId );
             client.start();
 
             channel.connectToClient();
@@ -159,6 +160,10 @@ public class ForkChannelTest
             assertThat( isCloseableCalled.await( TESTCASE_TIMEOUT, MILLISECONDS ) )
                 .isTrue();
 
+            assertThat( reporter.getEvents() )
+                .describedAs( "The decoder captured the list of stream errors: " + reporter.getData().toString()
)
+                .isEmpty();
+
             assertThat( consumer.lines )
                 .hasSize( 1 );
 
@@ -199,7 +204,7 @@ public class ForkChannelTest
                 int readLength = socket.getInputStream().read( data );
                 String token = new String( data, 0, readLength, US_ASCII );
                 assertThat( token ).isEqualTo( ":maven-surefire-command:noop:" );
-                socket.getOutputStream().write( ":maven-surefire-event:bye:".getBytes( US_ASCII
) );
+                socket.getOutputStream().write( ":maven-surefire-event:\u0003:bye:".getBytes(
US_ASCII ) );
             }
             catch ( IOException e )
             {
diff --git a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/spi/LegacyMasterProcessChannelEncoder.java
b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/spi/LegacyMasterProcessChannelEncoder.java
index 73a3651..f8cb224 100644
--- a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/spi/LegacyMasterProcessChannelEncoder.java
+++ b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/spi/LegacyMasterProcessChannelEncoder.java
@@ -79,6 +79,8 @@ import static org.apache.maven.surefire.api.report.RunMode.RERUN_TEST_AFTER_FAIL
 public class LegacyMasterProcessChannelEncoder implements MasterProcessChannelEncoder
 {
     private static final byte[] INT_BINARY = new byte[] {0, 0, 0, 0};
+    private static final byte BOOLEAN_NON_NULL_OBJECT = (byte) 0xff;
+    private static final byte BOOLEAN_NULL_OBJECT = (byte) 0;
 
     private final WritableBufferedByteChannel out;
     private final RunMode runMode;
@@ -459,11 +461,11 @@ public class LegacyMasterProcessChannelEncoder implements MasterProcessChannelEn
     {
         if ( i == null )
         {
-            result.put( (byte) 0 );
+            result.put( BOOLEAN_NULL_OBJECT );
         }
         else
         {
-            result.put( (byte) 0xff ).putInt( i );
+            result.put( BOOLEAN_NON_NULL_OBJECT ).putInt( i );
         }
         result.put( (byte) ':' );
     }


Mime
View raw message