This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Servlet error with the latest code


S D wrote:
So, the Language settings are done after the InPort creation and the
creation of InPort itself is expecting the Global Environment to be
present.

The interaction between Languages and Environments is something I want to fix. But the dependency on systemInPort on a ThreadLocation seems wrong/pointless anyway, so please try the attached patch. -- --Per Bothner per@bothner.com http://per.bothner.com/
Index: gnu/mapping/OutPort.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/mapping/OutPort.java,v
retrieving revision 1.19
diff -u -r1.19 OutPort.java
--- gnu/mapping/OutPort.java	24 Feb 2005 22:54:06 -0000	1.19
+++ gnu/mapping/OutPort.java	20 Apr 2005 18:04:51 -0000
@@ -70,7 +70,7 @@
 
   public boolean printReadable;
 
-  private static OutPort outInitial = new OutPort (new LogWriter (new BufferedWriter(new OutputStreamWriter(System.out))), true, true, "<stdout>");
+  static OutPort outInitial = new OutPort (new LogWriter (new BufferedWriter(new OutputStreamWriter(System.out))), true, true, "<stdout>");
 
   private static OutPort errInitial = new OutPort (new LogWriter(new OutputStreamWriter(System.err)), true, true, "<stderr>");
 
Index: gnu/mapping/InPort.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/mapping/InPort.java,v
retrieving revision 1.5
diff -u -r1.5 InPort.java
--- gnu/mapping/InPort.java	24 Feb 2005 22:54:06 -0000	1.5
+++ gnu/mapping/InPort.java	20 Apr 2005 18:04:51 -0000
@@ -60,8 +60,8 @@
       setConvertCR(true);
   }
 
-  private static InPort systemInPort = new TtyInPort (System.in, "<stdin>",
-						      OutPort.outDefault());
+  private static InPort systemInPort
+    = new TtyInPort (System.in, "<stdin>", OutPort.outInitial);
   public static final ThreadLocation inLocation
     = new ThreadLocation(new Symbol("in-default"));
   static { inLocation.setGlobal(systemInPort); }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]