Skip to content

Commit

Permalink
fixed NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
g3force committed Oct 22, 2015
1 parent 58b08bd commit f6cc663
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 20 deletions.
60 changes: 44 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.g3force</groupId>
<artifactId>instanceables</artifactId>
<version>1.0</version>
<version>v1.1</version>
<name>instanceables</name>

<properties>
Expand All @@ -28,22 +28,50 @@
<dependency>
<groupId>com.github.g3force</groupId>
<artifactId>String2ValueConverter</artifactId>
<version>v1.3</version>
<version>v1.4</version>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ public class InstanceablePanel extends JPanel
private final List<JComponent> inputFields = new ArrayList<>();
private JButton btnCreate = null;
private final List<IInstanceableObserver> observers = new CopyOnWriteArrayList<IInstanceableObserver>();

private final Properties prop;


/**
* @param instanceableEnums
*/
Expand Down Expand Up @@ -159,7 +159,10 @@ public void setEnabled(final boolean enabled)
{
cbbInstances.setEnabled(enabled);
inputPanel.setEnabled(enabled);
btnCreate.setEnabled(enabled);
if (btnCreate != null)
{
btnCreate.setEnabled(enabled);
}
}


Expand Down

0 comments on commit f6cc663

Please sign in to comment.