Skip to content

Commit

Permalink
Fixed #30 "NPE while adding a Library to a module"
Browse files Browse the repository at this point in the history
Issues: #30
  • Loading branch information
aheusingfeld committed Mar 8, 2013
1 parent fad9309 commit 2992454
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
import org.sonar.ide.intellij.model.SonarProject;
import org.sonar.ide.intellij.utils.SonarUtils;
import org.sonar.ide.intellij.worker.RefreshProjectListWorker;
import org.sonar.wsclient.Host;
import org.sonar.wsclient.Sonar;
import org.sonar.wsclient.connectors.HttpClient4Connector;

import javax.swing.*;
import java.awt.event.ActionEvent;
Expand Down Expand Up @@ -123,12 +121,14 @@ public JComponent createComponent() {

@Override
public void apply() throws ConfigurationException {
sonarModuleComponent.getState().host = txtHost.getText();
sonarModuleComponent.getState().user = txtUser.getText();
sonarModuleComponent.getState().password = new String(txtPassword.getPassword());
sonarModuleComponent.getState().projectKey = ((SonarProject) (cmbProject.getSelectedItem())).getResource().getKey();
sonarModuleComponent.getState().useProxy = useProxyBox.isSelected();
sonarModuleComponent.getState().configured = true;
if (cmbProject.getSelectedItem() != null) {
sonarModuleComponent.getState().host = txtHost.getText();
sonarModuleComponent.getState().user = txtUser.getText();
sonarModuleComponent.getState().password = new String(txtPassword.getPassword());
sonarModuleComponent.getState().projectKey = ((SonarProject) (cmbProject.getSelectedItem())).getResource().getKey();
sonarModuleComponent.getState().useProxy = useProxyBox.isSelected();
sonarModuleComponent.getState().configured = true;
}
}

@Override
Expand Down

0 comments on commit 2992454

Please sign in to comment.