LPS-50674 Add a test which doubts about the behavior of finish method when ZipWriter is not properly set. Which should the expectation be here?

Hey Ray, I'm sending you this pull as you wrote ZipReader/Writter implementations. I wrote test to understand how those classes work, because there is one test (http://ci.liferay.org.es/jenkins/job/liferay-portal-master/29/testReport/com.liferay.portlet.journal.lar/JournalExportImportTest/testExportImportValidAvailableLocales) that randomly fails because a file is not present on the ZIP file (please see the link with the stacktrace). I know that this pull won't fix the test, but it will add coverage to those zip classes, and of course will give me background and preparation to fix the non-deterministic problem with the original failure. Thanks\!
yup, I got it

On Thu, Oct 9, 2014 at 6:42 PM, Manuel de la Peña <notifications@github.com>
wrote:

> In portal-impl/src/com/liferay/portal/zip/ZipWriterImpl.java:
>
> >  		addEntry(name, s.getBytes(StringPool.UTF8));
> >  	}
> >
> >  	@Override
> >  	public void addEntry(String name, StringBuilder sb) throws IOException {
> > +		if (sb == null) {
> > +			return;
> > +		}
> > +
> >  		addEntry(name, sb.toString());
> >  	}
> >
>
> I saw your point, so I believe that in that case an new empty sb should be
> passed. In any case, this is preventing the NPE exceptions on line 113 if
> sb is null.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/rotty3000/liferay-portal/pull/627/files#r18679402>.
>



-- 
*Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
 (@rotty3000)
Senior Software Architect
*Liferay, Inc.* <http://www.liferay.com> (@Liferay)