Skip to content

Commit 92f37a9

Browse files
eclipse-platform-botakurtakov
authored andcommitted
Perform clean code of debug/org.eclipse.debug.examples.core
1 parent 392e639 commit 92f37a9

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

debug/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/DebugCorePlugin.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,9 @@ public static String getResourceString(String key) {
114114
*/
115115
public ResourceBundle getResourceBundle() {
116116
try {
117-
if (resourceBundle == null)
117+
if (resourceBundle == null) {
118118
resourceBundle = ResourceBundle.getBundle("org.eclipse.debug.examples.core.pda.DebugCorePluginResources"); //$NON-NLS-1$
119+
}
119120
} catch (MissingResourceException x) {
120121
resourceBundle = null;
121122
}

debug/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/launcher/PDALaunchDelegate.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public void launch(ILaunchConfiguration configuration, String mode, ILaunch laun
6363
}
6464
File exe = new File(javaVMExec);
6565
if (!exe.exists()) {
66-
abort(MessageFormat.format("Specified java VM executable {0} does not exist.", new Object[]{javaVMExec}), null); //$NON-NLS-1$
66+
abort(MessageFormat.format("Specified java VM executable {0} does not exist.", javaVMExec), null); //$NON-NLS-1$
6767
}
6868
commandList.add(javaVMExec);
6969

@@ -80,7 +80,7 @@ public void launch(ILaunchConfiguration configuration, String mode, ILaunch laun
8080

8181
IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(IPath.fromOSString(program));
8282
if (!file.exists()) {
83-
abort(MessageFormat.format("Perl program {0} does not exist.", new Object[] { file.getFullPath().toString() }), null); //$NON-NLS-1$
83+
abort(MessageFormat.format("Perl program {0} does not exist.", file.getFullPath().toString()), null); //$NON-NLS-1$
8484
}
8585

8686
commandList.add(file.getLocation().toOSString());

debug/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAStackFrame.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,7 @@ public String getSourceName() {
195195

196196
@Override
197197
public boolean equals(Object obj) {
198-
if (obj instanceof PDAStackFrame) {
199-
PDAStackFrame sf = (PDAStackFrame)obj;
198+
if (obj instanceof PDAStackFrame sf) {
200199
return sf.getThread().equals(getThread()) &&
201200
sf.getSourceName().equals(getSourceName()) &&
202201
sf.fId == fId;

debug/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAThread.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,7 @@ public Object getError() {
296296

297297
@Override
298298
public void handleEvent(PDAEvent _event) {
299-
if (_event instanceof PDARunControlEvent && fThreadId == ((PDARunControlEvent)_event).fThreadId) {
300-
PDARunControlEvent event = (PDARunControlEvent)_event;
299+
if (_event instanceof PDARunControlEvent event && fThreadId == event.fThreadId) {
301300
// clear previous state
302301
fBreakpoint = null;
303302
setStepping(false);

0 commit comments

Comments
 (0)