mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-05 16:56:04 +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,13 +122,7 @@ public class CDebugCorePlugin extends Plugin {
|
|||
* @return the unique identifier of this plugin
|
||||
*/
|
||||
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 getDefault().getBundle().getSymbolicName();
|
||||
return PLUGIN_ID;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -492,13 +492,7 @@ public class MIPlugin extends Plugin {
|
|||
* Convenience method which returns the unique identifier of this plugin.
|
||||
*/
|
||||
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 getDefault().getBundle().getSymbolicName();
|
||||
return PLUGIN_ID;
|
||||
}
|
||||
|
||||
public void debugLog(String message) {
|
||||
|
|
|
@ -56,12 +56,6 @@ public class MIUIPlugin extends AbstractUIPlugin {
|
|||
* @return the unique identifier of this plugin
|
||||
*/
|
||||
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 getDefault().getBundle().getSymbolicName();
|
||||
return PLUGIN_ID;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,13 +106,7 @@ public class CDebugUIPlugin extends AbstractUIPlugin {
|
|||
* Convenience method which returns the unique identifier of this plugin.
|
||||
*/
|
||||
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 getDefault().getBundle().getSymbolicName();
|
||||
return PLUGIN_ID;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue