From 55136f436dd81bba4e5d849efdfb61b14e47a531 Mon Sep 17 00:00:00 2001
From: Deepak Bhole <dbhole@redhat.com>
Date: Mon, 29 Aug 2011 17:02:36 -0400
Subject: RH734081: Javaws cannot use proxy settings from Firefox

Based on patch from Lukas Zachar <lzachar at redhat dot com>

2011-08-29  Deepak Bhole <dbhole@redhat.com>

    * netx/net/sourceforge/jnlp/browser/FirefoxPreferencesFinder.java
    (find): Only process Profile sections. Do not throw an exception if a
    Default= line is not found since it is not guaranteed to exist.
---
 ChangeLog                                                       | 8 ++++++++
 NEWS                                                            | 1 +
 netx/net/sourceforge/jnlp/browser/FirefoxPreferencesFinder.java | 4 ++--
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c97a6d8..81f1156 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-08-29  Deepak Bhole <dbhole@redhat.com>
+
+	RH734081: Javaws cannot use proxy settings from Firefox
+	Based on patch from Lukas Zachar <lzachar at redhat dot com>
+	* netx/net/sourceforge/jnlp/browser/FirefoxPreferencesFinder.java
+	(find): Only process Profile sections. Do not throw an exception if a
+	Default= line is not found since it is not guaranteed to exist.
+
 2011-08-24  Deepak Bhole <dbhole@redhat.com>
 
 	RH718693: MindTerm SSH Applet doesn't work
diff --git a/NEWS b/NEWS
index b715a50..1173ce2 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,7 @@ Common
   - PR771: IcedTea-Web certificate verification code does not use the right API
   - PR742: IcedTea-Web checks certs only upto 1 level deep before declaring them untrusted.
   - PR769: IcedTea-Web does not work with some ssl sites with OpenJDK7
+  - RH734081: Javaws cannot use proxy settings from Firefox
 
 New in release 1.1 (2011-XX-XX):
 * Security updates
diff --git a/netx/net/sourceforge/jnlp/browser/FirefoxPreferencesFinder.java b/netx/net/sourceforge/jnlp/browser/FirefoxPreferencesFinder.java
index 45f6faa..99545f3 100644
--- a/netx/net/sourceforge/jnlp/browser/FirefoxPreferencesFinder.java
+++ b/netx/net/sourceforge/jnlp/browser/FirefoxPreferencesFinder.java
@@ -93,7 +93,7 @@ public class FirefoxPreferencesFinder {
                 }
 
                 line = line.trim();
-                if (line.startsWith("[") && line.endsWith("]")) {
+                if (line.startsWith("[Profile") && line.endsWith("]")) {
                     if (foundDefaultSection) {
                         break;
                     }
@@ -115,7 +115,7 @@ public class FirefoxPreferencesFinder {
             reader.close();
         }
 
-        if (!foundDefaultSection) {
+        if (!foundDefaultSection && linesInSection.size() == 0) {
             throw new FileNotFoundException("preferences file");
         }
 
-- 
cgit v1.2.3