* Fixes after review:

- Fix Polish po file
    - Install as a service by default on Windows again
    - Change CPUID getters to package private
    - Split new jbigi install messages into two lines
    - Javadocs
This commit is contained in:
zzz
2011-06-26 19:07:01 +00:00
parent 4ec4013a44
commit 2f10cca40f
24 changed files with 155 additions and 81 deletions

View File

@ -97,7 +97,6 @@ public class Daemon {
* *
* @param router * @param router
* The NamingService to update, generally the root NamingService from the context. * The NamingService to update, generally the root NamingService from the context.
* client applications.
* @param published * @param published
* The published AddressBook. This address book is published on * The published AddressBook. This address book is published on
* the user's eepsite so that others may subscribe to it. * the user's eepsite so that others may subscribe to it.

View File

@ -1304,6 +1304,10 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
out.flush(); out.flush();
} }
/**
* Decode %xx encoding
* @since 0.8.7
*/
private static String decode(String s) { private static String decode(String s) {
if (!s.contains("%")) if (!s.contains("%"))
return s; return s;

View File

@ -1,7 +1,14 @@
<html><body> <html><body>
<p>Implements a TCP-like (reliable, authenticated, in order) set of sockets for <p>Implements a TCP-like (reliable, authenticated, in order) set of sockets for
communicating over the IP-like (unreliable, unauthenticated, unordered) I2P communicating over the IP-like (unreliable, unauthenticated, unordered) I2P
messages.</p> messages.
Note that this class is split across two jars, streaming.jar and ministreaming.jar.
The interfaces and some very old code are in ministreaming.jar, but the
real work gets done in streaming.jar. Clients must have both jars
in their classpath.
Most clients will require (only) streaming.jar, ministreaming.jar, and i2p.jar
in their classpath to communicate with the router.
</p>
<p>When an application wants to use streams, it must fetch an {@link <p>When an application wants to use streams, it must fetch an {@link
net.i2p.client.streaming.I2PSocketManager} from the {@link net.i2p.client.streaming.I2PSocketManager} from the {@link

View File

@ -46,6 +46,13 @@ public class ConfigUIHelper extends HelperBase {
return rv; return rv;
} }
/**
* Each language has the ISO code, the flag, and the name.
* Alphabetical by the ISO code please.
* See http://en.wikipedia.org/wiki/ISO_639-1 .
* Any language-specific flag added to the icon set must be
* added to the top-level build.xml for the updater.
*/
private static final String langs[] = {"ar", "de", "en", "es", "fi", "fr", "it", "nl", "pl", "pt", "ru", private static final String langs[] = {"ar", "de", "en", "es", "fi", "fr", "it", "nl", "pl", "pt", "ru",
"sv", "vi", "zh"}; "sv", "vi", "zh"};
private static final String flags[] = {"lang_ar", "de", "us", "es", "fi", "fr", "it", "nl", "pl", "pt", "ru", private static final String flags[] = {"lang_ar", "de", "us", "es", "fi", "fr", "it", "nl", "pl", "pt", "ru",

View File

@ -26,7 +26,7 @@ import org.jrobin.graph.RrdGraphDef;
import org.jrobin.graph.RrdGraphDefTemplate; import org.jrobin.graph.RrdGraphDefTemplate;
/** /**
* Creates and updates the in-memory RRD database, * Creates and updates the in-memory or on-disk RRD database,
* and provides methods to generate graphs of the data * and provides methods to generate graphs of the data
* *
* @since 0.6.1.13 * @since 0.6.1.13

View File

@ -36,20 +36,16 @@
%> %>
<link href="<%=intl.getTheme(request.getHeader("User-Agent"))%>console.css" rel="stylesheet" type="text/css"> <link href="<%=intl.getTheme(request.getHeader("User-Agent"))%>console.css" rel="stylesheet" type="text/css">
<% <%
// make the fonts bigger for chinese
if (intl.getLang().equals("zh")) { if (intl.getLang().equals("zh")) {
// make the fonts bigger for chinese
%> %>
<link href="<%=intl.getTheme(request.getHeader("User-Agent"))%>console_big.css" rel="stylesheet" type="text/css"> <link href="<%=intl.getTheme(request.getHeader("User-Agent"))%>console_big.css" rel="stylesheet" type="text/css">
<% <%
} } else if (intl.getLang().equals("ar")) {
%> // Use RTL theme for Arabic
<%
// Use RTL theme for Arabic
if (intl.getLang().equals("ar")) {
%> %>
<link href="<%=intl.getTheme(request.getHeader("User-Agent"))%>console_ar.css" rel="stylesheet" type="text/css"> <link href="<%=intl.getTheme(request.getHeader("User-Agent"))%>console_ar.css" rel="stylesheet" type="text/css">
<% <%
} }
%> %>
<!--[if IE]><link href="/themes/console/classic/ieshim.css" rel="stylesheet" type="text/css" /><![endif]--> <!--[if IE]><link href="/themes/console/classic/ieshim.css" rel="stylesheet" type="text/css" /><![endif]-->

View File

@ -34,9 +34,9 @@ msgstr ""
#, java-format #, java-format
msgid "1 ms" msgid "1 ms"
msgid_plural "{0,number,####} ms" msgid_plural "{0,number,####} ms"
msgstr[0] "ms" msgstr[0] "1 ms"
msgstr[1] "ms" msgstr[1] "{0,number,####} ms"
msgstr[2] "ms" msgstr[2] "{0,number,####} ms"
#. seconds #. seconds
#. Note to translators: quantity will always be greater than one. #. Note to translators: quantity will always be greater than one.
@ -45,9 +45,9 @@ msgstr[2] "ms"
#, java-format #, java-format
msgid "1 sec" msgid "1 sec"
msgid_plural "{0} sec" msgid_plural "{0} sec"
msgstr[0] "sek" msgstr[0] "1 sek"
msgstr[1] "sek" msgstr[1] "{0} sek"
msgstr[2] "sek" msgstr[2] "{0} sek"
#. minutes #. minutes
#. Note to translators: quantity will always be greater than one. #. Note to translators: quantity will always be greater than one.
@ -56,9 +56,9 @@ msgstr[2] "sek"
#, java-format #, java-format
msgid "1 min" msgid "1 min"
msgid_plural "{0} min" msgid_plural "{0} min"
msgstr[0] "min" msgstr[0] "1 min"
msgstr[1] "min" msgstr[1] "{0} min"
msgstr[2] "min" msgstr[2] "{0} min"
#. hours #. hours
#. Note to translators: quantity will always be greater than one. #. Note to translators: quantity will always be greater than one.
@ -67,9 +67,9 @@ msgstr[2] "min"
#, java-format #, java-format
msgid "1 hour" msgid "1 hour"
msgid_plural "{0} hours" msgid_plural "{0} hours"
msgstr[0] "godz" msgstr[0] "1 godz"
msgstr[1] "godz" msgstr[1] "{0} godz"
msgstr[2] "godz" msgstr[2] "{0} godz"
#: ../../../core/java/src/net/i2p/data/DataHelper.java:1209 #: ../../../core/java/src/net/i2p/data/DataHelper.java:1209
#: ../java/src/net/i2p/router/web/ProfileOrganizerRenderer.java:314 #: ../java/src/net/i2p/router/web/ProfileOrganizerRenderer.java:314
@ -82,9 +82,9 @@ msgstr "nie dotyczy"
#, java-format #, java-format
msgid "1 day" msgid "1 day"
msgid_plural "{0} days" msgid_plural "{0} days"
msgstr[0] "dzień" msgstr[0] "1 dzień"
msgstr[1] "dni" msgstr[1] "{0} dni"
msgstr[2] "dni" msgstr[2] "{0} dni"
#: ../../../router/java/src/net/i2p/router/Blocklist.java:122 #: ../../../router/java/src/net/i2p/router/Blocklist.java:122
#, java-format #, java-format
@ -222,7 +222,7 @@ msgid ""
"Reseeding: fetching router info from seed URL ({0} successful, {1} errors)." "Reseeding: fetching router info from seed URL ({0} successful, {1} errors)."
msgstr "" msgstr ""
"Ponowne seedowanie: pobieranie informacji o routerze z URL seeda ({0} udane," "Ponowne seedowanie: pobieranie informacji o routerze z URL seeda ({0} udane,"
" {1} błędów})" " {1} błędów)"
#: ../../../router/java/src/net/i2p/router/transport/CommSystemFacadeImpl.java:512 #: ../../../router/java/src/net/i2p/router/transport/CommSystemFacadeImpl.java:512
msgid "NetDb entry" msgid "NetDb entry"

View File

@ -17,7 +17,6 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
* @since 0.8.7
*/ */
package i2p.susi.dns; package i2p.susi.dns;

View File

@ -1,7 +1,5 @@
<% <%
/* /*
* Created on Sep 02, 2005
*
* This file is part of susidns project, see http://susi.i2p/ * This file is part of susidns project, see http://susi.i2p/
* *
* Copyright (C) 2005 <susi23@mail.i2p> * Copyright (C) 2005 <susi23@mail.i2p>
@ -20,7 +18,6 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
* $Revision: 1.3 $
*/ */
// http://www.crazysquirrel.com/computing/general/form-encoding.jspx // http://www.crazysquirrel.com/computing/general/form-encoding.jspx

View File

@ -31,6 +31,7 @@
<echo message=" updaterWithJettyFixes: updater including local jetty patches" /> <echo message=" updaterWithJettyFixes: updater including local jetty patches" />
<echo message=" updaterWithGeoIP: updater including GeoIP Files" /> <echo message=" updaterWithGeoIP: updater including GeoIP Files" />
<echo message=" updaterWithJettyFixesAndGeoIP" /> <echo message=" updaterWithJettyFixesAndGeoIP" />
<echo message=" updaterWithJettyFixesAndJbigi" />
<echo message=" updaterSmall: updater with the essentials only - no SAM, i2psnark, SusiMail, SusiDNS, news.xml, or history.txt" /> <echo message=" updaterSmall: updater with the essentials only - no SAM, i2psnark, SusiMail, SusiDNS, news.xml, or history.txt" />
<echo message=" updaterRouter: updater with the i2p.jar and router.jar only" /> <echo message=" updaterRouter: updater with the i2p.jar and router.jar only" />
<echo message=" distclean: clean up all derived files" /> <echo message=" distclean: clean up all derived files" />
@ -390,7 +391,7 @@
</classpath> </classpath>
<link offline="true" href="http://download.oracle.com/javase/6/docs/api/" packagelistLoc="installer/resources/package-lists/java/" /> <link offline="true" href="http://download.oracle.com/javase/6/docs/api/" packagelistLoc="installer/resources/package-lists/java/" />
<link offline="true" href="http://docs.i2p2.de/jetty/javadoc/" packagelistLoc="installer/resources/package-lists/jetty/" /> <link offline="true" href="http://docs.i2p2.de/jetty/javadoc/" packagelistLoc="installer/resources/package-lists/jetty/" />
<link offline="true" href="http://docs.i2p2.de/jrobin/javadoc/" packagelistLoc="installer/resources/package-lists/jrobin/" /> <link offline="true" href="http://docs.i2p-projekt.de/jrobin/javadoc/" packagelistLoc="installer/resources/package-lists/jrobin/" />
</javadoc> </javadoc>
<echo message="Warning, javadoc embeds timestamps in the output, run with 'TZ=UTC ant javadoc' if you plan to distribute" /> <echo message="Warning, javadoc embeds timestamps in the output, run with 'TZ=UTC ant javadoc' if you plan to distribute" />
</target> </target>

View File

@ -1,5 +1,9 @@
package freenet.support.CPUInformation; package freenet.support.CPUInformation;
/**
* Moved out of CPUID.java
* @since 0.8.7
*/
class AMDInfoImpl extends CPUIDCPUInfo implements AMDCPUInfo class AMDInfoImpl extends CPUIDCPUInfo implements AMDCPUInfo
{ {
protected static boolean isK6Compatible = false; protected static boolean isK6Compatible = false;
@ -13,19 +17,18 @@ class AMDInfoImpl extends CPUIDCPUInfo implements AMDCPUInfo
// If modelString != null, the cpu is considered correctly identified. // If modelString != null, the cpu is considered correctly identified.
protected static String modelString = null; protected static String modelString = null;
@Override
public boolean IsK6Compatible(){ return isK6Compatible; } public boolean IsK6Compatible(){ return isK6Compatible; }
@Override
public boolean IsK6_2_Compatible(){ return isK6_2_Compatible; } public boolean IsK6_2_Compatible(){ return isK6_2_Compatible; }
@Override
public boolean IsK6_3_Compatible(){ return isK6_3_Compatible; } public boolean IsK6_3_Compatible(){ return isK6_3_Compatible; }
@Override
public boolean IsGeodeCompatible(){ return isGeodeCompatible; } public boolean IsGeodeCompatible(){ return isGeodeCompatible; }
@Override
public boolean IsAthlonCompatible(){ return isAthlonCompatible; } public boolean IsAthlonCompatible(){ return isAthlonCompatible; }
@Override
public boolean IsAthlon64Compatible(){ return isAthlon64Compatible; } public boolean IsAthlon64Compatible(){ return isAthlon64Compatible; }
@Override
public boolean IsBobcatCompatible(){ return isBobcatCompatible; } public boolean IsBobcatCompatible(){ return isBobcatCompatible; }
static static
@ -33,7 +36,6 @@ class AMDInfoImpl extends CPUIDCPUInfo implements AMDCPUInfo
identifyCPU(); identifyCPU();
} }
@Override
public String getCPUModelString() throws UnknownCPUException public String getCPUModelString() throws UnknownCPUException
{ {
if (modelString != null) if (modelString != null)
@ -348,7 +350,7 @@ class AMDInfoImpl extends CPUIDCPUInfo implements AMDCPUInfo
} }
} }
} }
@Override
public boolean hasX64() public boolean hasX64()
{ {
return isX64; return isX64;

View File

@ -99,7 +99,7 @@ public class CPUID {
private static native CPUIDResult doCPUID(int iFunction); private static native CPUIDResult doCPUID(int iFunction);
public static String getCPUVendorID() static String getCPUVendorID()
{ {
CPUIDResult c = doCPUID(0); CPUIDResult c = doCPUID(0);
StringBuilder sb= new StringBuilder(13); StringBuilder sb= new StringBuilder(13);
@ -120,68 +120,72 @@ public class CPUID {
return sb.toString(); return sb.toString();
} }
public static int getCPUFamily() static int getCPUFamily()
{ {
CPUIDResult c = doCPUID(1); CPUIDResult c = doCPUID(1);
return (c.EAX >> 8) & 0xf; return (c.EAX >> 8) & 0xf;
} }
public static int getCPUModel() static int getCPUModel()
{ {
CPUIDResult c = doCPUID(1); CPUIDResult c = doCPUID(1);
return (c.EAX >> 4) & 0xf; return (c.EAX >> 4) & 0xf;
} }
public static int getCPUExtendedModel() static int getCPUExtendedModel()
{ {
CPUIDResult c = doCPUID(1); CPUIDResult c = doCPUID(1);
return (c.EAX >> 16) & 0xf; return (c.EAX >> 16) & 0xf;
} }
public static int getCPUType() static int getCPUType()
{ {
CPUIDResult c = doCPUID(1); CPUIDResult c = doCPUID(1);
return (c.EAX >> 12) & 0xf; return (c.EAX >> 12) & 0xf;
} }
public static int getCPUExtendedFamily() static int getCPUExtendedFamily()
{ {
CPUIDResult c = doCPUID(1); CPUIDResult c = doCPUID(1);
return (c.EAX >> 20) & 0xff; return (c.EAX >> 20) & 0xff;
} }
public static int getCPUStepping() static int getCPUStepping()
{ {
CPUIDResult c = doCPUID(1); CPUIDResult c = doCPUID(1);
return c.EAX & 0xf; return c.EAX & 0xf;
} }
public static int getEDXCPUFlags() static int getEDXCPUFlags()
{ {
CPUIDResult c = doCPUID(1); CPUIDResult c = doCPUID(1);
return c.EDX; return c.EDX;
} }
public static int getECXCPUFlags() static int getECXCPUFlags()
{ {
CPUIDResult c = doCPUID(1); CPUIDResult c = doCPUID(1);
return c.ECX; return c.ECX;
} }
public static int getExtendedEBXCPUFlags() static int getExtendedEBXCPUFlags()
{ {
CPUIDResult c = doCPUID(0x80000001); CPUIDResult c = doCPUID(0x80000001);
return c.EBX; return c.EBX;
} }
public static int getExtendedECXCPUFlags() static int getExtendedECXCPUFlags()
{ {
CPUIDResult c = doCPUID(0x80000001); CPUIDResult c = doCPUID(0x80000001);
return c.ECX; return c.ECX;
} }
public static int getExtendedEDXCPUFlags()
/** @since 0.8.7 */
static int getExtendedEDXCPUFlags()
{ {
CPUIDResult c = doCPUID(0x80000001); CPUIDResult c = doCPUID(0x80000001);
return c.EDX; return c.EDX;
} }
//Returns a CPUInfo item for the current type of CPU /**
//If I could I would declare this method in a interface named * Returns a CPUInfo item for the current type of CPU
//CPUInfoProvider and implement that interface in this class. * If I could I would declare this method in a interface named
//This would make it easier for other people to understand that there * CPUInfoProvider and implement that interface in this class.
//is nothing preventing them from coding up new providers, probably using * This would make it easier for other people to understand that there
//other detection methods than the x86-only CPUID instruction * is nothing preventing them from coding up new providers, probably using
* other detection methods than the x86-only CPUID instruction
*/
public static CPUInfo getInfo() throws UnknownCPUException public static CPUInfo getInfo() throws UnknownCPUException
{ {
if(!_nativeOk) if(!_nativeOk)

View File

@ -1,5 +1,9 @@
package freenet.support.CPUInformation; package freenet.support.CPUInformation;
/**
* Moved out of CPUID.java
* @since 0.8.7
*/
abstract class CPUIDCPUInfo abstract class CPUIDCPUInfo
{ {
protected static boolean isX64 = false; protected static boolean isX64 = false;

View File

@ -23,7 +23,7 @@ public interface CPUInfo
public String getVendor(); public String getVendor();
/** /**
* @return A string detailing what type of CPU that is present in the machine. I.e. 'Pentium IV' etc. * @return A string detailing what type of CPU that is present in the machine. I.e. 'Pentium IV' etc.
* @throws UnknownCPUException If for any reson the retrieval of the requested information * @throws UnknownCPUException If for any reason the retrieval of the requested information
* failed. The message encapsulated in the execption indicates the * failed. The message encapsulated in the execption indicates the
* cause of the failure. * cause of the failure.
*/ */

View File

@ -1,5 +1,9 @@
package freenet.support.CPUInformation; package freenet.support.CPUInformation;
/**
* Moved out of CPUID.java
* @since 0.8.7
*/
class IntelInfoImpl extends CPUIDCPUInfo implements IntelCPUInfo class IntelInfoImpl extends CPUIDCPUInfo implements IntelCPUInfo
{ {
protected static boolean isPentiumCompatible = false; protected static boolean isPentiumCompatible = false;
@ -15,23 +19,22 @@ class IntelInfoImpl extends CPUIDCPUInfo implements IntelCPUInfo
// If modelString != null, the cpu is considered correctly identified. // If modelString != null, the cpu is considered correctly identified.
protected static String modelString = null; protected static String modelString = null;
@Override
public boolean IsPentiumCompatible(){ return isPentiumCompatible; } public boolean IsPentiumCompatible(){ return isPentiumCompatible; }
@Override
public boolean IsPentiumMMXCompatible(){ return isPentiumMMXCompatible; } public boolean IsPentiumMMXCompatible(){ return isPentiumMMXCompatible; }
@Override
public boolean IsPentium2Compatible(){ return isPentium2Compatible; } public boolean IsPentium2Compatible(){ return isPentium2Compatible; }
@Override
public boolean IsPentium3Compatible(){ return isPentium3Compatible; } public boolean IsPentium3Compatible(){ return isPentium3Compatible; }
@Override
public boolean IsPentium4Compatible(){ return isPentium4Compatible; } public boolean IsPentium4Compatible(){ return isPentium4Compatible; }
@Override
public boolean IsPentiumMCompatible(){ return isPentiumMCompatible; } public boolean IsPentiumMCompatible(){ return isPentiumMCompatible; }
@Override
public boolean IsAtomCompatible(){ return isAtomCompatible; } public boolean IsAtomCompatible(){ return isAtomCompatible; }
@Override
public boolean IsCore2Compatible(){ return isCore2Compatible; } public boolean IsCore2Compatible(){ return isCore2Compatible; }
@Override
public boolean IsCoreiCompatible(){ return isCoreiCompatible; } public boolean IsCoreiCompatible(){ return isCoreiCompatible; }
static static
@ -290,7 +293,7 @@ class IntelInfoImpl extends CPUIDCPUInfo implements IntelCPUInfo
} }
} }
} }
@Override
public boolean hasX64() { public boolean hasX64() {
return isX64; return isX64;
} }

View File

@ -1,5 +1,9 @@
package freenet.support.CPUInformation; package freenet.support.CPUInformation;
/**
* Moved out of CPUID.java
* @since 0.8.7
*/
public interface VIACPUInfo extends CPUInfo{ public interface VIACPUInfo extends CPUInfo{
/** /**

View File

@ -1,5 +1,9 @@
package freenet.support.CPUInformation; package freenet.support.CPUInformation;
/**
* Moved out of CPUID.java
* @since 0.8.7
*/
class VIAInfoImpl extends CPUIDCPUInfo implements VIACPUInfo { class VIAInfoImpl extends CPUIDCPUInfo implements VIACPUInfo {
protected static boolean isC3Compatible = false; protected static boolean isC3Compatible = false;
@ -9,9 +13,8 @@ class VIAInfoImpl extends CPUIDCPUInfo implements VIACPUInfo {
protected static String modelString = null; protected static String modelString = null;
@Override
public boolean IsC3Compatible(){ return isC3Compatible; } public boolean IsC3Compatible(){ return isC3Compatible; }
@Override
public boolean IsNanoCompatible(){ return isNanoCompatible; } public boolean IsNanoCompatible(){ return isNanoCompatible; }
static static
@ -19,7 +22,6 @@ class VIAInfoImpl extends CPUIDCPUInfo implements VIACPUInfo {
identifyCPU(); identifyCPU();
} }
@Override
public String getCPUModelString() public String getCPUModelString()
{ {
if (modelString != null) if (modelString != null)
@ -28,7 +30,6 @@ class VIAInfoImpl extends CPUIDCPUInfo implements VIACPUInfo {
} }
@Override
public boolean hasX64() public boolean hasX64()
{ {
return false; return false;

View File

@ -69,7 +69,7 @@ public class SingleFileNamingService extends NamingService {
} }
/** /**
* @return the base file name * @return the file's absolute path
*/ */
@Override @Override
public String getName() { public String getName() {

View File

@ -1362,6 +1362,12 @@ public class DataHelper {
return rv; return rv;
} }
/**
* Same as orig.getBytes("UTF-8") but throws an unchecked RuntimeException
* instead of an UnsupportedEncodingException if no UTF-8, for ease of use.
*
* @throws RuntimeException
*/
public static byte[] getUTF8(String orig) { public static byte[] getUTF8(String orig) {
if (orig == null) return null; if (orig == null) return null;
try { try {
@ -1370,10 +1376,26 @@ public class DataHelper {
throw new RuntimeException("no utf8!?"); throw new RuntimeException("no utf8!?");
} }
} }
/**
* Same as orig.getBytes("UTF-8") but throws an unchecked RuntimeException
* instead of an UnsupportedEncodingException if no UTF-8, for ease of use.
*
* @throws RuntimeException
* @deprecated unused
*/
public static byte[] getUTF8(StringBuffer orig) { public static byte[] getUTF8(StringBuffer orig) {
if (orig == null) return null; if (orig == null) return null;
return getUTF8(orig.toString()); return getUTF8(orig.toString());
} }
/**
* Same as new String(orig, "UTF-8") but throws an unchecked RuntimeException
* instead of an UnsupportedEncodingException if no UTF-8, for ease of use.
*
* @throws RuntimeException
* @deprecated unused
*/
public static String getUTF8(byte orig[]) { public static String getUTF8(byte orig[]) {
if (orig == null) return null; if (orig == null) return null;
try { try {
@ -1382,6 +1404,14 @@ public class DataHelper {
throw new RuntimeException("no utf8!?"); throw new RuntimeException("no utf8!?");
} }
} }
/**
* Same as new String(orig, "UTF-8") but throws an unchecked RuntimeException
* instead of an UnsupportedEncodingException if no UTF-8, for ease of use.
*
* @throws RuntimeException
* @deprecated unused
*/
public static String getUTF8(byte orig[], int offset, int len) { public static String getUTF8(byte orig[], int offset, int len) {
if (orig == null) return null; if (orig == null) return null;
try { try {

View File

@ -1,3 +1,12 @@
2011-06-26 zzz
* Fixes after review:
- Fix Polish po file
- Install as a service by default on Windows again
- Change CPUID getters to package private
- Split new jbigi install messages into two lines
- Test script updates
- Javadocs
2011-06-23 zzz 2011-06-23 zzz
* IRC: Allow outbound INVITE * IRC: Allow outbound INVITE

View File

@ -224,7 +224,8 @@
</pack> </pack>
<pack name="Windows Service" required="no" preselected="no"> <!-- to disable by default, add preselected="no" -->
<pack name="Windows Service" required="no">
<description>Automatically start I2P in the background</description> <description>Automatically start I2P in the background</description>
<os family="windows" /> <os family="windows" />
<executable targetfile="$INSTALL_PATH/set_config_dir_for_nt_service.bat" stage="postinstall" failure="warn" keep="false" /> <executable targetfile="$INSTALL_PATH/set_config_dir_for_nt_service.bat" stage="postinstall" failure="warn" keep="false" />

View File

@ -1267,9 +1267,11 @@ public class Router {
boolean success = FileUtil.copy(path, path + ".bak", true, true); boolean success = FileUtil.copy(path, path + ".bak", true, true);
if (success) { if (success) {
boolean success2 = jcpuidLib.delete(); boolean success2 = jcpuidLib.delete();
if (success2) if (success2) {
System.out.println("New jbigi.jar detected, moved jcpuid library to " + System.out.println("New jbigi.jar detected, moved jcpuid library to " +
path + ".bak, check logs for successful installation of new library"); path + ".bak");
System.out.println("Check logs for successful installation of new library");
}
} }
} }
@ -1279,9 +1281,11 @@ public class Router {
boolean success = FileUtil.copy(path, path + ".bak", true, true); boolean success = FileUtil.copy(path, path + ".bak", true, true);
if (success) { if (success) {
boolean success2 = jbigiLib.delete(); boolean success2 = jbigiLib.delete();
if (success2) if (success2) {
System.out.println("New jbigi.jar detected, moved jbigi library to " + System.out.println("New jbigi.jar detected, moved jbigi library to " +
path + ".bak, check logs for successful installation of new library"); path + ".bak");
System.out.println("Check logs for successful installation of new library");
}
} }
} }
} }

View File

@ -14,7 +14,8 @@ DIRS="\
apps/i2psnark/locale \ apps/i2psnark/locale \
apps/susidns/locale \ apps/susidns/locale \
apps/susimail/locale \ apps/susimail/locale \
apps/desktopgui/locale" apps/desktopgui/locale \
debian/po"
for i in `find $DIRS -maxdepth 1 -type f -name *.po` for i in `find $DIRS -maxdepth 1 -type f -name *.po`
do do

View File

@ -18,6 +18,7 @@ DIRS="\
apps/susidns/locale \ apps/susidns/locale \
apps/susimail/locale \ apps/susimail/locale \
apps/desktopgui/locale \ apps/desktopgui/locale \
debian/po \
installer/resources/eepsite.help/help \ installer/resources/eepsite.help/help \
installer/resources/initialNews \ installer/resources/initialNews \
installer/resources/proxy \ installer/resources/proxy \