Various cleanups
- missing copytight headers - unused imports - obsolete comments - rename some strnage method names
This commit is contained in:
@@ -64,9 +64,7 @@ public class LocalSpringBootApp extends AbstractSpringBootApp {
|
||||
public static Collection<SpringBootApp> getAllRunningJavaApps() throws Exception {
|
||||
return cache.getAllRunningJavaApps();
|
||||
}
|
||||
/**
|
||||
* @return Map that contains the boot apps, mapping the process ID -> boot app accessor object
|
||||
*/
|
||||
|
||||
public static Collection<SpringBootApp> getAllRunningSpringApps() throws Exception {
|
||||
return getAllRunningJavaApps().stream().filter(SpringBootApp::isSpringBootApp).collect(CollectorUtil.toImmutableList());
|
||||
}
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2018 Pivotal, Inc.
|
||||
* 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:
|
||||
* Pivotal, Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.springframework.ide.vscode.commons.boot.app.cli;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -30,7 +40,7 @@ public interface SpringBootApp {
|
||||
Properties getSystemProperties() throws Exception;
|
||||
JMXConnector getJmxConnector() throws MalformedURLException, IOException;
|
||||
|
||||
default String getSystemProperties(String string) throws Exception {
|
||||
default String getSystemProperty(String string) throws Exception {
|
||||
Object r = getSystemProperties().get(string);
|
||||
if (r instanceof String) {
|
||||
return (String) r;
|
||||
|
||||
@@ -94,7 +94,7 @@ public class DefaultRunningAppProvider implements ProjectAwareRunningAppProvider
|
||||
|
||||
public static boolean doesProjectNameMatch(SpringBootApp app, IJavaProject project) {
|
||||
try {
|
||||
String projectName = app.getSystemProperties("spring.boot.project.name");
|
||||
String projectName = app.getSystemProperty("spring.boot.project.name");
|
||||
return projectName != null && projectName.equals(project.getElementName());
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2018 Pivotal, Inc.
|
||||
* 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:
|
||||
* Pivotal, Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.springframework.ide.vscode.boot.java.handlers;
|
||||
|
||||
import java.util.Collection;
|
||||
@@ -14,8 +24,6 @@ import org.springframework.ide.vscode.commons.languageserver.util.Settings;
|
||||
import org.springframework.ide.vscode.commons.languageserver.util.SimpleLanguageServer;
|
||||
import org.springframework.ide.vscode.commons.util.CollectorUtil;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class RemoteRunningAppsProvider implements RunningAppProvider {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(RemoteRunningAppsProvider.class);
|
||||
|
||||
@@ -40,9 +40,6 @@ public interface RunningAppProvider {
|
||||
|
||||
public static final RunningAppProvider NULL = () -> ImmutableList.of();
|
||||
|
||||
/**
|
||||
* returns all running spring boot applications on the local machine.
|
||||
*/
|
||||
Collection<SpringBootApp> getAllRunningSpringApps() throws Exception;
|
||||
|
||||
static RunningAppProvider createDefault(SimpleLanguageServer server) {
|
||||
|
||||
Reference in New Issue
Block a user