- removed some warnings

- used fix in SVN 5233 for ysearch.java and search.java

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5237 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 16 years ago
parent 69925a7e91
commit 820a03f9d6

@ -3,7 +3,7 @@ javacSource=1.5
javacTarget=1.5
# Release Configuration
releaseVersion=0.604
releaseVersion=0.605
stdReleaseFile=yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
embReleaseFile=yacy_emb_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
proReleaseFile=yacy_pro_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz

@ -93,6 +93,7 @@ public final class search {
String agent = header.get("User-Agent");
if (agent == null) agent = System.getProperty("user.language");
language = (agent == null) ? "en" : iso639.userAgentLanguageDetection(agent);
if (language == null) language = "en";
}
final int partitions = post.getInt("partitions", 30);
String profile = post.get("profile", ""); // remote profile hand-over

@ -138,6 +138,7 @@ public class ysearch {
String agent = header.get("User-Agent");
if (agent == null) agent = System.getProperty("user.language");
String language = (agent == null) ? "en" : iso639.userAgentLanguageDetection(agent);
if (language == null) language = "en";
// SEARCH
//final boolean indexDistributeGranted = sb.getConfig(plasmaSwitchboard.INDEX_DIST_ALLOW, "true").equals("true");

@ -137,6 +137,7 @@ public final class plasmaSearchQuery {
this.linesPerPage = Math.min((specialRights) ? 1000 : 10, lines);
this.offset = Math.min((specialRights) ? 10000 : 100, offset);
this.urlMask = urlMask;
assert language != null;
this.targetlang = language;
this.domType = domType;
this.zonecode = domainzone;

@ -295,6 +295,7 @@ public class yacySearch extends Thread {
//if (wordIndex.seedDB.mySeed() == null || wordIndex.seedDB.mySeed().getPublicAddress() == null) { return null; }
// prepare seed targets and threads
assert language != null;
final yacySeed[] targetPeers = (clusterselection == null) ? selectSearchTargets(wordIndex.seedDB, wordIndex.peerActions, plasmaSearchQuery.hashes2Set(wordhashes), targets) : selectClusterPeers(wordIndex.seedDB, clusterselection);
if (targetPeers == null) return new yacySearch[0];
targets = targetPeers.length;

@ -65,7 +65,7 @@ public final class yacyTray {
trayClickAction();
}
};
ti = new nativeTrayIcon(sb, iconpath, al, setupPopupMenu());
ti = new nativeTrayIcon(iconpath, al, setupPopupMenu());
ti.addToSystemTray();
isShown = true;
@ -160,7 +160,6 @@ public final class yacyTray {
}
class nativeTrayIcon {
private plasmaSwitchboard sb;
private Object SystemTray;
private Object TrayIcon;
private Class<?> SystemTrayClass;
@ -179,10 +178,9 @@ class nativeTrayIcon {
}
public nativeTrayIcon(final plasmaSwitchboard sb, String IconPath, ActionListener al, PopupMenu menu) {
if(!isSupported())
return;
this.sb = sb;
@SuppressWarnings("unchecked")
public nativeTrayIcon(String IconPath, ActionListener al, PopupMenu menu) {
if(!isSupported()) return;
final Image i = Toolkit.getDefaultToolkit().getImage(IconPath);
@ -232,7 +230,8 @@ class nativeTrayIcon {
}
}
public void addToSystemTray() {
@SuppressWarnings("unchecked")
public void addToSystemTray() {
try {
// with reflections: this.SystemTray.add(this.TrayIcon)
Class partypes1[] = new Class[1];
@ -247,7 +246,8 @@ class nativeTrayIcon {
}
}
public void removeFromSystemTray() {
@SuppressWarnings("unchecked")
public void removeFromSystemTray() {
try {
// with reflections: this.SystemTray.remove(this.TrayIcon)
Class partypes1[] = new Class[1];
@ -262,7 +262,8 @@ class nativeTrayIcon {
}
}
public void displayBalloonMessage(final String title, final String message) {
@SuppressWarnings("unchecked")
public void displayBalloonMessage(final String title, final String message) {
try {
// with reflections: this.TrayIcon.displayBalloonMessage(title, message, TrayIcon.MessageType.NONE)
Class partypes1[] = new Class[3];

Loading…
Cancel
Save