Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 254982 Details for
Bug 471950
NullPointerException from TargetPlatformHelper on AUT launch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
missing null pointer checks
TargetPlatformHelper_diff.txt (text/plain), 2.66 KB, created by
Joseph Benken
on 2015-07-06 13:18:11 EDT
(
hide
)
Description:
missing null pointer checks
Filename:
MIME Type:
Creator:
Joseph Benken
Created:
2015-07-06 13:18:11 EDT
Size:
2.66 KB
patch
obsolete
>diff --git a/launching/org.eclipse.rcptt.launching.ext/src/org/eclipse/rcptt/launching/internal/target/TargetPlatformHelper.java b/launching/org.eclipse.rcptt.launching.ext/src/org/eclipse/rcptt/launching/internal/target/TargetPlatformHelper.java >old mode 100644 >new mode 100755 >index a323e68..d04c07c >--- a/launching/org.eclipse.rcptt.launching.ext/src/org/eclipse/rcptt/launching/internal/target/TargetPlatformHelper.java >+++ b/launching/org.eclipse.rcptt.launching.ext/src/org/eclipse/rcptt/launching/internal/target/TargetPlatformHelper.java >@@ -87,6 +87,7 @@ import org.eclipse.rcptt.launching.injection.Directory; > import org.eclipse.rcptt.launching.injection.Entry; > import org.eclipse.rcptt.launching.injection.InjectionConfiguration; > import org.eclipse.rcptt.launching.injection.UpdateSite; >+import org.eclipse.rcptt.launching.internal.target.Q7Target.AutInstall; > import org.eclipse.rcptt.launching.p2utils.P2Utils; > import org.eclipse.rcptt.launching.target.ITargetPlatformHelper; > import org.eclipse.rcptt.launching.target.TargetPlatformManager; >@@ -328,11 +329,14 @@ public class TargetPlatformHelper implements ITargetPlatformHelper { > > public String getTargetPlatformProfilePath() { > ProfileBundleContainer container = (ProfileBundleContainer) getInstanceContainer(); >- try { >- return container.getLocation(true).toString(); >- } catch (CoreException e) { >- throw new RuntimeException(e); >+ if (container != null) { >+ try { >+ return container.getLocation(true).toString(); >+ } catch (CoreException e) { >+ throw new RuntimeException(e); >+ } > } >+ return null; > } > > public void delete() { >@@ -674,7 +678,10 @@ public class TargetPlatformHelper implements ITargetPlatformHelper { > IProgressMonitor monitor) { > // remove the "host" from bundles, it is handled in a separate, special > // way >- Iterables.removeAll(extra, Arrays.asList(getInstanceContainer())); >+ ProfileBundleContainer instanceContainer = getInstanceContainer(); >+ if (instanceContainer != null) { >+ Iterables.removeAll(extra, Arrays.asList(instanceContainer)); >+ } > > EList<Entry> entries = configuration.getEntries(); > monitor.beginTask("Apply injection plugins", 20 + entries.size() * 20); >@@ -1245,7 +1252,15 @@ public class TargetPlatformHelper implements ITargetPlatformHelper { > } > > ProfileBundleContainer getInstanceContainer() { >- return getQ7Target().getInstall().container; >+ ProfileBundleContainer ret = null; >+ Q7Target q7Target = getQ7Target(); >+ if (q7Target != null) { >+ AutInstall autInstall = q7Target.getInstall(); >+ if (autInstall != null) { >+ ret = autInstall.container; >+ } >+ } >+ return ret; > } > > public void setBundleContainers(ITargetLocation[] containers) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 471950
: 254982 |
254987