Issue #1930 Check for null in WatchesResource.

Former-commit-id: 71d03e3242 [formerly 3af6d471d8] [formerly 721db403ad] [formerly b8cb330cd1 [formerly 721db403ad [formerly 7feb01b219e5ace4cd7df115c20c6f4f64869126]]]
Former-commit-id: b8cb330cd1
Former-commit-id: 76d062751a86d3a0966108d311b2bbf0dcd56abb [formerly 150b116995]
Former-commit-id: e3b56ac975
This commit is contained in:
Ben Steffensmeier 2013-05-06 11:38:03 -05:00
parent e4f3d60d90
commit 30b51f5d4d

View file

@ -48,6 +48,7 @@ import com.vividsolutions.jts.geom.GeometryFactory;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Sep 27, 2012 1149 jsanchez Refactored methods from AbstractWarningsResource into this class.
* May 06, 2013 1930 bsteffen Check for null in WatchesResource.
*
* </pre>
*
@ -186,16 +187,13 @@ public class WatchesResource extends AbstractWWAResource {
if (record.getUgczones().size() > 0) {
setGeometry(record);
if (record.getGeometry() != null) {
if (record.getGeometry() != null && record.getPhen() != null) {
IShadedShape ss = target.createShadedShape(false,
descriptor.getGridGeometry(), false);
geo = (Geometry) record.getGeometry().clone();
JTSCompiler jtsCompiler = new JTSCompiler(ss, null,
this.descriptor, PointStyle.CROSS);
jtsCompiler.handle(geo, color);
if (record.getPhen() == null) {
return;
}
ss.setFillPattern(FillPatterns.getGLPattern(record.getPhen()
.equals("TO") ? "VERTICAL" : "HORIZONTAL"));
ss.compile();
@ -272,7 +270,7 @@ public class WatchesResource extends AbstractWWAResource {
if (createShape != null) {
WarningEntry entry = entryMap.get(createShape
.getDataURI());
if (entry != null) {
if (entry != null && entry.shadedShape != null) {
entry.shadedShape.dispose();
}
initShape(target, createShape);