Skip to content

Commit

Permalink
Potentially immutable maps.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kellindil committed Jan 24, 2012
1 parent e1e6b18 commit 851ca83
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,9 @@ public EMtlBinaryResourceImpl(URI uri) {
*
* @see org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl#doLoad(java.io.InputStream, java.util.Map)
*/
@SuppressWarnings("unchecked")
@Override
public void doLoad(InputStream inputStream, Map<?, ?> options) throws IOException {
Map<Object, Object> actualOptions = (Map<Object, Object>)options;
if (actualOptions == null) {
actualOptions = new HashMap<Object, Object>();
}
Map<Object, Object> actualOptions = new HashMap<Object, Object>(options);
super.doLoad(inputStream, actualOptions);

if (!trimPosition) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,9 @@ public EMtlResourceImpl(URI uri) {
*
* @see org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl#doLoad(java.io.InputStream, java.util.Map)
*/
@SuppressWarnings("unchecked")
@Override
public void doLoad(InputStream inputStream, Map<?, ?> options) throws IOException {
Map<Object, Object> actualOptions = (Map<Object, Object>)options;
if (actualOptions == null) {
actualOptions = new HashMap<Object, Object>();
}
Map<Object, Object> actualOptions = new HashMap<Object, Object>(options);
// Record unknown features so that we can load emtl files compiled under 3.1 with 3.0
actualOptions.put(XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
actualOptions.put(XMLResource.OPTION_URI_HANDLER, new AcceleoXMIURIHandler());
Expand Down

0 comments on commit 851ca83

Please sign in to comment.