Issue #1930 Check for null in WatchesResource.
Former-commit-id: 7feb01b219e5ace4cd7df115c20c6f4f64869126
This commit is contained in:
parent
083700d315
commit
721db403ad
1 changed files with 3 additions and 5 deletions
|
@ -48,6 +48,7 @@ import com.vividsolutions.jts.geom.GeometryFactory;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Sep 27, 2012 1149 jsanchez Refactored methods from AbstractWarningsResource into this class.
|
* Sep 27, 2012 1149 jsanchez Refactored methods from AbstractWarningsResource into this class.
|
||||||
|
* May 06, 2013 1930 bsteffen Check for null in WatchesResource.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -186,16 +187,13 @@ public class WatchesResource extends AbstractWWAResource {
|
||||||
|
|
||||||
if (record.getUgczones().size() > 0) {
|
if (record.getUgczones().size() > 0) {
|
||||||
setGeometry(record);
|
setGeometry(record);
|
||||||
if (record.getGeometry() != null) {
|
if (record.getGeometry() != null && record.getPhen() != null) {
|
||||||
IShadedShape ss = target.createShadedShape(false,
|
IShadedShape ss = target.createShadedShape(false,
|
||||||
descriptor.getGridGeometry(), false);
|
descriptor.getGridGeometry(), false);
|
||||||
geo = (Geometry) record.getGeometry().clone();
|
geo = (Geometry) record.getGeometry().clone();
|
||||||
JTSCompiler jtsCompiler = new JTSCompiler(ss, null,
|
JTSCompiler jtsCompiler = new JTSCompiler(ss, null,
|
||||||
this.descriptor, PointStyle.CROSS);
|
this.descriptor, PointStyle.CROSS);
|
||||||
jtsCompiler.handle(geo, color);
|
jtsCompiler.handle(geo, color);
|
||||||
if (record.getPhen() == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
ss.setFillPattern(FillPatterns.getGLPattern(record.getPhen()
|
ss.setFillPattern(FillPatterns.getGLPattern(record.getPhen()
|
||||||
.equals("TO") ? "VERTICAL" : "HORIZONTAL"));
|
.equals("TO") ? "VERTICAL" : "HORIZONTAL"));
|
||||||
ss.compile();
|
ss.compile();
|
||||||
|
@ -272,7 +270,7 @@ public class WatchesResource extends AbstractWWAResource {
|
||||||
if (createShape != null) {
|
if (createShape != null) {
|
||||||
WarningEntry entry = entryMap.get(createShape
|
WarningEntry entry = entryMap.get(createShape
|
||||||
.getDataURI());
|
.getDataURI());
|
||||||
if (entry != null) {
|
if (entry != null && entry.shadedShape != null) {
|
||||||
entry.shadedShape.dispose();
|
entry.shadedShape.dispose();
|
||||||
}
|
}
|
||||||
initShape(target, createShape);
|
initShape(target, createShape);
|
||||||
|
|
Loading…
Add table
Reference in a new issue