< prev index next >

src/share/classes/sun/net/www/MimeTable.java

Print this page
rev 1564 : 7090158: Networking Libraries don't build with javac -Werror
7125055: ContentHandler.getContent API changed in error
Summary: Minor changes to networking java files to remove warnings
Reviewed-by: chegar, weijun, hawtin, alanb
Contributed-by: kurchi.subhra.hazra@oracle.com, sasha_bu@hotmail.com

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1994, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -23,14 +23,10 @@
  * questions.
  */
 
 package sun.net.www;
 import java.io.*;
-import java.util.Calendar;
-import java.util.Date;
-import java.text.SimpleDateFormat;
-import java.net.URL;
 import java.net.FileNameMap;
 import java.util.Hashtable;
 import java.util.Enumeration;
 import java.util.Properties;
 import java.util.StringTokenizer;

@@ -266,11 +262,11 @@
     void parse(Properties entries) {
         // first, strip out the platform-specific temp file template
         String tempFileTemplate = (String)entries.get("temp.file.template");
         if (tempFileTemplate != null) {
             entries.remove("temp.file.template");
-            this.tempFileTemplate = tempFileTemplate;
+            MimeTable.tempFileTemplate = tempFileTemplate;
         }
 
         // now, parse the mime-type spec's
         Enumeration<?> types = entries.propertyNames();
         while (types.hasMoreElements()) {

@@ -412,14 +408,14 @@
             properties.put("temp.file.template", tempFileTemplate);
             String tag;
             String user = System.getProperty("user.name");
             if (user != null) {
                 tag = "; customized for " + user;
-                properties.save(os, filePreamble + tag);
+                properties.store(os, filePreamble + tag);
             }
             else {
-                properties.save(os, filePreamble);
+                properties.store(os, filePreamble);
             }
         }
         catch (IOException e) {
             e.printStackTrace();
             return false;
< prev index next >