Revision 722
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/util/impl/DefaultFolderSet.java | ||
---|---|---|
97 | 97 |
while (it.hasNext()) { |
98 | 98 |
FolderEntry folderEntry = (FolderEntry) it.next(); |
99 | 99 |
File[] files = folderEntry.getFolder().listFiles(); |
100 |
entries.addAll(Arrays.asList(files)); |
|
100 |
if (files != null) { |
|
101 |
entries.addAll(Arrays.asList(files)); |
|
102 |
} |
|
101 | 103 |
} |
102 | 104 |
return (File[]) entries.toArray(new File[entries.size()]); |
103 | 105 |
} |
... | ... | |
108 | 110 |
while (it.hasNext()) { |
109 | 111 |
FolderEntry folderEntry = (FolderEntry) it.next(); |
110 | 112 |
File[] files = folderEntry.getFolder().listFiles(filter); |
111 |
entries.addAll(Arrays.asList(files)); |
|
113 |
if (files != null) { |
|
114 |
entries.addAll(Arrays.asList(files)); |
|
115 |
} |
|
116 |
|
|
112 | 117 |
} |
113 | 118 |
return (File[]) entries.toArray(new File[entries.size()]); |
114 | 119 |
} |
... | ... | |
119 | 124 |
while (it.hasNext()) { |
120 | 125 |
FolderEntry folderEntry = (FolderEntry) it.next(); |
121 | 126 |
File[] files = folderEntry.getFolder().listFiles(filter); |
122 |
entries.addAll(Arrays.asList(files)); |
|
127 |
if (files != null) { |
|
128 |
entries.addAll(Arrays.asList(files)); |
|
129 |
} |
|
123 | 130 |
} |
124 | 131 |
return (File[]) entries.toArray(new File[entries.size()]); |
125 | 132 |
} |
... | ... | |
153 | 160 |
while (it.hasNext()) { |
154 | 161 |
FolderEntry folderEntry = (FolderEntry) it.next(); |
155 | 162 |
String[] files = folderEntry.getFolder().list(); |
156 |
entries.addAll(Arrays.asList(files)); |
|
163 |
if (files != null) { |
|
164 |
entries.addAll(Arrays.asList(files)); |
|
165 |
} |
|
157 | 166 |
} |
158 | 167 |
return (String[]) entries.toArray(new String[entries.size()]); |
159 | 168 |
} |
... | ... | |
164 | 173 |
while (it.hasNext()) { |
165 | 174 |
FolderEntry folderEntry = (FolderEntry) it.next(); |
166 | 175 |
String[] files = folderEntry.getFolder().list(filter); |
167 |
entries.addAll(Arrays.asList(files)); |
|
176 |
if (files != null) { |
|
177 |
entries.addAll(Arrays.asList(files)); |
|
178 |
} |
|
168 | 179 |
} |
169 | 180 |
return (String[]) entries.toArray(new String[entries.size()]); |
170 | 181 |
} |
Also available in: Unified diff