mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Possible NPE in "getUniqueIdentifier" if the plugin's bundle hasn't been loaded. Replaced by a constant string for the plugin id.
This commit is contained in:
parent
8563df14dc
commit
79c143bd48
4 changed files with 4 additions and 28 deletions
|
@ -122,14 +122,8 @@ public class CDebugCorePlugin extends Plugin {
|
||||||
* @return the unique identifier of this plugin
|
* @return the unique identifier of this plugin
|
||||||
*/
|
*/
|
||||||
public static String getUniqueIdentifier() {
|
public static String getUniqueIdentifier() {
|
||||||
if ( getDefault() == null ) {
|
|
||||||
// If the default instance is not yet initialized,
|
|
||||||
// return a static identifier. This identifier must
|
|
||||||
// match the plugin id defined in plugin.xml
|
|
||||||
return PLUGIN_ID;
|
return PLUGIN_ID;
|
||||||
}
|
}
|
||||||
return getDefault().getBundle().getSymbolicName();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs the specified throwable with this plug-in's log.
|
* Logs the specified throwable with this plug-in's log.
|
||||||
|
|
|
@ -492,14 +492,8 @@ public class MIPlugin extends Plugin {
|
||||||
* Convenience method which returns the unique identifier of this plugin.
|
* Convenience method which returns the unique identifier of this plugin.
|
||||||
*/
|
*/
|
||||||
public static String getUniqueIdentifier() {
|
public static String getUniqueIdentifier() {
|
||||||
if (getDefault() == null) {
|
|
||||||
// If the default instance is not yet initialized,
|
|
||||||
// return a static identifier. This identifier must
|
|
||||||
// match the plugin id defined in plugin.xml
|
|
||||||
return PLUGIN_ID;
|
return PLUGIN_ID;
|
||||||
}
|
}
|
||||||
return getDefault().getBundle().getSymbolicName();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void debugLog(String message) {
|
public void debugLog(String message) {
|
||||||
if (getDefault().isDebugging()) {
|
if (getDefault().isDebugging()) {
|
||||||
|
|
|
@ -56,12 +56,6 @@ public class MIUIPlugin extends AbstractUIPlugin {
|
||||||
* @return the unique identifier of this plugin
|
* @return the unique identifier of this plugin
|
||||||
*/
|
*/
|
||||||
public static String getUniqueIdentifier() {
|
public static String getUniqueIdentifier() {
|
||||||
if ( getDefault() == null ) {
|
|
||||||
// If the default instance is not yet initialized,
|
|
||||||
// return a static identifier. This identifier must
|
|
||||||
// match the plugin id defined in plugin.xml
|
|
||||||
return PLUGIN_ID;
|
return PLUGIN_ID;
|
||||||
}
|
}
|
||||||
return getDefault().getBundle().getSymbolicName();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,14 +106,8 @@ public class CDebugUIPlugin extends AbstractUIPlugin {
|
||||||
* Convenience method which returns the unique identifier of this plugin.
|
* Convenience method which returns the unique identifier of this plugin.
|
||||||
*/
|
*/
|
||||||
public static String getUniqueIdentifier() {
|
public static String getUniqueIdentifier() {
|
||||||
if ( getDefault() == null ) {
|
|
||||||
// If the default instance is not yet initialized,
|
|
||||||
// return a static identifier. This identifier must
|
|
||||||
// match the plugin id defined in plugin.xml
|
|
||||||
return PLUGIN_ID;
|
return PLUGIN_ID;
|
||||||
}
|
}
|
||||||
return getDefault().getBundle().getSymbolicName();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the a color based on the type of output. Valid types:
|
* Returns the a color based on the type of output. Valid types:
|
||||||
|
|
Loading…
Add table
Reference in a new issue