Skip to content

Commit 95f300c

Browse files
author
zhourenjian
committed
Fixed a bug that null build state may cause build error!
1 parent ac2dc83 commit 95f300c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/net/sf/j2s/core/builder/JavaBuilder.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,9 @@ private SimpleLookupTable findDeltas() {
418418

419419
public State getLastState(IProject project) {
420420
org.eclipse.jdt.internal.core.builder.State lastBuiltState = (org.eclipse.jdt.internal.core.builder.State) JavaModelManager.getJavaModelManager().getLastBuiltState(project, notifier.monitor);
421+
if (lastBuiltState == null) {
422+
return null;
423+
}
421424
ByteArrayOutputStream baos = new ByteArrayOutputStream();
422425
DataOutputStream out = new DataOutputStream(baos);
423426
try {

0 commit comments

Comments
 (0)