From 066840a1a51e216d545f185554ff2beb13562417 Mon Sep 17 00:00:00 2001 From: Andy Clement Date: Mon, 16 Sep 2019 13:13:20 -0700 Subject: Fix Bug 551084 - NullPointerException at org.aspectj.ajdt.internal.core.builder.AjBuildManager.checkRtJar --- .../ajdt/internal/core/builder/AjBuildManager.java | 34 +++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'org.aspectj.ajdt.core') diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java index e7419680e..71f605dfc 100644 --- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java +++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java @@ -1,13 +1,13 @@ /* ******************************************************************* * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC). - * All rights reserved. - * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * PARC initial implementation + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * PARC initial implementation * ******************************************************************/ package org.aspectj.ajdt.internal.core.builder; @@ -947,7 +947,7 @@ public class AjBuildManager implements IOutputClassFileNameProvider, IBinarySour // a classpathDirectory object that will attempt to look for source when it can't find binary. // int[] classpathModes = new int[classpaths.length]; // for (int i =0 ;i= ClassFileConstants.JDK1_6 && bMain.compilerOptions.processAnnotations) { @@ -1340,7 +1340,7 @@ public class AjBuildManager implements IOutputClassFileNameProvider, IBinarySour if (buildConfig == null || buildConfig.getFullClasspath() == null) { return "no classpath specified"; } - + for (String s: buildConfig.getFullClasspath()) { if (s.endsWith("runtime/target/classes")) { // doing an AspectJ build @@ -1350,7 +1350,7 @@ public class AjBuildManager implements IOutputClassFileNameProvider, IBinarySour String ret = null; for (Iterator it = buildConfig.getFullClasspath().iterator(); it.hasNext();) { - File p = new File((String) it.next()); + File p = new File(it.next()); // pr112830, allow variations on aspectjrt.jar of the form aspectjrtXXXXXX.jar if (p.isFile() && p.getName().startsWith("aspectjrt") && p.getName().endsWith(".jar")) { @@ -1369,7 +1369,7 @@ public class AjBuildManager implements IOutputClassFileNameProvider, IBinarySour } } // assume that users of development aspectjrt.jar know what they're doing - if (Version.DEVELOPMENT.equals(version) || version.endsWith("BUILD-SNAPSHOT")) { + if (version != null && (Version.DEVELOPMENT.equals(version) || version.endsWith("BUILD-SNAPSHOT"))) { // MessageUtil.info(holder, // "running with development version of aspectjrt.jar in " + // p.getAbsolutePath()); -- cgit v1.2.3