Revision: 7909
Author: [email protected]
Date: Mon Apr 12 07:37:49 2010
Log: Fix a potential bug in initialization found by findbugs
Review at http://gwt-code-reviews.appspot.com/325802
Review by: [email protected]
http://code.google.com/p/google-web-toolkit/source/detail?r=7909
Modified:
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/request/ExpensesKeyProcessor.java
=======================================
---
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/request/ExpensesKeyProcessor.java
Thu Apr 8 07:45:06 2010
+++
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/request/ExpensesKeyProcessor.java
Mon Apr 12 07:37:49 2010
@@ -1,12 +1,12 @@
/*
* Copyright 2010 Google Inc.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may
not
* use this file except in compliance with the License. You may obtain a
copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -41,9 +41,10 @@
private static Set<ExpensesKey<?>> get() {
if (instance == null) {
- instance = new HashSet<ExpensesKey<?>>();
- instance.add(ReportKey.get());
- instance.add(EmployeeKey.get());
+ HashSet<ExpensesKey<?>> newInstance = new HashSet<ExpensesKey<?>>();
+ newInstance.add(ReportKey.get());
+ newInstance.add(EmployeeKey.get());
+ instance = newInstance;
}
return instance;
}
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
To unsubscribe, reply using "remove me" as the subject.