use Collections.singletonList and Collections.emptyList where appropriate
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1777056 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b8e9fcef73
commit
9eb965304c
@ -21,7 +21,7 @@ import java.io.ByteArrayInputStream;
|
|||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.Arrays;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.zip.InflaterInputStream;
|
import java.util.zip.InflaterInputStream;
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ public final class Picture
|
|||||||
|
|
||||||
private PICF _picf;
|
private PICF _picf;
|
||||||
private PICFAndOfficeArtData _picfAndOfficeArtData;
|
private PICFAndOfficeArtData _picfAndOfficeArtData;
|
||||||
private List<? extends EscherRecord> _blipRecords;
|
private final List<? extends EscherRecord> _blipRecords;
|
||||||
|
|
||||||
private byte[] content;
|
private byte[] content;
|
||||||
private int dataBlockStartOfsset;
|
private int dataBlockStartOfsset;
|
||||||
@ -100,7 +100,7 @@ public final class Picture
|
|||||||
*/
|
*/
|
||||||
public Picture( EscherBlipRecord blipRecord )
|
public Picture( EscherBlipRecord blipRecord )
|
||||||
{
|
{
|
||||||
this._blipRecords = Arrays.asList(new EscherBlipRecord[] {blipRecord});
|
this._blipRecords = Collections.singletonList(blipRecord);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -116,6 +116,8 @@ public final class Picture
|
|||||||
|
|
||||||
if ( _picfAndOfficeArtData != null && _picfAndOfficeArtData.getBlipRecords() != null) {
|
if ( _picfAndOfficeArtData != null && _picfAndOfficeArtData.getBlipRecords() != null) {
|
||||||
_blipRecords = _picfAndOfficeArtData.getBlipRecords();
|
_blipRecords = _picfAndOfficeArtData.getBlipRecords();
|
||||||
|
} else {
|
||||||
|
_blipRecords = Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( fillBytes ) {
|
if ( fillBytes ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user